From 5e73127f9a36e482cd5bd8a8d92f15fa297ba636 Mon Sep 17 00:00:00 2001 From: deepend Date: Fri, 30 Jan 2026 17:44:30 -0700 Subject: [PATCH] Updated the main GUI scrollbar creation to use the GTK3 vertical scrollbar constructor while keeping the GTK2 call behind #if !HAVE_GTK3. Split vertical paned widget creation in the main GUI and events dialog for GTK3 vs GTK2, ensuring GTK2 calls remain under #if !HAVE_GTK3. --- src/fe-gtk/maingui.c | 13 +++++++++++++ src/fe-gtk/textgui.c | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index ebb55ad3..18a9b23d 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -2642,7 +2642,12 @@ mg_create_textarea (session *sess, GtkWidget *box) g_signal_connect (G_OBJECT (xtext), "word_click", G_CALLBACK (mg_word_clicked), NULL); +#if HAVE_GTK3 + gui->vscrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, + GTK_XTEXT (xtext)->adj); +#elif !HAVE_GTK3 gui->vscrollbar = gtk_vscrollbar_new (GTK_XTEXT (xtext)->adj); +#endif gtk_box_pack_start (GTK_BOX (inbox), gui->vscrollbar, FALSE, TRUE, 0); gtk_drag_dest_set (gui->vscrollbar, 5, dnd_dest_targets, 2, @@ -2827,10 +2832,18 @@ mg_create_center (session *sess, session_gui *gui, GtkWidget *box) GtkWidget *vbox, *hbox, *book; /* sep between top and bottom of left side */ +#if HAVE_GTK3 + gui->vpane_left = gtk_paned_new (GTK_ORIENTATION_VERTICAL); +#elif !HAVE_GTK3 gui->vpane_left = gtk_vpaned_new (); +#endif /* sep between top and bottom of right side */ +#if HAVE_GTK3 + gui->vpane_right = gtk_paned_new (GTK_ORIENTATION_VERTICAL); +#elif !HAVE_GTK3 gui->vpane_right = gtk_vpaned_new (); +#endif /* sep between left and xtext */ gui->hpane_left = gtk_hpaned_new (); diff --git a/src/fe-gtk/textgui.c b/src/fe-gtk/textgui.c index 2f319180..4f4f2593 100644 --- a/src/fe-gtk/textgui.c +++ b/src/fe-gtk/textgui.c @@ -462,7 +462,11 @@ pevent_dialog_show () TRUE, FALSE, pevent_dialog_close, NULL, 600, 455, &vbox, 0); +#if HAVE_GTK3 + pane = gtk_paned_new (GTK_ORIENTATION_VERTICAL); +#elif !HAVE_GTK3 pane = gtk_vpaned_new (); +#endif gtk_box_pack_start (GTK_BOX (vbox), pane, TRUE, TRUE, 0); pevent_dialog_list = pevent_treeview_new (pane);