I don't really care either for which it is; but maybe restoring this to the 
previous state is the safer solution.
FWIW, I don't use that shortcut (didn't even know it existed :smile:) so I 
don't mind.

> works for me, and I too really don't understand why the same call on 
> `treeview2` (the initial correction I suggested) doesn't work...

This is more subtle :)  The reason is that the actual `GtkTreeView` is either 
the default empty one, or the *document's* one.  So the one in Glade (retrieved 
with the `treeview2` name) is likely not the one actually attached to the 
symbols tab.
The correct fix is:

```diff
diff --git a/src/sidebar.c b/src/sidebar.c
index 9d004f392..435e31394 100644
--- a/src/sidebar.c
+++ b/src/sidebar.c
@@ -1649,7 +1649,7 @@ void sidebar_focus_symbols_tab(void)
        if (ui_prefs.sidebar_visible && interface_prefs.sidebar_symbol_visible)
        {
                GtkNotebook *notebook = 
GTK_NOTEBOOK(main_widgets.sidebar_notebook);
-               GtkWidget *symbol_list_scrollwin = 
gtk_notebook_get_nth_page(notebook, TREEVIEW_SYMBOL);
+               GtkWidget *symbol_list_scrollwin = 
ui_lookup_widget(main_widgets.window, "scrolledwindow2");
 
                gtk_notebook_set_current_page(notebook, TREEVIEW_SYMBOL);
                
gtk_widget_grab_focus(gtk_bin_get_child(GTK_BIN(symbol_list_scrollwin)));
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3681#issuecomment-1817231917
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3681/[email protected]>

Reply via email to