Replace Gtk[HV]Box with GtkBox.

Sat, 03 Sep 2016 05:36:08 -0400

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Sat, 03 Sep 2016 05:36:08 -0400
changeset 37994
11829debec7a
parent 37993
b84212f9f022
child 37995
d5ab4262ea77

Replace Gtk[HV]Box with GtkBox.

pidgin/gtkmedia.c file | annotate | diff | comparison | revisions
pidgin/gtknotify.c file | annotate | diff | comparison | revisions
pidgin/gtkrequest.c file | annotate | diff | comparison | revisions
pidgin/gtkscrollbook.c file | annotate | diff | comparison | revisions
pidgin/gtkutils.h file | annotate | diff | comparison | revisions
pidgin/gtkwebviewtoolbar.c file | annotate | diff | comparison | revisions
pidgin/gtkwebviewtoolbar.h file | annotate | diff | comparison | revisions
pidgin/minidialog.c file | annotate | diff | comparison | revisions
pidgin/minidialog.h file | annotate | diff | comparison | revisions
pidgin/plugins/cap/cap.c file | annotate | diff | comparison | revisions
pidgin/plugins/gevolution/new_person_dialog.c file | annotate | diff | comparison | revisions
pidgin/plugins/win32/transparency/win2ktrans.c file | annotate | diff | comparison | revisions
pidgin/plugins/win32/winprefs/winprefs.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkmedia.c	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/gtkmedia.c	Sat Sep 03 05:36:08 2016 -0400
@@ -782,7 +782,8 @@
 	else
 		text_hi_local = "";
 
-	grid = gtk_vbox_new(TRUE, 0);
+	grid = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+	gtk_box_set_homogeneous(GTK_BOX(grid), TRUE);
 
 	button = gtk_button_new();
 	label_hi = gtk_label_new(text_hi_local);
--- a/pidgin/gtknotify.c	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/gtknotify.c	Sat Sep 03 05:36:08 2016 -0400
@@ -524,7 +524,7 @@
 			GTK_DIALOG(cont))), image, FALSE, TRUE, 0);
 		gtk_box_reorder_child(GTK_BOX(gtk_dialog_get_action_area(
 			GTK_DIALOG(cont))), image, 0);
-	} else if (GTK_IS_HBOX(cont)) {
+	} else if (GTK_IS_BOX(cont)) {
 		gtk_widget_set_halign(image, GTK_ALIGN_START);
 		gtk_widget_set_valign(image, GTK_ALIGN_START);
 		gtk_box_pack_end(GTK_BOX(cont), image, FALSE, TRUE, 0);
--- a/pidgin/gtkrequest.c	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/gtkrequest.c	Sat Sep 03 05:36:08 2016 -0400
@@ -111,7 +111,7 @@
 	                       image, FALSE, TRUE, 0);
 		gtk_box_reorder_child(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(cont))),
 	                          image, 0);
-	} else if (GTK_IS_HBOX(cont)) {
+	} else if (GTK_IS_BOX(cont)) {
 		gtk_widget_set_halign(image, GTK_ALIGN_START);
 		gtk_widget_set_valign(image, GTK_ALIGN_START);
 		gtk_box_pack_end(GTK_BOX(cont), image, FALSE, TRUE, 0);
@@ -1682,12 +1682,11 @@
 static void
 datasheet_selection_changed(GtkWidget *sheet_widget)
 {
-	GtkVBox *buttons_box;
+	gpointer buttons_box;
 
 	g_return_if_fail(sheet_widget != NULL);
 
-	buttons_box = GTK_VBOX(g_object_get_data(G_OBJECT(sheet_widget),
-		"buttons"));
+	buttons_box = g_object_get_data(G_OBJECT(sheet_widget), "buttons");
 	gtk_container_foreach(GTK_CONTAINER(buttons_box),
 		datasheet_button_check_sens, sheet_widget);
 }
@@ -1844,12 +1843,12 @@
 	GtkWidget *scrollable;
 	GtkCellRenderer *renderer_image = NULL, *renderer_text = NULL;
 	GtkTreeViewColumn *id_column;
-	GtkHBox *main_box;
-	GtkVBox *buttons_box;
+	GtkWidget *main_box;
+	GtkWidget *buttons_box;
 	const GList *it;
 
 	sheet = purple_request_field_datasheet_get_sheet(field);
-	main_box = GTK_HBOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0));
+	main_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
 
 	col_count = purple_request_datasheet_get_column_count(sheet);
 
