def _locale_sort_artist_album_songs(artists): """Locale sort dictionary @artists by Artist, then Album; each artist in @artists should already contain songs grouped by album and sorted by track number. """ for artist in utils.locale_sort(artists): artist_songs = artists[artist] albums = {} albumkey = lambda song: song["album"] for album, songs in itertools.groupby(artist_songs, albumkey): albums[album] = list(songs) for album in utils.locale_sort(albums): for song in albums[album]: yield song
def _locale_sort_artist_album_songs(artists): """Locale sort dictionary @artists by Artist, then Album; each artist in @artists should already contain songs grouped by album and sorted by track number. """ for artist in utils.locale_sort(artists): artist_songs = artists[artist] albums = {} albumkey = lambda song: song["album"] for album, songs in itertools.groupby(artist_songs, albumkey): albums.setdefault(album, []).extend(songs) for album in utils.locale_sort(albums): for song in albums[album]: yield song
def get_items(self): albums = {} for song in self.leaf.object: album = song["album"] album_list = albums.get(album, []) album_list.append(song) albums[album] = album_list names = utils.locale_sort(albums) names.sort(key=lambda name: albums[name][0]['date']) for album in names: yield AlbumLeaf(albums[album], album)
def get_actions_for_file(fileleaf): acts = [RevealFile(), ] app_actions = [] default = None if fileleaf.is_dir(): acts.append(OpenTerminal()) default = OpenDirectory() elif fileleaf.is_valid(): gfile = gio.File(fileleaf.object) info = gfile.query_info(gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE) content_type = info.get_attribute_string(gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE) def_app = gio.app_info_get_default_for_type(content_type, False) def_key = def_app.get_id() if def_app else None apps_for_type = gio.app_info_get_all_for_type(content_type) apps = {} for info in apps_for_type: key = info.get_id() if key not in apps: try: is_default = (key == def_key) app = OpenWith(info, is_default) apps[key] = app except InvalidDataError: pass if def_key: if not def_key in apps: pretty.print_debug("No default found for %s, but found %s" % (fileleaf, apps)) else: app_actions.append(apps.pop(def_key)) # sort the non-default OpenWith actions open_with_sorted = utils.locale_sort(apps.values()) app_actions.extend(open_with_sorted) if fileleaf._is_executable(): acts.extend((Execute(), Execute(in_terminal=True))) elif app_actions: default = app_actions.pop(0) else: app_actions.append(Show()) if app_actions: acts.extend(app_actions) if default: acts.insert(0, default) return acts
def _update_alternative_combobox(self, category_key, combobox): """ Alternatives changed """ combobox_store = combobox.get_model() combobox_store.clear() setctl = settings.GetSettingsController() term_id = setctl.get_preferred_tool(category_key) # fill in the available alternatives alternatives = utils.locale_sort( setctl.get_valid_alternative_ids(category_key), key=lambda t:t[1]) term_iter = None for (id_, name) in alternatives: _it = combobox_store.append((name, id_)) if id_ == term_id: term_iter = _it # Update selection term_iter = term_iter or combobox_store.get_iter_first() combobox.set_active_iter(term_iter)
def _update_alternative_combobox(self, category_key, combobox): """ Alternatives changed """ combobox_store = combobox.get_model() combobox_store.clear() setctl = settings.GetSettingsController() term_id = setctl.get_preferred_tool(category_key) # fill in the available alternatives alternatives = utils.locale_sort( setctl.get_valid_alternative_ids(category_key), key=lambda t: t[1]) term_iter = None for (id_, name) in alternatives: _it = combobox_store.append((name, id_)) if id_ == term_id: term_iter = _it # Update selection term_iter = term_iter or combobox_store.get_iter_first() combobox.set_sensitive(len(combobox_store) > 1) if term_iter: combobox.set_active_iter(term_iter)
def __init__(self): """Load ui from data file""" builder = gtk.Builder() builder.set_translation_domain(version.PACKAGE_NAME) ui_file = config.get_data_file("preferences.ui") if ui_file: builder.add_from_file(ui_file) else: self.window = None return builder.connect_signals(self) self.window = builder.get_object("preferenceswindow") self.window.set_position(gtk.WIN_POS_CENTER) self.window.connect("delete-event", self._close_window) self.pluglist_parent = builder.get_object("plugin_list_parent") self.dirlist_parent = builder.get_object("directory_list_parent") self.plugin_about_parent = builder.get_object("plugin_about_parent") self.preferences_notebook = builder.get_object("preferences_notebook") self.buttonremovedirectory = builder.get_object("buttonremovedirectory") checkautostart = builder.get_object("checkautostart") checkstatusicon = builder.get_object("checkstatusicon") checkcloseonunfocus = builder.get_object("checkcloseonunfocus") checkusecommandkeys = builder.get_object("checkusecommandkeys") self.entry_plugins_filter = builder.get_object('entry_plugins_filter') self.keybindings_list_parent = builder.get_object('keybindings_list_parent') self.gkeybindings_list_parent = builder.get_object('gkeybindings_list_parent') source_list_parent = builder.get_object("source_list_parent") self.sources_list_ctrl = SourceListController(source_list_parent) setctl = settings.GetSettingsController() checkautostart.set_active(self._get_should_autostart()) checkstatusicon.set_active(setctl.get_show_status_icon()) checkusecommandkeys.set_active(setctl.get_use_command_keys()) checkcloseonunfocus.set_active(setctl.get_close_on_unfocus()) # Plugin List columns = [ {"key": "plugin_id", "type": str }, {"key": "enabled", "type": bool }, {"key": "icon-name", "type": str }, {"key": "markup", "type": str }, ] # setup plugin list table column_types = [c["type"] for c in columns] self.columns = [c["key"] for c in columns] self.store = gtk.ListStore(*column_types) self.table = gtk.TreeView(self.store) self.table.set_headers_visible(False) self.table.set_property("enable-search", False) self.table.set_rules_hint(True) self.table.connect("cursor-changed", self.plugin_table_cursor_changed) self.table.get_selection().set_mode(gtk.SELECTION_BROWSE) checkcell = gtk.CellRendererToggle() checkcol = gtk.TreeViewColumn("item", checkcell) checkcol.add_attribute(checkcell, "active", self.columns.index("enabled")) checkcell.connect("toggled", self.on_checkplugin_toggled) icon_cell = gtk.CellRendererPixbuf() icon_cell.set_property("height", LIST_ICON_SIZE) icon_cell.set_property("width", LIST_ICON_SIZE) icon_col = gtk.TreeViewColumn("icon", icon_cell) icon_col.add_attribute(icon_cell, "icon-name", self.columns.index("icon-name")) cell = gtk.CellRendererText() col = gtk.TreeViewColumn("item", cell) col.add_attribute(cell, "markup", self.columns.index("markup")) self.table.append_column(checkcol) # hide icon for now #self.table.append_column(icon_col) self.table.append_column(col) self.plugin_list_timer = scheduler.Timer() self.plugin_info = utils.locale_sort(plugins.get_plugin_info(), key= lambda rec: rec["localized_name"]) self._refresh_plugin_list() self.output_debug("Standard Plugins: %d" % len(self.store)) self.table.show() self.pluglist_parent.add(self.table) # Directory List self.dir_store = gtk.ListStore(str, gio.Icon, str) self.dir_table = gtk.TreeView(self.dir_store) self.dir_table.set_headers_visible(False) self.dir_table.set_property("enable-search", False) self.dir_table.connect("cursor-changed", self.dir_table_cursor_changed) self.dir_table.get_selection().set_mode(gtk.SELECTION_BROWSE) icon_cell = gtk.CellRendererPixbuf() icon_col = gtk.TreeViewColumn("icon", icon_cell) icon_col.add_attribute(icon_cell, "gicon", 1) cell = gtk.CellRendererText() col = gtk.TreeViewColumn("name", cell) col.add_attribute(cell, "text", 2) cell.set_property("ellipsize", pango.ELLIPSIZE_END) self.dir_table.append_column(icon_col) self.dir_table.append_column(col) self.dir_table.show() self.dirlist_parent.add(self.dir_table) self.read_directory_settings() # keybindings list self.keybind_table, self.keybind_store = _create_conf_keys_list() self.keybindings_list_parent.add(self.keybind_table) self.keybind_table.connect("row-activated", self.on_keybindings_row_activate) # global keybindings list self.gkeybind_table, self.gkeybind_store = _create_conf_keys_list() self.gkeybindings_list_parent.add(self.gkeybind_table) self.gkeybind_table.connect("row-activated", self.on_gkeybindings_row_activate) self._show_keybindings(setctl) self._show_gkeybindings(setctl)
def __init__(self): """Load ui from data file""" builder = Gtk.Builder() builder.set_translation_domain(version.PACKAGE_NAME) ui_file = config.get_data_file("preferences.ui") if ui_file: builder.add_from_file(ui_file) else: self.window = None return self.window = builder.get_object("preferenceswindow") self.window.set_position(Gtk.WindowPosition.CENTER) self.window.connect("delete-event", self._close_window) self.pluglist_parent = builder.get_object("plugin_list_parent") self.dirlist_parent = builder.get_object("directory_list_parent") self.plugin_about_parent = builder.get_object("plugin_about_parent") self.preferences_notebook = builder.get_object("preferences_notebook") self.buttonremovedirectory = builder.get_object( "buttonremovedirectory") checkautostart = builder.get_object("checkautostart") checkstatusicon_gtk = builder.get_object("checkstatusicon_gtk") checkstatusicon_ai = builder.get_object("checkstatusicon_ai") combo_icons_large_size = builder.get_object("icons_large_size") combo_icons_small_size = builder.get_object("icons_small_size") checkusecommandkeys = builder.get_object("checkusecommandkeys") radio_actionaccelalt = builder.get_object("radio_actionaccelalt") radio_actionaccelctrl = builder.get_object("radio_actionaccelctrl") self.entry_plugins_filter = builder.get_object('entry_plugins_filter') self.keybindings_list_parent = builder.get_object( 'keybindings_list_parent') self.gkeybindings_list_parent = builder.get_object( 'gkeybindings_list_parent') source_list_parent = builder.get_object("source_list_parent") button_reset_keys = builder.get_object("button_reset_keys") self.sources_list_ctrl = SourceListController(source_list_parent) setctl = settings.GetSettingsController() checkautostart.set_active(self._get_should_autostart()) checkstatusicon_gtk.set_active(setctl.get_show_status_icon()) large_icon_size = setctl.get_config_int("Appearance", "icon_large_size") small_icon_size = setctl.get_config_int("Appearance", "icon_small_size") set_combobox(large_icon_size, combo_icons_large_size) set_combobox(small_icon_size, combo_icons_small_size) if supports_app_indicator(): checkstatusicon_ai.set_active(setctl.get_show_status_icon_ai()) else: checkstatusicon_ai.set_sensitive(False) label = checkstatusicon_gtk.get_label() checkstatusicon_gtk.set_label(label + " (GtkStatusIcon)") label = checkstatusicon_ai.get_label() checkstatusicon_ai.set_label(label + " (AppIndicator)") checkusecommandkeys.set_active(setctl.get_use_command_keys()) radio_actionaccelalt.set_active( setctl.get_action_accelerator_modifer() != 'ctrl') radio_actionaccelctrl.set_active( setctl.get_action_accelerator_modifer() == 'ctrl') # List store with columns (Name, ID) # Make alternative comboboxes terminal_combobox = builder.get_object("terminal_combobox") icons_combobox = builder.get_object("icons_combobox") def make_combobox_model(combobox): combobox_store = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_STRING) combobox.set_model(combobox_store) combobox_cell = Gtk.CellRendererText() combobox.pack_start(combobox_cell, True) combobox.add_attribute(combobox_cell, 'text', 0) make_combobox_model(terminal_combobox) make_combobox_model(icons_combobox) self._update_alternative_combobox('terminal', terminal_combobox) self._update_alternative_combobox('icon_renderer', icons_combobox) self.terminal_combobox = terminal_combobox self.icons_combobox = icons_combobox setctl.connect("alternatives-changed", self._on_alternatives_changed) # Plugin List columns = [ { "key": "plugin_id", "type": str }, { "key": "enabled", "type": bool }, { "key": "icon-name", "type": str }, { "key": "text", "type": str }, ] # setup plugin list table column_types = [c["type"] for c in columns] self.columns = [c["key"] for c in columns] self.store = Gtk.ListStore.new(column_types) self.table = Gtk.TreeView.new_with_model(self.store) self.table.set_headers_visible(False) self.table.set_property("enable-search", False) self.table.connect("cursor-changed", self.plugin_table_cursor_changed) self.table.get_selection().set_mode(Gtk.SelectionMode.BROWSE) checkcell = Gtk.CellRendererToggle() checkcol = Gtk.TreeViewColumn("item", checkcell) checkcol.add_attribute(checkcell, "active", self.columns.index("enabled")) checkcell.connect("toggled", self.on_checkplugin_toggled) icon_cell = Gtk.CellRendererPixbuf() icon_cell.set_property("height", LIST_ICON_SIZE) icon_cell.set_property("width", LIST_ICON_SIZE) icon_col = Gtk.TreeViewColumn("icon", icon_cell) icon_col.add_attribute(icon_cell, "icon-name", self.columns.index("icon-name")) cell = Gtk.CellRendererText() col = Gtk.TreeViewColumn("item", cell) col.add_attribute(cell, "text", self.columns.index("text")) self.table.append_column(checkcol) # hide icon for now #self.table.append_column(icon_col) self.table.append_column(col) self.plugin_list_timer = scheduler.Timer() self.plugin_info = utils.locale_sort( plugins.get_plugin_info(), key=lambda rec: rec["localized_name"]) self._refresh_plugin_list() self.output_debug("Standard Plugins: %d" % len(self.store)) self.table.show() self.pluglist_parent.add(self.table) # Directory List self.dir_store = Gtk.ListStore.new([str, Gio.Icon, str]) self.dir_table = Gtk.TreeView.new_with_model(self.dir_store) self.dir_table.set_headers_visible(False) self.dir_table.set_property("enable-search", False) self.dir_table.connect("cursor-changed", self.dir_table_cursor_changed) self.dir_table.get_selection().set_mode(Gtk.SelectionMode.BROWSE) icon_cell = Gtk.CellRendererPixbuf() icon_col = Gtk.TreeViewColumn("icon", icon_cell) icon_col.add_attribute(icon_cell, "gicon", 1) cell = Gtk.CellRendererText() col = Gtk.TreeViewColumn("name", cell) col.add_attribute(cell, "text", 2) cell.set_property("ellipsize", Pango.EllipsizeMode.END) self.dir_table.append_column(icon_col) self.dir_table.append_column(col) self.dir_table.show() self.dirlist_parent.add(self.dir_table) self.read_directory_settings() # global keybindings list self.keybind_table, self.keybind_store = _create_conf_keys_list() self.keybindings_list_parent.add(self.keybind_table) self.keybind_table.connect("row-activated", self.on_keybindings_row_activate) button_reset_keys.set_sensitive(keybindings.is_available()) self.keybind_table.set_sensitive(keybindings.is_available()) # kupfer interface (accelerators) keybindings list self.gkeybind_table, self.gkeybind_store = _create_conf_keys_list() self.gkeybindings_list_parent.add(self.gkeybind_table) self.gkeybind_table.connect("row-activated", self.on_gkeybindings_row_activate) # Requires GTK 3.22 try: self.gkeybindings_list_parent.set_propagate_natural_height(True) except AttributeError: pass self._show_keybindings(setctl) self._show_gkeybindings(setctl) # Connect to signals at the last point builder.connect_signals(self)
def __init__(self): """Load ui from data file""" builder = gtk.Builder() builder.set_translation_domain(version.PACKAGE_NAME) ui_file = config.get_data_file("preferences.ui") if ui_file: builder.add_from_file(ui_file) else: self.window = None return builder.connect_signals(self) self.window = builder.get_object("preferenceswindow") self.window.set_position(gtk.WIN_POS_CENTER) self.window.connect("delete-event", self._close_window) self.pluglist_parent = builder.get_object("plugin_list_parent") self.dirlist_parent = builder.get_object("directory_list_parent") self.plugin_about_parent = builder.get_object("plugin_about_parent") self.preferences_notebook = builder.get_object("preferences_notebook") self.entrykeybinding = builder.get_object("entrykeybinding") self.buttonkeybinding = builder.get_object("buttonkeybinding") self.imagekeybindingaux = builder.get_object("imagekeybindingaux") self.labelkeybindingaux = builder.get_object("labelkeybindingaux") self.buttonremovedirectory = builder.get_object("buttonremovedirectory") checkautostart = builder.get_object("checkautostart") checkstatusicon = builder.get_object("checkstatusicon") setctl = settings.GetSettingsController() self.entrykeybinding.set_text(setctl.get_keybinding()) checkautostart.set_active(self._get_should_autostart()) checkstatusicon.set_active(setctl.get_show_status_icon()) # Plugin List columns = [ {"key": "plugin_id", "type": str }, {"key": "enabled", "type": bool }, {"key": "icon-name", "type": str }, {"key": "markup", "type": str }, ] # setup plugin list table column_types = [c["type"] for c in columns] self.columns = [c["key"] for c in columns] self.store = gtk.ListStore(*column_types) self.table = gtk.TreeView(self.store) self.table.set_headers_visible(False) self.table.set_property("enable-search", False) self.table.set_rules_hint(True) self.table.connect("cursor-changed", self.plugin_table_cursor_changed) self.table.get_selection().set_mode(gtk.SELECTION_BROWSE) checkcell = gtk.CellRendererToggle() checkcol = gtk.TreeViewColumn("item", checkcell) checkcol.add_attribute(checkcell, "active", self.columns.index("enabled")) checkcell.connect("toggled", self.on_checkplugin_toggled) icon_cell = gtk.CellRendererPixbuf() icon_cell.set_property("height", 18) icon_cell.set_property("width", 18) icon_col = gtk.TreeViewColumn("icon", icon_cell) icon_col.add_attribute(icon_cell, "icon-name", self.columns.index("icon-name")) cell = gtk.CellRendererText() col = gtk.TreeViewColumn("item", cell) col.add_attribute(cell, "markup", self.columns.index("markup")) self.table.append_column(checkcol) # hide icon for now #self.table.append_column(icon_col) self.table.append_column(col) self.plugin_info = utils.locale_sort(plugins.get_plugin_info(), key= lambda rec: rec["localized_name"]) for info in self.plugin_info: plugin_id = info["name"] if setctl.get_plugin_is_hidden(plugin_id): continue enabled = setctl.get_plugin_enabled(plugin_id) name = info["localized_name"] desc = info["description"] text = u"%s" % name self.store.append((plugin_id, enabled, "kupfer-object", text)) self.output_debug("Standard Plugins: %d" % len(self.store)) self.table.show() self.pluglist_parent.add(self.table) # Directory List self.dir_store = gtk.ListStore(str, gio.Icon, str) self.dir_table = gtk.TreeView(self.dir_store) self.dir_table.set_headers_visible(False) self.dir_table.set_property("enable-search", False) self.dir_table.connect("cursor-changed", self.dir_table_cursor_changed) self.dir_table.get_selection().set_mode(gtk.SELECTION_BROWSE) icon_cell = gtk.CellRendererPixbuf() icon_col = gtk.TreeViewColumn("icon", icon_cell) icon_col.add_attribute(icon_cell, "gicon", 1) cell = gtk.CellRendererText() col = gtk.TreeViewColumn("name", cell) col.add_attribute(cell, "text", 2) cell.set_property("ellipsize", pango.ELLIPSIZE_END) self.dir_table.append_column(icon_col) self.dir_table.append_column(col) self.dir_table.show() self.dirlist_parent.add(self.dir_table) self.read_directory_settings()
def __init__(self): """Load ui from data file""" builder = gtk.Builder() builder.set_translation_domain(version.PACKAGE_NAME) ui_file = config.get_data_file("preferences.ui") if ui_file: builder.add_from_file(ui_file) else: self.window = None return builder.connect_signals(self) self.window = builder.get_object("preferenceswindow") self.window.set_position(gtk.WIN_POS_CENTER) self.window.connect("delete-event", self._close_window) self.pluglist_parent = builder.get_object("plugin_list_parent") self.dirlist_parent = builder.get_object("directory_list_parent") self.plugin_about_parent = builder.get_object("plugin_about_parent") self.preferences_notebook = builder.get_object("preferences_notebook") self.buttonremovedirectory = builder.get_object( "buttonremovedirectory") checkautostart = builder.get_object("checkautostart") checkstatusicon = builder.get_object("checkstatusicon") checkusecommandkeys = builder.get_object("checkusecommandkeys") self.entry_plugins_filter = builder.get_object('entry_plugins_filter') self.keybindings_list_parent = builder.get_object( 'keybindings_list_parent') self.gkeybindings_list_parent = builder.get_object( 'gkeybindings_list_parent') source_list_parent = builder.get_object("source_list_parent") self.sources_list_ctrl = SourceListController(source_list_parent) setctl = settings.GetSettingsController() checkautostart.set_active(self._get_should_autostart()) checkstatusicon.set_active(setctl.get_show_status_icon()) checkusecommandkeys.set_active(setctl.get_use_command_keys()) # List store with columns (Name, ID) # Make alternative comboboxes terminal_combobox = builder.get_object("terminal_combobox") icons_combobox = builder.get_object("icons_combobox") def make_combobox_model(combobox): combobox_store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING) combobox.set_model(combobox_store) combobox_cell = gtk.CellRendererText() combobox.pack_start(combobox_cell, True) combobox.add_attribute(combobox_cell, 'text', 0) make_combobox_model(terminal_combobox) make_combobox_model(icons_combobox) self._update_alternative_combobox('terminal', terminal_combobox) self._update_alternative_combobox('icon_renderer', icons_combobox) self.terminal_combobox = terminal_combobox self.icons_combobox = icons_combobox setctl.connect("alternatives-changed", self._on_alternatives_changed) # Plugin List columns = [ { "key": "plugin_id", "type": str }, { "key": "enabled", "type": bool }, { "key": "icon-name", "type": str }, { "key": "text", "type": str }, ] # setup plugin list table column_types = [c["type"] for c in columns] self.columns = [c["key"] for c in columns] self.store = gtk.ListStore(*column_types) self.table = gtk.TreeView(self.store) self.table.set_headers_visible(False) self.table.set_property("enable-search", False) self.table.set_rules_hint(True) self.table.connect("cursor-changed", self.plugin_table_cursor_changed) self.table.get_selection().set_mode(gtk.SELECTION_BROWSE) checkcell = gtk.CellRendererToggle() checkcol = gtk.TreeViewColumn("item", checkcell) checkcol.add_attribute(checkcell, "active", self.columns.index("enabled")) checkcell.connect("toggled", self.on_checkplugin_toggled) icon_cell = gtk.CellRendererPixbuf() icon_cell.set_property("height", LIST_ICON_SIZE) icon_cell.set_property("width", LIST_ICON_SIZE) icon_col = gtk.TreeViewColumn("icon", icon_cell) icon_col.add_attribute(icon_cell, "icon-name", self.columns.index("icon-name")) cell = gtk.CellRendererText() col = gtk.TreeViewColumn("item", cell) col.add_attribute(cell, "text", self.columns.index("text")) self.table.append_column(checkcol) # hide icon for now #self.table.append_column(icon_col) self.table.append_column(col) self.plugin_list_timer = scheduler.Timer() self.plugin_info = utils.locale_sort( plugins.get_plugin_info(), key=lambda rec: rec["localized_name"]) self._refresh_plugin_list() self.output_debug("Standard Plugins: %d" % len(self.store)) self.table.show() self.pluglist_parent.add(self.table) # Directory List self.dir_store = gtk.ListStore(str, gio.Icon, str) self.dir_table = gtk.TreeView(self.dir_store) self.dir_table.set_headers_visible(False) self.dir_table.set_property("enable-search", False) self.dir_table.connect("cursor-changed", self.dir_table_cursor_changed) self.dir_table.get_selection().set_mode(gtk.SELECTION_BROWSE) icon_cell = gtk.CellRendererPixbuf() icon_col = gtk.TreeViewColumn("icon", icon_cell) icon_col.add_attribute(icon_cell, "gicon", 1) cell = gtk.CellRendererText() col = gtk.TreeViewColumn("name", cell) col.add_attribute(cell, "text", 2) cell.set_property("ellipsize", pango.ELLIPSIZE_END) self.dir_table.append_column(icon_col) self.dir_table.append_column(col) self.dir_table.show() self.dirlist_parent.add(self.dir_table) self.read_directory_settings() # keybindings list self.keybind_table, self.keybind_store = _create_conf_keys_list() self.keybindings_list_parent.add(self.keybind_table) self.keybind_table.connect("row-activated", self.on_keybindings_row_activate) # global keybindings list self.gkeybind_table, self.gkeybind_store = _create_conf_keys_list() self.gkeybindings_list_parent.add(self.gkeybind_table) self.gkeybind_table.connect("row-activated", self.on_gkeybindings_row_activate) self._show_keybindings(setctl) self._show_gkeybindings(setctl)