222 def __populateStyleCombo(self): |
222 def __populateStyleCombo(self): |
223 """ |
223 """ |
224 Private method to populate the style combo box. |
224 Private method to populate the style combo box. |
225 """ |
225 """ |
226 curStyle = Preferences.getUI("Style") |
226 curStyle = Preferences.getUI("Style") |
227 styles = sorted(list(QStyleFactory.keys())) |
227 styles = sorted(QStyleFactory.keys()) |
228 self.styleComboBox.addItem(self.tr('System'), "System") |
228 self.styleComboBox.addItem(self.tr('System'), "System") |
229 for style in styles: |
229 for style in styles: |
230 self.styleComboBox.addItem(style, style) |
230 self.styleComboBox.addItem(style, style) |
231 currentIndex = self.styleComboBox.findData(curStyle) |
231 currentIndex = self.styleComboBox.findData(curStyle) |
232 if currentIndex == -1: |
232 if currentIndex == -1: |
255 translator.translate( |
255 translator.translate( |
256 "InterfacePage", "English", |
256 "InterfacePage", "English", |
257 "Translate this with your language") + |
257 "Translate this with your language") + |
258 " ({0})".format(locale) |
258 " ({0})".format(locale) |
259 ) |
259 ) |
260 localeList = sorted(list(locales.keys())) |
260 localeList = sorted(locales.keys()) |
261 try: |
261 try: |
262 uiLanguage = Preferences.getUILanguage() |
262 uiLanguage = Preferences.getUILanguage() |
263 if uiLanguage == "None" or uiLanguage is None: |
263 if uiLanguage == "None" or uiLanguage is None: |
264 currentIndex = 0 |
264 currentIndex = 0 |
265 elif uiLanguage == "System": |
265 elif uiLanguage == "System": |