|
|
|
@ -17,7 +17,10 @@
|
|
|
|
|
from PySide import QtGui, QtCore
|
|
|
|
|
import time, urllib2
|
|
|
|
|
from calculate.core.client.function import create_obj
|
|
|
|
|
from calculate.update.update_info import UpdateInfo
|
|
|
|
|
try:
|
|
|
|
|
from calculate.update.update_info import UpdateInfo
|
|
|
|
|
except ImportError:
|
|
|
|
|
UpdateInfo = None
|
|
|
|
|
import dbus
|
|
|
|
|
|
|
|
|
|
from ReturnMessage import ReturnedMessage
|
|
|
|
@ -221,10 +224,12 @@ class TrayIcon (QtGui.QSystemTrayIcon):
|
|
|
|
|
|
|
|
|
|
def check_for_update(self):
|
|
|
|
|
if self._parent.localhost_ClientObj:
|
|
|
|
|
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 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):
|
|
|
|
|