From 8148bc9c8c113c41fcb18b397669b1f13447c653 Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 6 Sep 2012 02:27:04 +0900 Subject: more generic error handler in EipConductorAppMixin documentation of the Exception Hierarchy and attributes. also a bit of general cleanup around error handling in conductor. Hopefully to be polished an abstracted to leap.base with time. not all errors are converted (and the old with_errors/ignoring errors) are still there, but we should be using this style of handlers from now on. wrapping up with this pseudo-feature for now. as we work on individual features we can mimick the exceptions that are working. --- src/leap/baseapp/mainwindow.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/leap/baseapp/mainwindow.py') diff --git a/src/leap/baseapp/mainwindow.py b/src/leap/baseapp/mainwindow.py index e87f5844..10b23d9a 100644 --- a/src/leap/baseapp/mainwindow.py +++ b/src/leap/baseapp/mainwindow.py @@ -5,18 +5,18 @@ import logging from PyQt4 import QtCore from PyQt4 import QtGui -from leap.baseapp.eip import EIPConductorApp -from leap.baseapp.log import LogPane -from leap.baseapp.systray import StatusAwareTrayIcon -from leap.baseapp.leap_app import MainWindow +from leap.baseapp.eip import EIPConductorAppMixin +from leap.baseapp.log import LogPaneMixin +from leap.baseapp.systray import StatusAwareTrayIconMixin +from leap.baseapp.leap_app import MainWindowMixin logger = logging.getLogger(name=__name__) class LeapWindow(QtGui.QMainWindow, - MainWindow, EIPConductorApp, - StatusAwareTrayIcon, - LogPane): + MainWindowMixin, EIPConductorAppMixin, + StatusAwareTrayIconMixin, + LogPaneMixin): """ main window for the leap app. Initializes all of its base classes @@ -34,9 +34,9 @@ class LeapWindow(QtGui.QMainWindow, super(LeapWindow, self).__init__() if self.debugmode: self.createLogBrowser() - EIPConductorApp.__init__(self, opts=opts) - StatusAwareTrayIcon.__init__(self) - MainWindow.__init__(self) + EIPConductorAppMixin.__init__(self, opts=opts) + StatusAwareTrayIconMixin.__init__(self) + MainWindowMixin.__init__(self) # bind signals # XXX move to parent classes init?? -- cgit v1.2.3