menu bug fixes

This commit is contained in:
ingvar1995 2016-05-02 23:20:02 +03:00
parent ac1800703f
commit 61b124dad4

View File

@ -212,6 +212,7 @@ class NetworkSettings(CenteredWidget):
self.proxy.setChecked(settings['proxy_type'] != 0)
self.proxyip.setText(settings['proxy_host'])
self.proxyport.setText(unicode(settings['proxy_port']))
self.http.setChecked(settings['proxy_type'] == 1)
self.retranslateUi()
self.proxy.stateChanged.connect(lambda x: self.activate())
self.activate()
@ -244,7 +245,7 @@ class NetworkSettings(CenteredWidget):
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_host'] = str(self.proxyip.text())
settings['proxy_port'] = int(self.proxyport.text())
settings.save()
if changed or self.reconnect:
@ -382,6 +383,12 @@ class NotificationsSettings(CenteredWidget):
self.callsSound.setGeometry(QtCore.QRect(10, 120, 340, 18))
self.soundNotifications = QtGui.QCheckBox(self)
self.soundNotifications.setGeometry(QtCore.QRect(10, 70, 340, 18))
font = QtGui.QFont()
font.setPointSize(12)
font.setBold(True)
self.callsSound.setFont(font)
self.soundNotifications.setFont(font)
self.enableNotifications.setFont(font)
s = Settings.get_instance()
self.enableNotifications.setChecked(s['notifications'])
self.soundNotifications.setChecked(s['sound_notifications'])