Preferences/ConfigurationPages/InterfacePage.py

changeset 3190
a9a94491c4fd
parent 3186
a05eff845522
child 3484
645c12de6b0c
equal deleted inserted replaced
3189:9a21c547de5f 3190:a9a94491c4fd
206 """ 206 """
207 Private method to populate the style combo box. 207 Private method to populate the style combo box.
208 """ 208 """
209 curStyle = Preferences.getUI("Style") 209 curStyle = Preferences.getUI("Style")
210 styles = sorted(list(QStyleFactory.keys())) 210 styles = sorted(list(QStyleFactory.keys()))
211 self.styleComboBox.addItem(self.trUtf8('System'), "System") 211 self.styleComboBox.addItem(self.tr('System'), "System")
212 for style in styles: 212 for style in styles:
213 self.styleComboBox.addItem(style, style) 213 self.styleComboBox.addItem(style, style)
214 currentIndex = self.styleComboBox.findData(curStyle) 214 currentIndex = self.styleComboBox.findData(curStyle)
215 if currentIndex == -1: 215 if currentIndex == -1:
216 currentIndex = 0 216 currentIndex = 0
249 except ValueError: 249 except ValueError:
250 currentIndex = 0 250 currentIndex = 0
251 self.languageComboBox.clear() 251 self.languageComboBox.clear()
252 252
253 self.languageComboBox.addItem("English (default)", "None") 253 self.languageComboBox.addItem("English (default)", "None")
254 self.languageComboBox.addItem(self.trUtf8('System'), "System") 254 self.languageComboBox.addItem(self.tr('System'), "System")
255 for locale in localeList: 255 for locale in localeList:
256 self.languageComboBox.addItem(locales[locale], locale) 256 self.languageComboBox.addItem(locales[locale], locale)
257 self.languageComboBox.setCurrentIndex(currentIndex) 257 self.languageComboBox.setCurrentIndex(currentIndex)
258 258
259 @pyqtSlot() 259 @pyqtSlot()
261 """ 261 """
262 Private method to select the style sheet file via a dialog. 262 Private method to select the style sheet file via a dialog.
263 """ 263 """
264 file = E5FileDialog.getOpenFileName( 264 file = E5FileDialog.getOpenFileName(
265 self, 265 self,
266 self.trUtf8("Select style sheet file"), 266 self.tr("Select style sheet file"),
267 self.styleSheetEdit.text(), 267 self.styleSheetEdit.text(),
268 self.trUtf8( 268 self.tr(
269 "Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;" 269 "Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;"
270 "All files (*)")) 270 "All files (*)"))
271 271
272 if file: 272 if file:
273 self.styleSheetEdit.setText(Utilities.toNativeSeparators(file)) 273 self.styleSheetEdit.setText(Utilities.toNativeSeparators(file))

eric ide

mercurial