def __init__(self, application, mainWnd): super(TrayIconControllerBase, self).__init__() self.mainWnd = mainWnd self._application = application self.config = TrayConfig(self._application.config) self._trayIcon = None
def __init__(self, application, mainWnd, iconFileName): super(TrayIconController, self).__init__() self.mainWnd = mainWnd self._application = application self._iconFileName = iconFileName self.config = TrayConfig(self._application.config) self._trayIcon = self._createTrayIcon() self._bind()
def showMainWindow(self, allowMinimizingMainWindow=True): config = TrayConfig(self._application.config) if config.startIconized.value and allowMinimizingMainWindow: self.mainWnd.Iconize(True) else: self.mainWnd.Show() self.mainWnd.taskBarIconController.updateTrayIcon()
def showMainWindow(self): config = TrayConfig(self._application.config) if (config.startIconized.value and not self._application.sharedData.get( APP_DATA_DISABLE_MINIMIZING, False)): self.mainWnd.Iconize(True) else: self.mainWnd.Show() self.mainWnd.taskBarIconController.updateTrayIcon()
def testChange(self): newConfig = TrayConfig(self.config) newConfig.minimizeToTray.value = False self.assertEqual(self.trayConfig.minimizeToTray.value, False) newConfig.startIconized.value = True self.assertEqual(self.trayConfig.startIconized.value, True) newConfig.alwaysShowTrayIcon.value = True self.assertEqual(self.trayConfig.alwaysShowTrayIcon.value, True)
def __init__(self, parent): super(TrayPanel, self).__init__(parent) self.trayConfig = TrayConfig(Application.config) self.__createTrayGui() self.__set_properties() self.__do_layout() self.Bind(wx.EVT_CHECKBOX, self.onMinimizeToTray, self.minimizeCheckBox) self.LoadState() self.updateCheckState() self.SetupScrolling()
def __init__(self, parent): super(type(self), self).__init__(parent) self.trayConfig = TrayConfig(Application.config) self.generalConfig = GeneralGuiConfig(Application.config) self.mainWindowConfig = MainWindowConfig(Application.config) self.i18nConfig = outwiker.core.i18n.I18nConfig(Application.config) self.MIN_AUTOSAVE_INTERVAL = 0 self.MAX_AUTOSAVE_INTERVAL = 3600 self.MIN_HISTORY_LENGTH = 0 self.MAX_HISTORY_LENGTH = 30 self.PAGE_TAB_COMBO_WIDTH = 200 self.LANG_COMBO_WIDTH = 200 self.pageTabChoises = [ (_(u'Recent used'), GeneralGuiConfig.PAGE_TAB_RECENT), (_(u'Preview'), GeneralGuiConfig.PAGE_TAB_RESULT), (_(u'Edit'), GeneralGuiConfig.PAGE_TAB_CODE), ] # Номер элемента при выборе "Авто" в списке языков self.__autoIndex = 0 self.__createTrayGui() self.__createMiscGui() self.__createAutosaveGui(self.generalConfig) self.__createHistoryGui(self.generalConfig) self.__createTitleFormatGui() self.__createDateTimeFormatGui(self.generalConfig) self.__createOpenPageTabGui() self.__createLanguageGui() self.__set_properties() self.__do_layout() self.Bind(wx.EVT_CHECKBOX, self.onMinimizeToTray, self.minimizeCheckBox) self.LoadState() self.updateCheckState() self._setScrolling()
def setUp(self): self.path = "../test/testconfig.ini" self.config = Config(self.path) self.trayConfig = TrayConfig(self.config)