Исправлена работа без сертификата, иконки.

master3.4 3.3.3.1
Mike Khiretskiy 9 years ago
parent 10ba24a6ef
commit ed1984686a

@ -97,7 +97,11 @@ class ApiClient(QtGui.QWidget):
try:
self.lang = config.get('other', 'lang')
except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
self.lang = gettext.locale.getdefaultlocale()[0][:2]
default_locale = gettext.locale.getdefaultlocale()
if default_locale[0]:
self.lang = default_locale[0][:2]
else:
self.lang = "en"
if hasattr (self._parent, 'lang'):
if self._parent.lang:
self.lang = self._parent.lang

@ -228,13 +228,14 @@ class TrayIcon (QtGui.QSystemTrayIcon):
return menu
def check_for_update(self):
if self._parent.localhost_ClientObj:
if UpdateInfo:
uinfo = UpdateInfo(self._parent.localhost_ClientObj.VarsApi)
return (uinfo.need_update() and
not uinfo.update_already_run() and
not self.get_update_pid() and
not self.update_thread.isRunning())
if hasattr(self._parent, "localhost_ClientObj"):
if self._parent.localhost_ClientObj:
if UpdateInfo:
uinfo = UpdateInfo(self._parent.localhost_ClientObj.VarsApi)
return (uinfo.need_update() and
not uinfo.update_already_run() and
not self.get_update_pid() and
not self.update_thread.isRunning())
return False
def set_icon(self, online, has_update=None):

@ -22,6 +22,7 @@ class MainMenu(QtGui.QWidget):
def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
# self.hlayout = FlowLayout(self)
QtGui.QIcon.setThemeName('Calculate')
self.hlayout = QtGui.QHBoxLayout(self)
self.hlayout.setAlignment(QtCore.Qt.AlignLeft)

Loading…
Cancel
Save