ngc bug fixes

This commit is contained in:
ingvar1995 2018-08-07 00:41:27 +03:00
parent 1a0bd9deee
commit 318c9c942d
5 changed files with 12 additions and 7 deletions

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
cd ~
git clone https://github.com/toxygen-project/toxygen.git --branch=next_gen git clone https://github.com/toxygen-project/toxygen.git --branch=next_gen
cd toxygen/toxygen cd toxygen/toxygen

View File

@ -123,10 +123,14 @@ class App:
if self._settings['theme'] == 'dark': if self._settings['theme'] == 'dark':
return return
for theme in self._settings.built_in_themes().keys(): for theme in self._settings.built_in_themes().keys():
if self._settings['theme'] == theme: if self._settings['theme'] != theme:
with open(util.curr_directory(__file__) + self._settings.built_in_themes()[theme]) as fl: continue
style = fl.read() theme_path = self._settings.built_in_themes()[theme]
self._app.setStyleSheet(style) file_path = util.join_path(util.get_styles_directory(), theme_path)
with open(file_path) as fl:
style = fl.read()
self._app.setStyleSheet(style)
break
def _load_login_screen_translations(self): def _load_login_screen_translations(self):
current_language, supported_languages = self._get_languages() current_language, supported_languages = self._get_languages()

View File

@ -68,7 +68,7 @@ class History:
messages.reverse() messages.reverse()
messages = messages[self._messages.count():self._messages.count() + PAGE_SIZE] messages = messages[self._messages.count():self._messages.count() + PAGE_SIZE]
for message in messages: for message in messages:
if message.get_type() in (MESSAGE_TYPE['NORMAL'], MESSAGE_TYPE['ACTION']): # text message if message.get_type() in (MESSAGE_TYPE['TEXT'], MESSAGE_TYPE['ACTION']): # text message
self._create_message_item(message) self._create_message_item(message)
elif message.get_type() == MESSAGE_TYPE['FILE_TRANSFER']: # file transfer elif message.get_type() == MESSAGE_TYPE['FILE_TRANSFER']: # file transfer
if message.get_status() is None: if message.get_status() is None:

View File

@ -105,6 +105,6 @@ class PeerScreen(CenteredWidget):
def _get_ban_type(self): def _get_ban_type(self):
if self.ipBanRadioButton.isChecked(): if self.ipBanRadioButton.isChecked():
return consts.TOX_GROUP_BAN_TYPE['IP_PORT'] return consts.TOX_GROUP_BAN_TYPE['IP_PORT']
elif self.nickRadioButton.isCHecked(): elif self.nickBanRadioButton.isChecked():
return consts.TOX_GROUP_BAN_TYPE['NICK'] return consts.TOX_GROUP_BAN_TYPE['NICK']
return consts.TOX_GROUP_BAN_TYPE['PUBLIC_KEY'] return consts.TOX_GROUP_BAN_TYPE['PUBLIC_KEY']

View File

@ -105,7 +105,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QRadioButton" name="nickRadioButton"> <widget class="QRadioButton" name="nickBanRadioButton">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>40</x> <x>40</x>