From 0cf459e3a9a79798e38c3e736f08c5b5de29868d Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Fri, 29 Apr 2016 22:57:34 +0300 Subject: [PATCH] bug fixes --- src/loginscreen.py | 4 ---- src/menu.py | 3 ++- src/settings.py | 4 ++++ src/styles/style.qss | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/loginscreen.py b/src/loginscreen.py index faf0034..bb18dc4 100644 --- a/src/loginscreen.py +++ b/src/loginscreen.py @@ -88,7 +88,3 @@ class LoginScreen(CenteredWidget): def closeEvent(self, event): self.onclose(self.type, self.number, self.load_as_default, self.name) event.accept() - - -if __name__ == '__main__': - pass diff --git a/src/menu.py b/src/menu.py index 4b75e55..350cbe0 100644 --- a/src/menu.py +++ b/src/menu.py @@ -240,13 +240,14 @@ class NetworkSettings(CenteredWidget): changed = old_data != new_data if self.proxy.isChecked() and (self.proxyip.text() != settings['proxy_host'] or self.proxyport.text() != unicode(settings['proxy_port'])): changed = True - if changed or self.reconn: + if changed: settings['ipv6_enabled'] = self.ipv.isChecked() settings['udp_enabled'] = self.udp.isChecked() settings['proxy_type'] = 2 - int(self.http.isChecked()) settings['proxy_host'] = self.proxyip.text() settings['proxy_port'] = int(self.proxyport.text()) settings.save() + if changed or self.reconnect: # recreate tox instance Profile.get_instance().reset(self.reset) diff --git a/src/settings.py b/src/settings.py index 8de65c9..52442f2 100644 --- a/src/settings.py +++ b/src/settings.py @@ -172,6 +172,10 @@ class ProfileHelper(object): path = path.decode(locale.getpreferredencoding()) ProfileHelper._path = path + name + '.tox' ProfileHelper._directory = path + # create /avatars if not exists: + directory = path + 'avatars' + if not os.path.exists(directory): + os.makedirs(directory) with open(ProfileHelper._path, 'rb') as fl: data = fl.read() if data: diff --git a/src/styles/style.qss b/src/styles/style.qss index 5620bff..379987e 100644 --- a/src/styles/style.qss +++ b/src/styles/style.qss @@ -634,7 +634,7 @@ QPushButton:disabled QComboBox { - selection-background-color: #3d8ec9; + selection-background-color: #A9A9A9; background-color: #201F1F; border-style: solid; border: 1px solid #3A3939;