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.
This commit is contained in:
2026-01-30 17:44:30 -07:00
parent 541ee90d27
commit 5e73127f9a
2 changed files with 17 additions and 0 deletions

View File

@@ -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 ();

View File

@@ -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);