mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-22 15:44:59 +00:00
Mark temporary workaround with TODO and comment original code
This commit is contained in:
@@ -76,8 +76,10 @@ class GeneralOptionsPage(OptionsPage):
|
||||
self.ui.check_for_updates.setChecked(config.setting["check_for_updates"])
|
||||
self.ui.update_level.clear()
|
||||
for level, description in PROGRAM_UPDATE_LEVELS.items():
|
||||
temp_text = description['title']
|
||||
self.ui.update_level.addItem(_(temp_text), level)
|
||||
# TODO: Remove temporary workaround once https://github.com/python-babel/babel/issues/415 has been resolved.
|
||||
babel_415_workaround = description['title']
|
||||
self.ui.update_level.addItem(_(babel_415_workaround), level)
|
||||
#self.ui.update_level.addItem(description['title'], level)
|
||||
self.ui.update_level.setCurrentIndex(self.ui.update_level.findData(config.setting["update_level"]))
|
||||
self.ui.update_check_days.setValue(config.setting["update_check_days"])
|
||||
else:
|
||||
|
||||
@@ -218,8 +218,10 @@ class InterfaceOptionsPage(OptionsPage):
|
||||
list_item = ToolbarListItem(action)
|
||||
list_item.setToolTip(_('Drag and Drop to re-order'))
|
||||
if action in self.TOOLBAR_BUTTONS:
|
||||
temp_text = self.TOOLBAR_BUTTONS[action]['label']
|
||||
list_item.setText(_(temp_text))
|
||||
# TODO: Remove temporary workaround once https://github.com/python-babel/babel/issues/415 has been resolved.
|
||||
babel_415_workaround = self.TOOLBAR_BUTTONS[action]['label']
|
||||
list_item.setText(_(babel_415_workaround))
|
||||
#list_item.setText(self.TOOLBAR_BUTTONS[action]['label'])
|
||||
list_item.setIcon(icontheme.lookup(self._get_icon_from_name(action), icontheme.ICON_SIZE_MENU))
|
||||
else:
|
||||
list_item.setText(self.SEPARATOR)
|
||||
@@ -288,12 +290,14 @@ class AddActionDialog(QtWidgets.QDialog):
|
||||
|
||||
layout = QtWidgets.QVBoxLayout(self)
|
||||
|
||||
temp_list = []
|
||||
# TODO: Remove temporary workaround once https://github.com/python-babel/babel/issues/415 has been resolved.
|
||||
babel_415_workaround_list = []
|
||||
for action in action_list:
|
||||
temp_text = self.parent().TOOLBAR_BUTTONS[action]['label']
|
||||
temp_list.append([_(temp_text), action])
|
||||
|
||||
self.action_list = sorted(temp_list)
|
||||
babel_415_workaround = self.parent().TOOLBAR_BUTTONS[action]['label']
|
||||
temp_list.append([_(babel_415_workaround), action])
|
||||
self.action_list = sorted(babel_415_workaround_list)
|
||||
#self.action_list = sorted([[self.parent().TOOLBAR_BUTTONS[action]['label'], action]
|
||||
# for action in action_list])
|
||||
|
||||
self.combo_box = QtWidgets.QComboBox(self)
|
||||
self.combo_box.addItems([label for label, action in self.action_list])
|
||||
|
||||
@@ -144,13 +144,15 @@ class UpdateCheckManager(QtCore.QObject):
|
||||
webbrowser2.open(self._available_versions[key]['urls']['download'])
|
||||
else:
|
||||
if self._show_always:
|
||||
update_level_text = PROGRAM_UPDATE_LEVELS[self._update_level]['title'] if self._update_level in PROGRAM_UPDATE_LEVELS else 'unknown'
|
||||
# TODO: Remove temporary workaround once https://github.com/python-babel/babel/issues/415 has been resolved.
|
||||
babel_415_workaround = PROGRAM_UPDATE_LEVELS[self._update_level]['title'] if self._update_level in PROGRAM_UPDATE_LEVELS else 'unknown'
|
||||
QMessageBox.information(
|
||||
self._parent,
|
||||
_("Picard Update"),
|
||||
_("There is no update currently available for your subscribed update level: {update_level}\n\n"
|
||||
"Your version: {picard_old_version}\n").format(
|
||||
update_level=_(update_level_text),
|
||||
update_level=_(babel_415_workaround),
|
||||
#update_level=PROGRAM_UPDATE_LEVELS[self._update_level]['title'] if self._update_level in PROGRAM_UPDATE_LEVELS else _('unknown'),
|
||||
picard_old_version=PICARD_FANCY_VERSION_STR,
|
||||
),
|
||||
QMessageBox.Ok, QMessageBox.Ok
|
||||
|
||||
Reference in New Issue
Block a user