diff --git a/ChangeLog b/ChangeLog index 0144ab94..89ee4e34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,9 @@ when using documentation comments e.g. for TODO. * plugins/pluginmacros.h: Add deprecated p_encoding alias for p_encodings. + * src/keybindings.c: + Fix Switch to Sidebar shortcut so that it works for whichever widget + is in the current sidebar notebook page (fixes #1967104). 2008-05-18 Enrico Tröger diff --git a/src/keybindings.c b/src/keybindings.c index 8d08ab4e..99a9a6d6 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -1183,9 +1183,10 @@ static void cb_func_switch_sidebar(G_GNUC_UNUSED guint key_id) if (ui_prefs.sidebar_visible) { gint page_num = gtk_notebook_get_current_page(GTK_NOTEBOOK(app->treeview_notebook)); - GtkWidget *swin = gtk_notebook_get_nth_page(GTK_NOTEBOOK(app->treeview_notebook), page_num); + GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(app->treeview_notebook), page_num); - gtk_widget_grab_focus(gtk_bin_get_child(GTK_BIN(swin))); + /* gtk_widget_grab_focus() won't work because of the scrolled window containers */ + gtk_widget_child_focus(page, GTK_DIR_TAB_FORWARD); } }