summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7767ad4)
showError displays a QErrorMessage, usually when catchin a AppError
containing an errorstring to display
import sys
import os
from PyQt4 import QtGui
import sys
import os
from PyQt4 import QtGui
+from PyQt4.QtCore import SIGNAL
from apperror import AppError
from settings import appconf
from apperror import AppError
from settings import appconf
self.trayIcon.show()
self.setWindowTitle("Profile manager / Dboxswitch - dropbox profile switcher")
self.trayIcon.show()
self.setWindowTitle("Profile manager / Dboxswitch - dropbox profile switcher")
self.profileManager = prManager
self.profileManager = prManager
def createTrayIcon(self):
def createTrayIcon(self):
+ #context menu build, right click
self.trayIconMenu = QtGui.QMenu(self)
self.trayIconMenu.addAction(self.manageprofiles)
self.trayIconMenu.addSeparator()
self.trayIconMenu = QtGui.QMenu(self)
self.trayIconMenu.addAction(self.manageprofiles)
self.trayIconMenu.addSeparator()
self.trayIcon.setContextMenu(self.trayIconMenu)
#baloon on hover
self.trayIcon.setToolTip(appconf.appname+" "+appconf.appversion+"\nRight Click to manage profiles.")
self.trayIcon.setContextMenu(self.trayIconMenu)
#baloon on hover
self.trayIcon.setToolTip(appconf.appname+" "+appconf.appversion+"\nRight Click to manage profiles.")
+ def showError(self, err):
+ """ Display an error message """
+ self.setWindowTitle("Error - Dboxswitch - dropbox profile switcher")
+ self.resize(200, 100)
+ err = QtGui.QErrorMessage.showMessage(QtGui.QErrorMessage.qtHandler(), "Error: "+err)
+
+
+