@@ -1915,14 +1914,14 @@
 		GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS, GTK_SHADOW_IN, -1, -1);
 	gtk_widget_show(GTK_WIDGET(view));
 
-	buttons_box = GTK_VBOX(gtk_box_new(GTK_ORIENTATION_VERTICAL, PIDGIN_HIG_BORDER));
-	gtk_size_group_add_widget(buttons_sg, GTK_WIDGET(buttons_box));
+	buttons_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, PIDGIN_HIG_BORDER);
+	gtk_size_group_add_widget(buttons_sg, buttons_box);
 
 	gtk_box_pack_start(GTK_BOX(main_box), scrollable, TRUE, TRUE, 0);
-	gtk_box_pack_start(GTK_BOX(main_box), GTK_WIDGET(buttons_box),
+	gtk_box_pack_start(GTK_BOX(main_box), buttons_box,
 		FALSE, FALSE, 0);
 	gtk_widget_show(scrollable);
-	gtk_widget_show(GTK_WIDGET(buttons_box));
+	gtk_widget_show(buttons_box);
 
 	it = purple_request_datasheet_get_actions(sheet);
 	for (; it != NULL; it = g_list_next(it)) {
@@ -1957,7 +1956,7 @@
 	g_signal_connect(G_OBJECT(sel), "changed",
 		G_CALLBACK(datasheet_selection_changed_cb), main_box);
 
-	return GTK_WIDGET(main_box);
+	return main_box;
 }
 
 static void *
--- a/pidgin/gtkscrollbook.c	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/gtkscrollbook.c	Sat Sep 03 05:36:08 2016 -0400
@@ -51,7 +51,7 @@
 			NULL  /* value_table */
 		};
 
