mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Added GTK3 button box creation branches with explicit layout settings across the fe-gtk dialogs while keeping GTK2-only gtk_hbutton_box_new() paths gated under !HAVE_GTK3.
This commit is contained in:
@@ -867,8 +867,13 @@ banlist_opengui (struct session *sess)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_GTK3
|
||||||
|
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
bbox = gtk_hbutton_box_new ();
|
bbox = gtk_hbutton_box_new ();
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#endif
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), bbox, 0, 0, 0);
|
gtk_box_pack_end (GTK_BOX (vbox), bbox, 0, 0, 0);
|
||||||
gtk_widget_show (bbox);
|
gtk_widget_show (bbox);
|
||||||
|
|||||||
@@ -956,8 +956,13 @@ fe_dcc_open_recv_win (int passive)
|
|||||||
dccfwin.file_label = dcc_detail_label (_("File:"), detailbox, 0);
|
dccfwin.file_label = dcc_detail_label (_("File:"), detailbox, 0);
|
||||||
dccfwin.address_label = dcc_detail_label (_("Address:"), detailbox, 1);
|
dccfwin.address_label = dcc_detail_label (_("Address:"), detailbox, 1);
|
||||||
|
|
||||||
|
#if HAVE_GTK3
|
||||||
|
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
bbox = gtk_hbutton_box_new ();
|
bbox = gtk_hbutton_box_new ();
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#endif
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), bbox, FALSE, FALSE, 2);
|
gtk_box_pack_end (GTK_BOX (vbox), bbox, FALSE, FALSE, 2);
|
||||||
|
|
||||||
dccfwin.abort_button = gtkutil_button (bbox, ICON_DCC_CANCEL, 0, abort_clicked, 0, _("Abort"));
|
dccfwin.abort_button = gtkutil_button (bbox, ICON_DCC_CANCEL, 0, abort_clicked, 0, _("Abort"));
|
||||||
@@ -1157,8 +1162,13 @@ fe_dcc_open_chat_win (int passive)
|
|||||||
g_signal_connect (G_OBJECT (view), "row-activated",
|
g_signal_connect (G_OBJECT (view), "row-activated",
|
||||||
G_CALLBACK (dcc_chat_dclick_cb), NULL);
|
G_CALLBACK (dcc_chat_dclick_cb), NULL);
|
||||||
|
|
||||||
|
#if HAVE_GTK3
|
||||||
|
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
bbox = gtk_hbutton_box_new ();
|
bbox = gtk_hbutton_box_new ();
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#endif
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), bbox, FALSE, FALSE, 2);
|
gtk_box_pack_end (GTK_BOX (vbox), bbox, FALSE, FALSE, 2);
|
||||||
|
|
||||||
dcccwin.abort_button = gtkutil_button (bbox, ICON_DCC_CANCEL, 0, abort_chat_clicked, 0, _("Abort"));
|
dcccwin.abort_button = gtkutil_button (bbox, ICON_DCC_CANCEL, 0, abort_chat_clicked, 0, _("Abort"));
|
||||||
|
|||||||
@@ -361,8 +361,13 @@ editlist_gui_open (char *title1, char *title2, GSList *list, char *title, char *
|
|||||||
if (help)
|
if (help)
|
||||||
gtk_widget_set_tooltip_text (view, help);
|
gtk_widget_set_tooltip_text (view, help);
|
||||||
|
|
||||||
|
#if HAVE_GTK3
|
||||||
|
box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (box), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
box = gtk_hbutton_box_new ();
|
box = gtk_hbutton_box_new ();
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (box), GTK_BUTTONBOX_SPREAD);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (box), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#endif
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 2);
|
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 2);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||||
gtk_widget_show (box);
|
gtk_widget_show (box);
|
||||||
|
|||||||
@@ -838,8 +838,13 @@ key_dialog_show ()
|
|||||||
g_object_set_data (G_OBJECT (key_dialog), "view", view);
|
g_object_set_data (G_OBJECT (key_dialog), "view", view);
|
||||||
g_object_set_data (G_OBJECT (key_dialog), "xtext", xtext);
|
g_object_set_data (G_OBJECT (key_dialog), "xtext", xtext);
|
||||||
|
|
||||||
|
#if HAVE_GTK3
|
||||||
|
box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (box), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
box = gtk_hbutton_box_new ();
|
box = gtk_hbutton_box_new ();
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (box), GTK_BUTTONBOX_SPREAD);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (box), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#endif
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 2);
|
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 2);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||||
|
|
||||||
|
|||||||
@@ -388,8 +388,13 @@ ignore_gui_open ()
|
|||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame, 0, 0, 5);
|
gtk_box_pack_start (GTK_BOX (vbox), frame, 0, 0, 5);
|
||||||
|
|
||||||
|
#if HAVE_GTK3
|
||||||
|
box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (box), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
box = gtk_hbutton_box_new ();
|
box = gtk_hbutton_box_new ();
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (box), GTK_BUTTONBOX_SPREAD);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (box), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#endif
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 2);
|
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 2);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||||
gtk_widget_show (box);
|
gtk_widget_show (box);
|
||||||
|
|||||||
@@ -457,8 +457,13 @@ notify_opengui (void)
|
|||||||
view = notify_treeview_new (vbox);
|
view = notify_treeview_new (vbox);
|
||||||
g_object_set_data (G_OBJECT (notify_window), "view", view);
|
g_object_set_data (G_OBJECT (notify_window), "view", view);
|
||||||
|
|
||||||
|
#if HAVE_GTK3
|
||||||
|
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
bbox = gtk_hbutton_box_new ();
|
bbox = gtk_hbutton_box_new ();
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#endif
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), bbox, 0, 0, 0);
|
gtk_box_pack_end (GTK_BOX (vbox), bbox, 0, 0, 0);
|
||||||
gtk_widget_show (bbox);
|
gtk_widget_show (bbox);
|
||||||
|
|||||||
@@ -279,8 +279,13 @@ plugingui_open (void)
|
|||||||
g_object_set_data (G_OBJECT (plugin_window), "view", view);
|
g_object_set_data (G_OBJECT (plugin_window), "view", view);
|
||||||
|
|
||||||
|
|
||||||
|
#if HAVE_GTK3
|
||||||
|
hbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
hbox = gtk_hbutton_box_new ();
|
hbox = gtk_hbutton_box_new ();
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_SPREAD);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#endif
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), hbox, 0, 0, 0);
|
gtk_box_pack_end (GTK_BOX (vbox), hbox, 0, 0, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -136,8 +136,13 @@ open_rawlog (struct server *serv)
|
|||||||
gtk_xtext_set_font (GTK_XTEXT (serv->gui->rawlog_textlist), prefs.hex_text_font);
|
gtk_xtext_set_font (GTK_XTEXT (serv->gui->rawlog_textlist), prefs.hex_text_font);
|
||||||
GTK_XTEXT (serv->gui->rawlog_textlist)->ignore_hidden = 1;
|
GTK_XTEXT (serv->gui->rawlog_textlist)->ignore_hidden = 1;
|
||||||
|
|
||||||
|
#if HAVE_GTK3
|
||||||
|
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
bbox = gtk_hbutton_box_new ();
|
bbox = gtk_hbutton_box_new ();
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#endif
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), bbox, 0, 0, 4);
|
gtk_box_pack_end (GTK_BOX (vbox), bbox, 0, 0, 4);
|
||||||
|
|
||||||
gtkutil_button (bbox, ICON_RAWLOG_CLEAR, NULL, rawlog_clearbutton,
|
gtkutil_button (bbox, ICON_RAWLOG_CLEAR, NULL, rawlog_clearbutton,
|
||||||
|
|||||||
@@ -2099,9 +2099,14 @@ servlist_open_edit (GtkWidget *parent, ircnet *net)
|
|||||||
hseparator2 = gtk_hseparator_new ();
|
hseparator2 = gtk_hseparator_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (vbox5), hseparator2, FALSE, FALSE, 8);
|
gtk_box_pack_start (GTK_BOX (vbox5), hseparator2, FALSE, FALSE, 8);
|
||||||
|
|
||||||
hbuttonbox4 = gtk_hbutton_box_new ();
|
#if HAVE_GTK3
|
||||||
gtk_box_pack_start (GTK_BOX (vbox5), hbuttonbox4, FALSE, FALSE, 0);
|
hbuttonbox4 = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox4), GTK_BUTTONBOX_END);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox4), GTK_BUTTONBOX_END);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
|
hbuttonbox4 = gtk_hbutton_box_new ();
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox4), GTK_BUTTONBOX_END);
|
||||||
|
#endif
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox5), hbuttonbox4, FALSE, FALSE, 0);
|
||||||
|
|
||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
button10 = servlist_icon_button_new (_("_Close"), ICON_SERVLIST_CLOSE);
|
button10 = servlist_icon_button_new (_("_Close"), ICON_SERVLIST_CLOSE);
|
||||||
@@ -2438,7 +2443,13 @@ servlist_open_networks (void)
|
|||||||
gtk_widget_show (hseparator1);
|
gtk_widget_show (hseparator1);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, TRUE, 4);
|
gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, TRUE, 4);
|
||||||
|
|
||||||
|
#if HAVE_GTK3
|
||||||
|
hbuttonbox1 = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
hbuttonbox1 = gtk_hbutton_box_new ();
|
hbuttonbox1 = gtk_hbutton_box_new ();
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#endif
|
||||||
gtk_widget_show (hbuttonbox1);
|
gtk_widget_show (hbuttonbox1);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, TRUE, 0);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (hbuttonbox1), 8);
|
gtk_container_set_border_width (GTK_CONTAINER (hbuttonbox1), 8);
|
||||||
|
|||||||
@@ -3087,8 +3087,13 @@ setup_window_open (void)
|
|||||||
setup_create_tree (hbox, setup_create_pages (hbox));
|
setup_create_tree (hbox, setup_create_pages (hbox));
|
||||||
|
|
||||||
/* prepare the button box */
|
/* prepare the button box */
|
||||||
|
#if HAVE_GTK3
|
||||||
|
hbbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbbox), GTK_BUTTONBOX_END);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
hbbox = gtk_hbutton_box_new ();
|
hbbox = gtk_hbutton_box_new ();
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbbox), GTK_BUTTONBOX_END);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbbox), GTK_BUTTONBOX_END);
|
||||||
|
#endif
|
||||||
gtk_box_set_spacing (GTK_BOX (hbbox), 4);
|
gtk_box_set_spacing (GTK_BOX (hbbox), 4);
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), hbbox, FALSE, FALSE, 0);
|
gtk_box_pack_end (GTK_BOX (vbox), hbbox, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -481,8 +481,13 @@ pevent_dialog_show ()
|
|||||||
gtk_container_add (GTK_CONTAINER (wid), pevent_dialog_twid);
|
gtk_container_add (GTK_CONTAINER (wid), pevent_dialog_twid);
|
||||||
gtk_xtext_set_font (GTK_XTEXT (pevent_dialog_twid), prefs.hex_text_font);
|
gtk_xtext_set_font (GTK_XTEXT (pevent_dialog_twid), prefs.hex_text_font);
|
||||||
|
|
||||||
|
#if HAVE_GTK3
|
||||||
|
hbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
hbox = gtk_hbutton_box_new ();
|
hbox = gtk_hbutton_box_new ();
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_SPREAD);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#endif
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 4);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 4);
|
||||||
gtkutil_button (hbox, ICON_TEXTEVENT_SAVE_AS, NULL, pevent_save_cb,
|
gtkutil_button (hbox, ICON_TEXTEVENT_SAVE_AS, NULL, pevent_save_cb,
|
||||||
(void *) 1, _("Save As..."));
|
(void *) 1, _("Save As..."));
|
||||||
|
|||||||
@@ -215,8 +215,13 @@ url_opengui ()
|
|||||||
g_object_set_data (G_OBJECT (urlgrabberwindow), "model",
|
g_object_set_data (G_OBJECT (urlgrabberwindow), "model",
|
||||||
gtk_tree_view_get_model (GTK_TREE_VIEW (view)));
|
gtk_tree_view_get_model (GTK_TREE_VIEW (view)));
|
||||||
|
|
||||||
|
#if HAVE_GTK3
|
||||||
|
hbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#elif !HAVE_GTK3
|
||||||
hbox = gtk_hbutton_box_new ();
|
hbox = gtk_hbutton_box_new ();
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_SPREAD);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_SPREAD);
|
||||||
|
#endif
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), hbox, 0, 0, 0);
|
gtk_box_pack_end (GTK_BOX (vbox), hbox, 0, 0, 0);
|
||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
|
|||||||
Reference in New Issue
Block a user