def _delete_new_kb_shortcuts_group(dialog, response_id): if response_id == Gtk.ResponseType.ACCEPT: shortcuts.delete_active_custom_shortcuts_xml() shortcuts.set_keyboard_shortcuts() guicomponents.update_shortcuts_combo(dialogs.shortcuts_combo) dialogs.display_keyboard_shortcuts(editorpersistance.prefs.shortcuts, workflow.get_tline_tool_working_set(), dialogs.scroll_hold_panel) dialog.destroy()
def _create_new_kb_shortcuts_group(dialog, response_id, entry): if response_id != Gtk.ResponseType.REJECT: name = entry.get_text() if name == "": # No need for info dialog, user should really get this. dialog.destroy() return custom_xml_file_name = shortcuts.create_custom_shortcuts_xml(name) editorpersistance.prefs.shortcuts = custom_xml_file_name editorpersistance.save() shortcuts.shortcut_files.append(custom_xml_file_name) root = shortcuts.get_root() shortcuts.shortcut_files_display_names.append(root.get('name')) shortcuts.set_keyboard_shortcuts() guicomponents.update_shortcuts_combo(dialogs.shortcuts_combo) dialogs.display_keyboard_shortcuts(editorpersistance.prefs.shortcuts, workflow.get_tline_tool_working_set(), dialogs.scroll_hold_panel) dialog.destroy()