mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-14 17:50: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:
@@ -438,7 +438,12 @@ fe_get_str (char *msg, char *def, void *callback, void *userdata)
|
||||
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
|
||||
}
|
||||
|
||||
#if HAVE_GTK3
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
|
||||
#elif !HAVE_GTK3
|
||||
hbox = gtk_hbox_new (TRUE, 0);
|
||||
#endif
|
||||
|
||||
g_object_set_data (G_OBJECT (dialog), "cb", callback);
|
||||
g_object_set_data (G_OBJECT (dialog), "ud", userdata);
|
||||
@@ -524,7 +529,12 @@ fe_get_int (char *msg, int def, void *callback, void *userdata)
|
||||
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent_window));
|
||||
|
||||
#if HAVE_GTK3
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
|
||||
#elif !HAVE_GTK3
|
||||
hbox = gtk_hbox_new (TRUE, 0);
|
||||
#endif
|
||||
|
||||
g_object_set_data (G_OBJECT (dialog), "cb", callback);
|
||||
g_object_set_data (G_OBJECT (dialog), "ud", userdata);
|
||||
@@ -606,7 +616,11 @@ gtkutil_button (GtkWidget *box, char *stock, char *tip, void *callback,
|
||||
}
|
||||
else
|
||||
{
|
||||
#if HAVE_GTK3
|
||||
bbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
#elif !HAVE_GTK3
|
||||
bbox = gtk_hbox_new (0, 0);
|
||||
#endif
|
||||
gtk_container_add (GTK_CONTAINER (wid), bbox);
|
||||
gtk_widget_show (bbox);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user