def __init__(self, parent):
     SubWindow.__init__(self, parent)
     icon = QIcon(QPixmap(os.path.join(Globals.config['main:system_picture_path'], 'logwin.xpm')))
     self.setWindowIcon(icon)
     self.setWindowTitle(QCoreApplication.translate('LogWindow', 'Log Messages'))
     self.setMinimumSize(500, 100)
     self.logView = LogViewWidget(self)
     self.setWidget(self.logView)
     tmp = Globals.logLevels.items()
     tmp.sort(lambda a,b: cmp(a[1], b[1]))
     self.levels = [l[0] for l in tmp]
     self.logView.ThresholdSelector.addItems(self.levels)
     self.handler = TextBrowserHandler()
     self.handler.setBrowser(self.logView.TextArea, self)
     try:
         i = self.levels.index(Globals.config['main:log_threshold'])
         self.logView.ThresholdSelector.setCurrentIndex(i)
         self.setThreshold(i)
     except:
         self.logView.ThresholdSelector.setCurrentIndex(0)
         self.setThreshold(0)
     self.connect(self.logView.SaveButton, SIGNAL("pressed()"), self.saveWindow)
     self.connect(self.logView.ThresholdSelector, SIGNAL("activated(int)"), self.setThreshold)
     self.hideOnClose = True
     self.toggleVisibleAction.setIcon(icon)
     self.toggleVisibleAction.setText(QCoreApplication.translate('LogWindow', '&Log window'))
     self.toggleVisibleAction.setShortcut(QCoreApplication.translate('LogWindow', 'Ctrl+L'))
     self.toggleVisibleAction.setStatusTip(QCoreApplication.translate('LogWindow', 'Log window'))
    def __init__(self, parent):
        SubWindow.__init__(self, parent)
        icon = QIcon(QPixmap(os.path.join(Globals.config['main:system_picture_path'], 'pibrowser.xpm')))
        self.setWindowIcon(icon)
        self.setWindowTitle(QCoreApplication.translate('PlugInBrowser', 'PlugIns'))
        self.browser = PlugInBrowserWidget(self)
        self.setWidget(self.browser)
        self.plugInManager = Globals.mainWin.plugInManager

        self.toggleVisibleAction.setIcon(icon)
        self.toggleVisibleAction.setText(QCoreApplication.translate('PlugInBrowser', 'PlugIn &browser'))
        self.toggleVisibleAction.setStatusTip(QCoreApplication.translate('PlugInBrowser', 'PlugIn Browser'))
        self.updateList()