Preferences/ConfigurationPages/ViewmanagerPage.py

changeset 7
c679fb30c8f3
parent 6
52e8c820d0dd
child 12
1d8dd9706f46
--- a/Preferences/ConfigurationPages/ViewmanagerPage.py	Mon Dec 28 18:31:37 2009 +0000
+++ b/Preferences/ConfigurationPages/ViewmanagerPage.py	Wed Dec 30 15:40:33 2009 +0000
@@ -9,7 +9,7 @@
 
 import os
 
-from PyQt4.QtCore import pyqtSlot,  QVariant
+from PyQt4.QtCore import pyqtSlot
 from PyQt4.QtGui import QPixmap
 
 from E4Gui.E4Application import e4App
@@ -41,8 +41,7 @@
         
         keys = sorted(self.viewmanagers.keys())
         for key in keys:
-            self.windowComboBox.addItem(self.trUtf8(self.viewmanagers[key]), 
-                                        QVariant(key))
+            self.windowComboBox.addItem(self.trUtf8(self.viewmanagers[key]), key)
         currentIndex = self.windowComboBox.findText(\
             self.trUtf8(self.viewmanagers[currentVm]))
         self.windowComboBox.setCurrentIndex(currentIndex)
@@ -62,12 +61,12 @@
         Public slot to save the Viewmanager configuration.
         """
         vm = \
-            self.windowComboBox.itemData(self.windowComboBox.currentIndex()).toString()
+            self.windowComboBox.itemData(self.windowComboBox.currentIndex())
         Preferences.setViewManager(vm)
         Preferences.setUI("TabViewManagerFilenameLength",
             self.filenameLengthSpinBox.value())
         Preferences.setUI("TabViewManagerFilenameOnly",
-            int(self.filenameOnlyCheckBox.isChecked()))
+            self.filenameOnlyCheckBox.isChecked())
         Preferences.setUI("RecentNumber", 
             self.recentFilesSpinBox.value())
         
@@ -79,7 +78,7 @@
         @param index index of selected workspace view type (integer)
         """
         workspace = \
-            self.windowComboBox.itemData(self.windowComboBox.currentIndex()).toString()
+            self.windowComboBox.itemData(self.windowComboBox.currentIndex())
         pixmap = self.pluginManager.getPluginPreviewPixmap("viewmanager", workspace)
         
         self.previewPixmap.setPixmap(pixmap)

eric ide

mercurial