fix position tray menu, fix icon

master3.3
Denis Spiridonov 12 years ago
parent 38c785cd32
commit 9049756303

@ -179,7 +179,10 @@ class TrayIcon (QtGui.QSystemTrayIcon):
# self.showMessage('dialog-warning', 'Left Button', 'Your <b>Click</b> <i>left</i>')
#, PySide.QtGui.QSystemTrayIcon.MessageIcon = Information, int = 10000)
if QtGui.QCursor.pos().y() < self.left_menu.sizeHint().height():
self.left_menu.move(QtGui.QCursor.pos() + QtCore.QPoint(0, 16))
# self.left_menu.move(QtGui.QCursor.pos() + QtCore.QPoint(0, 16))
self.left_menu.move(QtCore.QPoint \
(self.geometry().x(), self.geometry().y()) + \
QtCore.QPoint(0, self.geometry().height() + 8))
else:
point = QtCore.QPoint(self.left_menu.sizeHint().width(), \
self.left_menu.sizeHint().height() + 16)
@ -244,8 +247,7 @@ class LeftButtonMenu(QtGui.QMenu):
update_icon = update_icon.fromTheme(image)
if not update_icon.isNull():
break
update_icon.setThemeName(themeName)
self.sys_update = QtGui.QAction(update_icon, _("Update system"), \
self, triggered=parent.start_update_system)
self.addAction(self.sys_update)
@ -264,7 +266,6 @@ class LeftButtonMenu(QtGui.QMenu):
exit_icon = exit_icon.fromTheme(image)
if not exit_icon.isNull():
break
exit_icon.setThemeName(themeName)
self.exit_action = QtGui.QAction(exit_icon, _('Exit program'), \
self, triggered=parent.exit)
@ -303,7 +304,6 @@ class RightButtonMenu(QtGui.QMenu):
About_icon = About_icon.fromTheme(image)
if not About_icon.isNull():
break
About_icon.setThemeName(themeName)
self.about_action = QtGui.QAction(About_icon, _("About Program"), self, \
triggered=parent.help)
@ -321,7 +321,6 @@ class RightButtonMenu(QtGui.QMenu):
bug_icon = bug_icon.fromTheme(image)
if not bug_icon.isNull():
break
bug_icon.setThemeName(themeName)
self.bug_action = QtGui.QAction(bug_icon, _('Report Bug'), self, \
triggered=parent.bug_report)
@ -341,7 +340,6 @@ class RightButtonMenu(QtGui.QMenu):
tools_icon = tools_icon.fromTheme(image)
if not tools_icon.isNull():
break
tools_icon.setThemeName(themeName)
self.tools_action = QtGui.QAction(tools_icon, _('Program settings'), \
self, triggered=parent.tools)
@ -358,7 +356,6 @@ class RightButtonMenu(QtGui.QMenu):
update_icon = update_icon.fromTheme(image)
if not update_icon.isNull():
break
update_icon.setThemeName(themeName)
self.sys_update = QtGui.QAction(update_icon, _("Update system"), \
self, triggered=parent.start_update_system)
@ -376,8 +373,7 @@ class RightButtonMenu(QtGui.QMenu):
exit_icon = exit_icon.fromTheme(image)
if not exit_icon.isNull():
break
exit_icon.setThemeName(themeName)
self.exit_action = QtGui.QAction(exit_icon, _("Exit program"), \
self, triggered=parent.exit)
self.addAction(self.exit_action)
self.addAction(self.exit_action)

@ -175,7 +175,6 @@ class BugWgt(QtGui.QWidget):
bug_icon = bug_icon.fromTheme(image)
if not bug_icon.isNull():
break
bug_icon.setThemeName(themeName)
self.setWindowIcon (bug_icon)

@ -1304,7 +1304,6 @@ class MainFrame(QtGui.QWidget):
try:
meth_result_temp = self.ClientObj.client.service[0] \
[self.method_name](sid, self.param_object)
print "SEND OKOKOK"
except Exception, e:
msg = e.message
if type (e.message) == tuple:
@ -1452,6 +1451,7 @@ class MainFrame(QtGui.QWidget):
# self.updateGeomerty()
# method changed value table items
# Only for fixed size table
def OnChanged(self, row, column, field):
def wrapper():
table = field.tablevalue

@ -36,7 +36,6 @@ class TopMenu(QtGui.QPushButton):
icon = icon.fromTheme(image)
if not icon.isNull():
break
icon.setThemeName(themeName)
# icon.actualSize(QtCore.QSize(48,48))
pm1 = icon.pixmap(24)
@ -115,7 +114,6 @@ class HelpMenu(TopMenu):
About_icon = About_icon.fromTheme(image)
if not About_icon.isNull():
break
About_icon.setThemeName(themeName)
about = QtGui.QAction(About_icon, _("About Program"), self, \
triggered=self.actions.help)
@ -133,7 +131,6 @@ class HelpMenu(TopMenu):
handbook_icon = handbook_icon.fromTheme(image)
if not handbook_icon.isNull():
break
handbook_icon.setThemeName(themeName)
handbook = QtGui.QAction(handbook_icon, _("System Settings Handbook"), \
self, triggered=self.actions.hand_book)
@ -152,7 +149,6 @@ class HelpMenu(TopMenu):
bug_icon = bug_icon.fromTheme(image)
if not bug_icon.isNull():
break
bug_icon.setThemeName(themeName)
bug = QtGui.QAction(bug_icon, _("Report Bug"), \
self, triggered=self.actions.bug_report)
@ -768,7 +764,6 @@ class ExpertWidget (QtGui.QPushButton):
self.icon = self.icon.fromTheme(image)
if not self.icon.isNull():
break
self.icon.setThemeName(themeName)
pm = self.icon.pixmap(16)
@ -793,7 +788,6 @@ class ExpertWidget (QtGui.QPushButton):
self.icon = self.icon.fromTheme(image)
if not self.icon.isNull():
break
self.icon.setThemeName(themeName)
pm = self.icon.pixmap(16)

Loading…
Cancel
Save