Preferences/ConfigurationPages/ViewmanagerPage.py

changeset 3010
befeff46ec0f
parent 2964
84b65fb9e780
child 3025
67064c71df21
child 3057
10516539f238
equal deleted inserted replaced
3009:bf5ae5d7477d 3010:befeff46ec0f
29 self.setupUi(self) 29 self.setupUi(self)
30 self.setObjectName("ViewmanagerPage") 30 self.setObjectName("ViewmanagerPage")
31 31
32 # set initial values 32 # set initial values
33 self.pluginManager = e5App().getObject("PluginManager") 33 self.pluginManager = e5App().getObject("PluginManager")
34 self.viewmanagers = self.pluginManager.getPluginDisplayStrings("viewmanager") 34 self.viewmanagers = \
35 self.pluginManager.getPluginDisplayStrings("viewmanager")
35 self.windowComboBox.clear() 36 self.windowComboBox.clear()
36 currentVm = Preferences.getViewManager() 37 currentVm = Preferences.getViewManager()
37 38
38 keys = sorted(self.viewmanagers.keys()) 39 keys = sorted(self.viewmanagers.keys())
39 for key in keys: 40 for key in keys:
40 self.windowComboBox.addItem(self.trUtf8(self.viewmanagers[key]), key) 41 self.windowComboBox.addItem(
42 self.trUtf8(self.viewmanagers[key]), key)
41 currentIndex = self.windowComboBox.findText( 43 currentIndex = self.windowComboBox.findText(
42 self.trUtf8(self.viewmanagers[currentVm])) 44 self.trUtf8(self.viewmanagers[currentVm]))
43 self.windowComboBox.setCurrentIndex(currentIndex) 45 self.windowComboBox.setCurrentIndex(currentIndex)
44 self.on_windowComboBox_activated(currentIndex) 46 self.on_windowComboBox_activated(currentIndex)
45 47
46 self.tabViewGroupBox.setTitle(self.trUtf8(self.viewmanagers["tabview"])) 48 self.tabViewGroupBox.setTitle(
49 self.trUtf8(self.viewmanagers["tabview"]))
47 50
48 self.filenameLengthSpinBox.setValue( 51 self.filenameLengthSpinBox.setValue(
49 Preferences.getUI("TabViewManagerFilenameLength")) 52 Preferences.getUI("TabViewManagerFilenameLength"))
50 self.filenameOnlyCheckBox.setChecked( 53 self.filenameOnlyCheckBox.setChecked(
51 Preferences.getUI("TabViewManagerFilenameOnly")) 54 Preferences.getUI("TabViewManagerFilenameOnly"))
73 76
74 @param index index of selected workspace view type (integer) 77 @param index index of selected workspace view type (integer)
75 """ 78 """
76 workspace = \ 79 workspace = \
77 self.windowComboBox.itemData(self.windowComboBox.currentIndex()) 80 self.windowComboBox.itemData(self.windowComboBox.currentIndex())
78 pixmap = self.pluginManager.getPluginPreviewPixmap("viewmanager", workspace) 81 pixmap = \
82 self.pluginManager.getPluginPreviewPixmap("viewmanager", workspace)
79 83
80 self.previewPixmap.setPixmap(pixmap) 84 self.previewPixmap.setPixmap(pixmap)
81 self.tabViewGroupBox.setEnabled(workspace == "tabview") 85 self.tabViewGroupBox.setEnabled(workspace == "tabview")
82 86
83 87

eric ide

mercurial