rename suds to sudsds, remove update in tray

master3.3
Denis Spiridonov 12 years ago
parent f4e862aa23
commit b31a96124f

@ -16,7 +16,7 @@
# limitations under the License. # limitations under the License.
from PySide import QtGui, QtCore from PySide import QtGui, QtCore
import urllib2, suds import urllib2, sudsds
from calculate.core.client.function import switch, create_obj from calculate.core.client.function import switch, create_obj
@ -176,7 +176,7 @@ class MainFrameRes(QtGui.QWidget):
table.onClick + '_view', step = 0) table.onClick + '_view', step = 0)
view = self.client.service[0][table.onClick + '_view'] \ view = self.client.service[0][table.onClick + '_view'] \
(sid, view_params) (sid, view_params)
except suds.MethodNotFound, e: except sudsds.MethodNotFound, e:
_print(e) _print(e)
return return
self._parent.ClientObj._parent.setWindowTitle(table.onClick + \ self._parent.ClientObj._parent.setWindowTitle(table.onClick + \
@ -230,7 +230,7 @@ class MainFrameRes(QtGui.QWidget):
self.method_name + '_view', step = 0) self.method_name + '_view', step = 0)
view = self.client.service[0][self.method_name + '_view'] \ view = self.client.service[0][self.method_name + '_view'] \
(sid, view_params) (sid, view_params)
except suds.MethodNotFound: except sudsds.MethodNotFound:
return return
self._parent.ClientObj._parent.setWindowTitle(self.method_name + \ self._parent.ClientObj._parent.setWindowTitle(self.method_name + \
' - ' + self.ClientObj.Name) ' - ' + self.ClientObj.Name)

@ -143,8 +143,8 @@ class TrayIcon (QtGui.QSystemTrayIcon):
self.setToolTip('cl-console-gui - '+ _('System control')) self.setToolTip('cl-console-gui - '+ _('System control'))
self.setContextMenu(self.right_menu) self.setContextMenu(self.right_menu)
self.update_thread = TrayUpdateSystem(parent) # self.update_thread = TrayUpdateSystem(parent)
self.update_thread.mes_sig.connect(self.showMessage) # self.update_thread.mes_sig.connect(self.showMessage)
def translate(self): def translate(self):
# Translate left click menu # Translate left click menu
@ -169,19 +169,17 @@ class TrayIcon (QtGui.QSystemTrayIcon):
self._parent.currentWidget().tools() self._parent.currentWidget().tools()
def exit(self): def exit(self):
# if self._parent.isVisible(): # if self.update_thread.isRunning():
# self._parent.hide() # text = _('The system is updated')
if self.update_thread.isRunning(): # informative_text = _('Stop updating and exit?')
text = _('The system is updated') # reply = show_question(self._parent, text, informative_text)
informative_text = _('Stop updating and exit?') #
reply = show_question(self._parent, text, informative_text) # if reply == QtGui.QMessageBox.No:
# return 0
if reply == QtGui.QMessageBox.No: #
return 0 # elif reply == QtGui.QMessageBox.Yes:
# self.update_thread.close()
elif reply == QtGui.QMessageBox.Yes: # self.update_thread.wait()
self.update_thread.close()
self.update_thread.wait()
self._parent._closeEvent() self._parent._closeEvent()
@ -254,24 +252,24 @@ class LeftButtonMenu(QtGui.QMenu):
self, triggered=parent.windowVisible) self, triggered=parent.windowVisible)
self.addAction(self.windowVisible) self.addAction(self.windowVisible)
# Add Update system action # # Add Update system action
update_icons = ['system-software-update'] # update_icons = ['system-software-update']
update_icon = QtGui.QIcon() # update_icon = QtGui.QIcon()
for image in update_icons: # for image in update_icons:
update_icon.setThemeName(themeName) # update_icon.setThemeName(themeName)
update_icon = update_icon.fromTheme(image) # update_icon = update_icon.fromTheme(image)
if not update_icon.isNull(): # if not update_icon.isNull():
break # break
update_icon.setThemeName('Tango') # update_icon.setThemeName('Tango')
update_icon = update_icon.fromTheme(image) # update_icon = update_icon.fromTheme(image)
if not update_icon.isNull(): # if not update_icon.isNull():
break # break
#
self.sys_update = QtGui.QAction(update_icon, _("Update system"), \ # self.sys_update = QtGui.QAction(update_icon, _("Update system"), \
self, triggered=parent.start_update_system) # self, triggered=parent.start_update_system)
self.addAction(self.sys_update) # self.addAction(self.sys_update)
#
self.addSeparator() # self.addSeparator()
# Add exit action # Add exit action
exit_icons = ['application-exit', 'system-log-out'] exit_icons = ['application-exit', 'system-log-out']

Loading…
Cancel
Save