Preferences/ConfigurationPages/ViewmanagerPage.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3010
befeff46ec0f
child 3058
0a02c433f52d
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
31 self.setupUi(self) 31 self.setupUi(self)
32 self.setObjectName("ViewmanagerPage") 32 self.setObjectName("ViewmanagerPage")
33 33
34 # set initial values 34 # set initial values
35 self.pluginManager = e5App().getObject("PluginManager") 35 self.pluginManager = e5App().getObject("PluginManager")
36 self.viewmanagers = self.pluginManager.getPluginDisplayStrings("viewmanager") 36 self.viewmanagers = \
37 self.pluginManager.getPluginDisplayStrings("viewmanager")
37 self.windowComboBox.clear() 38 self.windowComboBox.clear()
38 currentVm = Preferences.getViewManager() 39 currentVm = Preferences.getViewManager()
39 40
40 keys = sorted(self.viewmanagers.keys()) 41 keys = sorted(self.viewmanagers.keys())
41 for key in keys: 42 for key in keys:
42 self.windowComboBox.addItem(self.trUtf8(self.viewmanagers[key]), key) 43 self.windowComboBox.addItem(
44 self.trUtf8(self.viewmanagers[key]), key)
43 currentIndex = self.windowComboBox.findText( 45 currentIndex = self.windowComboBox.findText(
44 self.trUtf8(self.viewmanagers[currentVm])) 46 self.trUtf8(self.viewmanagers[currentVm]))
45 self.windowComboBox.setCurrentIndex(currentIndex) 47 self.windowComboBox.setCurrentIndex(currentIndex)
46 self.on_windowComboBox_activated(currentIndex) 48 self.on_windowComboBox_activated(currentIndex)
47 49
48 self.tabViewGroupBox.setTitle(self.trUtf8(self.viewmanagers["tabview"])) 50 self.tabViewGroupBox.setTitle(
51 self.trUtf8(self.viewmanagers["tabview"]))
49 52
50 self.filenameLengthSpinBox.setValue( 53 self.filenameLengthSpinBox.setValue(
51 Preferences.getUI("TabViewManagerFilenameLength")) 54 Preferences.getUI("TabViewManagerFilenameLength"))
52 self.filenameOnlyCheckBox.setChecked( 55 self.filenameOnlyCheckBox.setChecked(
53 Preferences.getUI("TabViewManagerFilenameOnly")) 56 Preferences.getUI("TabViewManagerFilenameOnly"))
75 78
76 @param index index of selected workspace view type (integer) 79 @param index index of selected workspace view type (integer)
77 """ 80 """
78 workspace = \ 81 workspace = \
79 self.windowComboBox.itemData(self.windowComboBox.currentIndex()) 82 self.windowComboBox.itemData(self.windowComboBox.currentIndex())
80 pixmap = self.pluginManager.getPluginPreviewPixmap("viewmanager", workspace) 83 pixmap = \
84 self.pluginManager.getPluginPreviewPixmap("viewmanager", workspace)
81 85
82 self.previewPixmap.setPixmap(pixmap) 86 self.previewPixmap.setPixmap(pixmap)
83 self.tabViewGroupBox.setEnabled(workspace == "tabview") 87 self.tabViewGroupBox.setEnabled(workspace == "tabview")
84 88
85 89
86 def create(dlg): 90 def create(dlg):
87 """ 91 """
88 Module function to create the configuration page. 92 Module function to create the configuration page.
89 93
90 @param dlg reference to the configuration dialog 94 @param dlg reference to the configuration dialog
95 @return reference to the instantiated page (ConfigurationPageBase)
91 """ 96 """
92 page = ViewmanagerPage() 97 page = ViewmanagerPage()
93 return page 98 return page

eric ide

mercurial