Address broken translations and increase readibility of button insertion
This commit is contained in:
parent
89caa6ef75
commit
5e4324accb
@ -51,22 +51,21 @@ class Models(QDialog):
|
|||||||
box = f.buttonBox
|
box = f.buttonBox
|
||||||
|
|
||||||
default_buttons = [
|
default_buttons = [
|
||||||
("Add", self.onAdd),
|
(_("Add"), self.onAdd),
|
||||||
("Rename", self.onRename),
|
(_("Rename"), self.onRename),
|
||||||
("Delete", self.onDelete),
|
(_("Delete"), self.onDelete),
|
||||||
("Options...", self.onAdvanced),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if self.fromMain:
|
if self.fromMain:
|
||||||
from_main_buttons = [
|
default_buttons.extend([
|
||||||
("Fields...", self.onFields),
|
(_("Fields..."), self.onFields),
|
||||||
("Cards...", self.onCards),
|
(_("Cards..."), self.onCards),
|
||||||
]
|
])
|
||||||
|
|
||||||
default_buttons[-1:-1] = from_main_buttons
|
default_buttons.append((_("Options..."), self.onAdvanced))
|
||||||
|
|
||||||
for label, func in gui_hooks.models_did_init_buttons(default_buttons, self):
|
for label, func in gui_hooks.models_did_init_buttons(default_buttons, self):
|
||||||
button = box.addButton(_(label), QDialogButtonBox.ActionRole)
|
button = box.addButton(label, QDialogButtonBox.ActionRole)
|
||||||
qconnect(button.clicked, func)
|
qconnect(button.clicked, func)
|
||||||
|
|
||||||
qconnect(f.modelsList.itemDoubleClicked, self.onRename)
|
qconnect(f.modelsList.itemDoubleClicked, self.onRename)
|
||||||
|
Loading…
Reference in New Issue
Block a user