Preferences/ConfigurationPages/IconsPage.py

changeset 5599
033967644b1f
parent 5389
9b1c800daff3
child 6048
82ad8ec9548c
equal deleted inserted replaced
5597:3d88d53f8c2b 5599:033967644b1f
34 34
35 self.iconDirectoryPicker.setMode(E5PathPickerModes.DirectoryMode) 35 self.iconDirectoryPicker.setMode(E5PathPickerModes.DirectoryMode)
36 36
37 # set initial values 37 # set initial values
38 dirList = Preferences.getIcons("Path")[:] 38 dirList = Preferences.getIcons("Path")[:]
39 for dir in dirList: 39 for directory in dirList:
40 if dir: 40 if directory:
41 QListWidgetItem(dir, self.iconDirectoryList) 41 QListWidgetItem(directory, self.iconDirectoryList)
42 42
43 def save(self): 43 def save(self):
44 """ 44 """
45 Public slot to save the Icons configuration. 45 Public slot to save the Icons configuration.
46 """ 46 """
122 @pyqtSlot() 122 @pyqtSlot()
123 def on_addIconDirectoryButton_clicked(self): 123 def on_addIconDirectoryButton_clicked(self):
124 """ 124 """
125 Private slot to add the icon directory displayed to the listbox. 125 Private slot to add the icon directory displayed to the listbox.
126 """ 126 """
127 dir = self.iconDirectoryPicker.text() 127 directory = self.iconDirectoryPicker.text()
128 if dir: 128 if directory:
129 QListWidgetItem(dir, self.iconDirectoryList) 129 QListWidgetItem(directory, self.iconDirectoryList)
130 self.iconDirectoryPicker.clear() 130 self.iconDirectoryPicker.clear()
131 row = self.iconDirectoryList.currentRow() 131 row = self.iconDirectoryList.currentRow()
132 self.on_iconDirectoryList_currentRowChanged(row) 132 self.on_iconDirectoryList_currentRowChanged(row)
133 133
134 @pyqtSlot() 134 @pyqtSlot()
145 @pyqtSlot() 145 @pyqtSlot()
146 def on_showIconsButton_clicked(self): 146 def on_showIconsButton_clicked(self):
147 """ 147 """
148 Private slot to display a preview of an icons directory. 148 Private slot to display a preview of an icons directory.
149 """ 149 """
150 dir = self.iconDirectoryPicker.text() 150 directory = self.iconDirectoryPicker.text()
151 if not dir: 151 if not directory:
152 itm = self.iconDirectoryList.currentItem() 152 itm = self.iconDirectoryList.currentItem()
153 if itm is not None: 153 if itm is not None:
154 dir = itm.text() 154 directory = itm.text()
155 if dir: 155 if directory:
156 from .IconsPreviewDialog import IconsPreviewDialog 156 from .IconsPreviewDialog import IconsPreviewDialog
157 dlg = IconsPreviewDialog(self, dir) 157 dlg = IconsPreviewDialog(self, directory)
158 dlg.exec_() 158 dlg.exec_()
159 159
160 160
161 def create(dlg): 161 def create(dlg):
162 """ 162 """

eric ide

mercurial