Preferences/ConfigurationPages/EditorFilePage.py

changeset 746
d80c427636a4
parent 743
c58faf72e308
child 791
9ec2ac20e54e
equal deleted inserted replaced
744:2b850514083b 746:d80c427636a4
122 Preferences.setEditor("AdditionalSaveFilters", self.saveFileFilters) 122 Preferences.setEditor("AdditionalSaveFilters", self.saveFileFilters)
123 123
124 def __setDefaultFiltersLists(self, keepSelection = False): 124 def __setDefaultFiltersLists(self, keepSelection = False):
125 """ 125 """
126 Private slot to set the default file filter combo boxes. 126 Private slot to set the default file filter combo boxes.
127
128 @param keepSelection flag indicating to keep the current selection
129 if possible (boolean)
127 """ 130 """
128 if keepSelection: 131 if keepSelection:
129 selectedOpenFilter = self.openFilesFilterComboBox.currentText() 132 selectedOpenFilter = self.openFilesFilterComboBox.currentText()
130 selectedSaveFilter = self.saveFilesFilterComboBox.currentText() 133 selectedSaveFilter = self.saveFilesFilterComboBox.currentText()
131 134
178 181
179 if filter.count("*") == 0: 182 if filter.count("*") == 0:
180 E5MessageBox.critical(self, 183 E5MessageBox.critical(self,
181 self.trUtf8("Add File Filter"), 184 self.trUtf8("Add File Filter"),
182 self.trUtf8("""A File Filter must contain at least one""" 185 self.trUtf8("""A File Filter must contain at least one"""
183 """ wildcard pattern.""")\ 186 """ wildcard pattern."""))
184 .format(filter.count("*")))
185 return False 187 return False
186 188
187 return True 189 return True
188 190
189 @pyqtSlot() 191 @pyqtSlot()
231 233
232 @pyqtSlot(bool) 234 @pyqtSlot(bool)
233 def on_openFiltersButton_toggled(self, checked): 235 def on_openFiltersButton_toggled(self, checked):
234 """ 236 """
235 Private slot to switch the list of file filters. 237 Private slot to switch the list of file filters.
238
239 @param checked flag indicating the check state of the button (boolean)
236 """ 240 """
237 self.__extractFileFilters() 241 self.__extractFileFilters()
238 self.__showsOpenFilters = checked 242 self.__showsOpenFilters = checked
239 self.fileFiltersList.clear() 243 self.fileFiltersList.clear()
240 if checked: 244 if checked:

eric ide

mercurial