Add `ui_notebook_setup()` function which supports notebook tabs already present and any pages added over time. The tab label widget must either support events or be a label, in which case it will be reparented in an event box. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3469
-- Commit Summary --
* Enable mouse wheel tab switching for sidebar and message window
-- File Changes --
M src/notebook.c (34) M src/ui_utils.c (67) M src/ui_utils.h (3)
-- Patch Links --
https://github.com/geany/geany/pull/3469.patch https://github.com/geany/geany/pull/3469.diff
Error in script "/build/geany-build/geany.nsi" on line 144 -- aborting creation process
Not sure what is causing that on w64, perhaps unrelated.
@techee commented on this pull request.
@@ -548,33 +548,6 @@ static gboolean notebook_tab_bar_click_cb(GtkWidget *widget, GdkEventButton *eve
}
-static gboolean notebook_tab_bar_scroll_cb(GtkWidget *widget, GdkEventScroll *event) -{ - GtkNotebook *notebook = GTK_NOTEBOOK(widget); - GtkWidget *child; - - child = gtk_notebook_get_nth_page(notebook, gtk_notebook_get_current_page(notebook)); - if (child == NULL)
Any idea what this check is supposed to do? (Just curious since the new code doesn't contain this check)
@ntrel I've just tested this and checked the code and it looks good and works well for me. I think it would be nice to have this patch merged so all the tabs in the main editor UI behave the same way (I don't think it's necessary to apply this to every single notebook like preferences, just the most frequently used ones in the main window).
Would also fix https://github.com/geany/geany/issues/872.
There is one problem though - when I right-click e.g. a msgwindow tab, I get this
<img width="228" alt="Screenshot 2024-11-25 at 17 09 18" src="https://github.com/user-attachments/assets/09585dce-1090-46be-851d-91a7f2c10484">
instead of
<img width="228" alt="Screenshot 2024-11-25 at 17 10 54" src="https://github.com/user-attachments/assets/bd1c2955-70b9-4543-8200-a75e666c34a5">
github-comments@lists.geany.org