-		scroll_book_type = g_type_register_static(GTK_TYPE_VBOX,
+		scroll_book_type = g_type_register_static(GTK_TYPE_BOX,
 							 "PidginScrollBook",
 							 &scroll_book_info,
 							 0);
@@ -256,6 +256,8 @@
 	GtkWidget *eb;
 	GtkWidget *close_button;
 
+	gtk_orientable_set_orientation(GTK_ORIENTABLE(scroll_book), GTK_ORIENTATION_VERTICAL);
+
 	scroll_book->hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
 
 	/* Close */
--- a/pidgin/gtkutils.h	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/gtkutils.h	Sat Sep 03 05:36:08 2016 -0400
@@ -803,16 +803,16 @@
 
 /**
  * pidgin_add_widget_to_vbox:
- * @vbox:         The GtkVBox to add the widget to.
+ * @vbox:         The vertically-oriented GtkBox to add the widget to.
  * @widget_label: The label to give the widget, can be %NULL.
  * @sg:           The GtkSizeGroup to add the label to, can be %NULL.
  * @widget:       The GtkWidget to add.
  * @expand:       Whether to expand the widget horizontally.
  * @p_label:      Place to store a pointer to the GtkLabel, or %NULL if you don't care.
  *
- * Add a labelled widget to a GtkVBox
+ * Add a labelled widget to a GtkBox
  *
- * Returns:  A GtkHBox already added to the GtkVBox containing the GtkLabel and the GtkWidget.
+ * Returns:  A GtkBox already added to the GtkBox containing the GtkLabel and the GtkWidget.
  */
 GtkWidget *pidgin_add_widget_to_vbox(GtkBox *vbox, const char *widget_label, GtkSizeGroup *sg, GtkWidget *widget, gboolean expand, GtkWidget **p_label);
 
--- a/pidgin/gtkwebviewtoolbar.c	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/gtkwebviewtoolbar.c	Sat Sep 03 05:36:08 2016 -0400
@@ -101,7 +101,7 @@
  * Globals
  *****************************************************************************/
 
-static GtkHBoxClass *parent_class = NULL;
+static GtkBoxClass *parent_class = NULL;
 
 /******************************************************************************
  * Prototypes
@@ -1337,7 +1337,7 @@
 	PidginWebViewToolbarClass *class = _class;
 	GObjectClass *gobject_class = _class;
 
-	parent_class = g_type_class_ref(GTK_TYPE_HBOX);
+	parent_class = g_type_class_ref(GTK_TYPE_BOX);
 	gobject_class->finalize = pidgin_webviewtoolbar_finalize;
 
 	g_type_class_add_private(class, sizeof(PidginWebViewToolbarPriv));
@@ -1621,7 +1621,7 @@
 			NULL
 		};
 
-		webviewtoolbar_type = g_type_register_static(GTK_TYPE_HBOX,
+		webviewtoolbar_type = g_type_register_static(GTK_TYPE_BOX,
 				"PidginWebViewToolbar", &webviewtoolbar_info, 0);
 	}
 
--- a/pidgin/gtkwebviewtoolbar.h	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/gtkwebviewtoolbar.h	Sat Sep 03 05:36:08 2016 -0400
@@ -46,13 +46,13 @@
 typedef struct _PidginWebViewToolbarClass PidginWebViewToolbarClass;
 
 struct _PidginWebViewToolbar {
-	GtkHBox box;
+	GtkBox box;
 
 	GtkWidget *webview;
 };
 
 struct _PidginWebViewToolbarClass {
-	GtkHBoxClass parent_class;
+	GtkBoxClass parent_class;
 };
 
 G_BEGIN_DECLS
--- a/pidgin/minidialog.c	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/minidialog.c	Sat Sep 03 05:36:08 2016 -0400
@@ -62,7 +62,7 @@
 			(GInstanceInitFunc) pidgin_mini_dialog_init,
 			NULL,
 		};
-		g_define_type_id = g_type_register_static (GTK_TYPE_VBOX,
+		g_define_type_id = g_type_register_static(GTK_TYPE_BOX,
 			"PidginMiniDialog", &g_define_type_info, 0);
 	}
 	return g_define_type_id;
@@ -454,6 +454,8 @@
 	PidginMiniDialogPrivate *priv = g_new0(PidginMiniDialogPrivate, 1);
 	self->priv = priv;
 
+	gtk_orientable_set_orientation(GTK_ORIENTABLE(self), GTK_ORIENTATION_VERTICAL);
+
 	gtk_container_set_border_width(GTK_CONTAINER(self), PIDGIN_HIG_BOX_SPACE);
 
 	priv->title_box = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PIDGIN_HIG_BOX_SPACE));
--- a/pidgin/minidialog.h	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/minidialog.h	Sat Sep 03 05:36:08 2016 -0400
@@ -57,11 +57,11 @@
 
 /**
  * PidginMiniDialog:
- * @contents: A GtkVBox into which extra widgets for the dialog should be packed.
+ * @contents: A GtkBox into which extra widgets for the dialog should be packed.
  *
  * A widget resembling a diminutive dialog box, designed to be embedded in the
  * #PidginBuddyList.  Mini-dialogs have titles, optional descriptions, and a row
- * of buttons at the bottom; above the buttons is a #GtkHBox into which
+ * of buttons at the bottom; above the buttons is a #GtkBox into which
  * you can pack any random widgets you want to add to the dialog.  When any of
  * the dialog's buttons is clicked, the dialog will be destroyed.
  *
@@ -91,7 +91,7 @@
  * </informaltable>
  */
 typedef struct {
-	GtkVBox parent;
+	GtkBox parent;
 	gpointer priv;
 
 	/*< public >*/
--- a/pidgin/plugins/cap/cap.c	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/plugins/cap/cap.c	Sat Sep 03 05:36:08 2016 -0400
@@ -730,7 +730,7 @@
 static CapPrefsUI * create_cap_prefs_ui() {
 	CapPrefsUI *ui = g_malloc(sizeof(CapPrefsUI));
 
-	ui->ret = gtk_vbox_new(FALSE, 18);
+	ui->ret = gtk_box_new(GTK_ORIENTATION_VERTICAL, 18);
 	gtk_container_set_border_width(GTK_CONTAINER(ui->ret), 10);
 	ui->cap_vbox = pidgin_make_frame(ui->ret, _("Statistics Configuration"));
 
--- a/pidgin/plugins/gevolution/new_person_dialog.c	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/plugins/gevolution/new_person_dialog.c	Sat Sep 03 05:36:08 2016 -0400
@@ -320,7 +320,7 @@
 
 #if 0
 	/* Now the left side of the hbox */
-	vbox2 = gtk_vbox_new(FALSE, 12);
+	vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
 	gtk_box_pack_start(GTK_BOX(hbox), vbox2, FALSE, FALSE, 0);
 	gtk_widget_show(vbox2);
 
--- a/pidgin/plugins/win32/transparency/win2ktrans.c	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/plugins/win32/transparency/win2ktrans.c	Sat Sep 03 05:36:08 2016 -0400
@@ -256,7 +256,7 @@
 					GTK_CONTAINER(win));
 				wl != NULL;
 				wl = wl->next) {
-			if (GTK_IS_VBOX(G_OBJECT(wl->data)))
+			if (GTK_IS_BOX(G_OBJECT(wl->data)))
 				vbox = GTK_WIDGET(wl->data);
 			else {
 				purple_debug_error(WINTRANS_PLUGIN_ID,
@@ -495,7 +495,7 @@
 	GtkWidget *button;
 	GtkWidget *trans_box;
 
-	ret = gtk_vbox_new(FALSE, 18);
+	ret = gtk_box_new(GTK_ORIENTATION_VERTICAL, 18);
 	gtk_container_set_border_width(GTK_CONTAINER (ret), 12);
 
 	/* IM Convo trans options */
@@ -506,7 +506,7 @@
 		G_CALLBACK(update_convs_wintrans),
 		(gpointer) OPT_WINTRANS_IM_ENABLED);
 
-	trans_box = gtk_vbox_new(FALSE, 18);
+	trans_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 18);
 	if (!purple_prefs_get_bool(OPT_WINTRANS_IM_ENABLED))
 		gtk_widget_set_sensitive(GTK_WIDGET(trans_box), FALSE);
 	gtk_widget_show(trans_box);
@@ -563,7 +563,7 @@
 		G_CALLBACK(set_blist_trans),
 		(gpointer) OPT_WINTRANS_BL_ENABLED);
 
-	trans_box = gtk_vbox_new(FALSE, 18);
+	trans_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 18);
 	if (!purple_prefs_get_bool(OPT_WINTRANS_BL_ENABLED))
 		gtk_widget_set_sensitive(GTK_WIDGET(trans_box), FALSE);
 	gtk_widget_show(trans_box);
--- a/pidgin/plugins/win32/winprefs/winprefs.c	Sat Sep 03 05:07:04 2016 -0400
+++ b/pidgin/plugins/win32/winprefs/winprefs.c	Sat Sep 03 05:36:08 2016 -0400
@@ -236,7 +236,7 @@
 	char *run_key_val;
 	char *tmp;
 
-	ret = gtk_vbox_new(FALSE, 18);
+	ret = gtk_box_new(GTK_ORIENTATION_VERTICAL, 18);
 	gtk_container_set_border_width(GTK_CONTAINER(ret), 12);
 
 	/* Autostart */

mercurial