mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-14 01:30:19 +00:00
Added #if HAVE_GTK3 / #elif !HAVE_GTK3 branches around gtk_hbox_new / gtk_vbox_new call sites in the GTK front-end, using gtk_box_new(GTK_ORIENTATION_*, spacing) for GTK3 while keeping the GTK2 constructors explicitly gated under !HAVE_GTK3.
Applied gtk_box_set_homogeneous() in GTK3 branches where the GTK2 code requested homogeneous layout (e.g., dialog hboxes). Updated remaining helpers and setup/preferences UI box constructors (including the shared mg_box_new helper) to follow the same GTK3/GTK2 branching approach consistently across src/fe-gtk/
This commit is contained in:
@@ -141,11 +141,19 @@ joind_show_dialog (server *serv)
|
||||
dialog_vbox1 = gtk_dialog_get_content_area (GTK_DIALOG (dialog1));
|
||||
gtk_widget_show (dialog_vbox1);
|
||||
|
||||
#if HAVE_GTK3
|
||||
vbox1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
#elif !HAVE_GTK3
|
||||
vbox1 = gtk_vbox_new (FALSE, 0);
|
||||
#endif
|
||||
gtk_widget_show (vbox1);
|
||||
gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0);
|
||||
|
||||
#if HAVE_GTK3
|
||||
hbox1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
#elif !HAVE_GTK3
|
||||
hbox1 = gtk_hbox_new (FALSE, 0);
|
||||
#endif
|
||||
gtk_widget_show (hbox1);
|
||||
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);
|
||||
|
||||
@@ -160,7 +168,11 @@ joind_show_dialog (server *serv)
|
||||
gtk_misc_set_alignment (GTK_MISC (image1), 0.5f, 0.06f);
|
||||
#endif
|
||||
|
||||
#if HAVE_GTK3
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
#elif !HAVE_GTK3
|
||||
vbox2 = gtk_vbox_new (FALSE, 10);
|
||||
#endif
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 6);
|
||||
gtk_widget_show (vbox2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox1), vbox2, TRUE, TRUE, 0);
|
||||
@@ -205,7 +217,11 @@ joind_show_dialog (server *serv)
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), radiobutton1, FALSE, FALSE, 0);
|
||||
radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton1));
|
||||
|
||||
#if HAVE_GTK3
|
||||
hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
#elif !HAVE_GTK3
|
||||
hbox2 = gtk_hbox_new (FALSE, 0);
|
||||
#endif
|
||||
gtk_widget_show (hbox2);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, FALSE, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user