コード例 #1
0
ファイル: treemaincontrol.py プロジェクト: aaray6/TreeLine
 def toolsGenOptions(self):
     """Set general user preferences for all files.
     """
     oldAutoSaveMinutes = globalref.genOptions['AutoSaveMinutes']
     oldColorTheme = globalref.genOptions['ColorTheme']
     dialog = options.OptionDialog(globalref.genOptions,
                                   QApplication.activeWindow())
     dialog.setWindowTitle(_('General Options'))
     if (dialog.exec_() == QDialog.Accepted
             and globalref.genOptions.modified):
         globalref.genOptions.writeFile()
         self.recentFiles.updateOptions()
         if globalref.genOptions['MinToSysTray']:
             self.createTrayIcon()
         elif self.trayIcon:
             self.trayIcon.hide()
         autoSaveMinutes = globalref.genOptions['AutoSaveMinutes']
         for control in self.localControls:
             for window in control.windowList:
                 window.updateWinGenOptions()
             control.structure.undoList.setNumLevels()
             control.updateAll(False)
             if autoSaveMinutes != oldAutoSaveMinutes:
                 control.resetAutoSave()
         if globalref.genOptions['ColorTheme'] != oldColorTheme:
             QMessageBox.warning(
                 QApplication.activeWindow(), 'TreeLine',
                 _('Application must be restarted for '
                   'color theme changes to take effect'))
コード例 #2
0
 def toolsGenOptions(self):
     """Set general user preferences for all files.
     """
     oldAutoSaveMinutes = globalref.genOptions.getValue('AutoSaveMinutes')
     dialog = options.OptionDialog(globalref.genOptions,
                                   QtGui.QApplication.activeWindow())
     dialog.setWindowTitle(_('General Options'))
     if (dialog.exec_() == QtGui.QDialog.Accepted
             and globalref.genOptions.modified):
         globalref.genOptions.writeFile()
         self.recentFiles.updateNumEntries()
         autoSaveMinutes = globalref.genOptions.getValue('AutoSaveMinutes')
         for control in self.localControls:
             for window in control.windowList:
                 window.treeView.updateTreeGenOptions()
             if autoSaveMinutes != oldAutoSaveMinutes:
                 control.resetAutoSave()
         self.updateAllViews()
コード例 #3
0
ファイル: treemaincontrol.py プロジェクト: fanzalika/TreeLine
 def toolsGenOptions(self):
     """Set general user preferences for all files.
     """
     oldAutoSaveMinutes = globalref.genOptions['AutoSaveMinutes']
     dialog = options.OptionDialog(globalref.genOptions,
                                   QApplication.activeWindow())
     dialog.setWindowTitle(_('General Options'))
     if (dialog.exec_() == QDialog.Accepted
             and globalref.genOptions.modified):
         globalref.genOptions.writeFile()
         self.recentFiles.updateOptions()
         autoSaveMinutes = globalref.genOptions['AutoSaveMinutes']
         for control in self.localControls:
             for window in control.windowList:
                 window.updateWinGenOptions()
             control.structure.undoList.setNumLevels()
             control.updateAll(False)
             if autoSaveMinutes != oldAutoSaveMinutes:
                 control.resetAutoSave()