/soc/2015/mmcc/main: 01d12a69314b: inline two now-unnecessary GT...

Michael McConville mmcconville at mykolab.com
Thu Jul 9 13:11:26 EDT 2015


Changeset: 01d12a69314b7c9792ac699b43492a361581e027
Author:	 Michael McConville <mmcconville at mykolab.com>
Date:	 2015-07-09 13:11 -0400
Branch:	 default
URL: https://hg.pidgin.im/soc/2015/mmcc/main/rev/01d12a69314b

Description:

inline two now-unnecessary GTK helper functions

diffstat:

 pidgin/gtkprivacy.c             |   2 +-
 pidgin/gtkrequest.c             |   2 +-
 pidgin/gtkroomlist.c            |   2 +-
 pidgin/gtksavedstatuses.c       |   4 ++--
 pidgin/gtkutils.c               |  12 +-----------
 pidgin/gtkutils.h               |  16 ----------------
 pidgin/gtkxfer.c                |   2 +-
 pidgin/plugins/disco/gtkdisco.c |   2 +-
 8 files changed, 8 insertions(+), 34 deletions(-)

diffs (140 lines):

diff --git a/pidgin/gtkprivacy.c b/pidgin/gtkprivacy.c
--- a/pidgin/gtkprivacy.c
+++ b/pidgin/gtkprivacy.c
@@ -387,7 +387,7 @@ privacy_dialog_new(void)
 	gtk_box_pack_start(GTK_BOX(vbox), dialog->block_widget, TRUE, TRUE, 0);
 
 	/* Add the button box for Add, Remove, Remove All */
-	dialog->button_box = pidgin_dialog_get_action_area(GTK_DIALOG(dialog->win));
+	dialog->button_box = gtk_dialog_get_action_area(GTK_DIALOG(dialog->win));
 
 	/* Add button */
 	button = pidgin_dialog_add_button(GTK_DIALOG(dialog->win), _("Add"), G_CALLBACK(add_cb), dialog);
diff --git a/pidgin/gtkrequest.c b/pidgin/gtkrequest.c
--- a/pidgin/gtkrequest.c
+++ b/pidgin/gtkrequest.c
@@ -2010,7 +2010,7 @@ pidgin_request_fields(const char *title,
 
 	/* Setup the main horizontal box */
 	hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PIDGIN_HIG_BORDER);
-	gtk_container_add(GTK_CONTAINER(pidgin_dialog_get_vbox(GTK_DIALOG(win))), hbox);
+	gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), hbox);
 	gtk_widget_show(hbox);
 
 	/* Dialog icon. */
diff --git a/pidgin/gtkroomlist.c b/pidgin/gtkroomlist.c
--- a/pidgin/gtkroomlist.c
+++ b/pidgin/gtkroomlist.c
@@ -562,7 +562,7 @@ pidgin_roomlist_dialog_new_with_account(
 	gtk_widget_show(dialog->progress);
 
 	/* button box */
-	bbox = pidgin_dialog_get_action_area(GTK_DIALOG(window));
+	bbox = gtk_dialog_get_action_area(GTK_DIALOG(window));
 	gtk_box_set_spacing(GTK_BOX(bbox), PIDGIN_HIG_BOX_SPACE);
 	gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
 
diff --git a/pidgin/gtksavedstatuses.c b/pidgin/gtksavedstatuses.c
--- a/pidgin/gtksavedstatuses.c
+++ b/pidgin/gtksavedstatuses.c
@@ -573,7 +573,7 @@ pidgin_status_window_show(void)
 	gtk_box_pack_start(GTK_BOX(vbox), list, TRUE, TRUE, 0);
 
 	/* Button box. */
-	bbox = pidgin_dialog_get_action_area(GTK_DIALOG(win));
+	bbox = gtk_dialog_get_action_area(GTK_DIALOG(win));
 
 	/* Use button */
 	button = pidgin_pixbuf_button_from_stock(_("_Use"), _("_Execute"),
@@ -1192,7 +1192,7 @@ pidgin_status_editor_show(gboolean edit,
 		(saved_status != NULL) && purple_savedstatus_has_substatuses(saved_status));
 
 	/* Button box */
-	bbox = pidgin_dialog_get_action_area(GTK_DIALOG(win));
+	bbox = gtk_dialog_get_action_area(GTK_DIALOG(win));
 	gtk_box_set_spacing(GTK_BOX(bbox), PIDGIN_HIG_BOX_SPACE);
 	gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
 
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -237,21 +237,11 @@ pidgin_dialog_get_vbox_with_properties(G
 	return GTK_WIDGET(vbox);
 }
 
-GtkWidget *pidgin_dialog_get_vbox(GtkDialog *dialog)
-{
-	return gtk_dialog_get_content_area(GTK_DIALOG(dialog));
-}
-
-GtkWidget *pidgin_dialog_get_action_area(GtkDialog *dialog)
-{
-	return gtk_dialog_get_action_area(GTK_DIALOG(dialog));
-}
-
 GtkWidget *pidgin_dialog_add_button(GtkDialog *dialog, const char *label,
 		GCallback callback, gpointer callbackdata)
 {
 	GtkWidget *button = gtk_button_new_from_stock(label);
-	GtkWidget *bbox = pidgin_dialog_get_action_area(dialog);
+	GtkWidget *bbox = gtk_dialog_get_action_area(dialog);
 	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
 	if (callback)
 		g_signal_connect(G_OBJECT(button), "clicked", callback, callbackdata);
diff --git a/pidgin/gtkutils.h b/pidgin/gtkutils.h
--- a/pidgin/gtkutils.h
+++ b/pidgin/gtkutils.h
@@ -151,14 +151,6 @@ GtkWidget *pidgin_create_dialog(const ch
 GtkWidget *pidgin_dialog_get_vbox_with_properties(GtkDialog *dialog, gboolean homogeneous, gint spacing);
 
 /**
- * pidgin_dialog_get_vbox:
- * @dialog:       The dialog window
- *
- * Retrieves the main content box (vbox) from a pidgin dialog window
- */
-GtkWidget *pidgin_dialog_get_vbox(GtkDialog *dialog);
-
-/**
  * pidgin_dialog_add_button:
  * @dialog:         The dialog window
  * @label:          The stock-id or the label for the button
@@ -173,14 +165,6 @@ GtkWidget *pidgin_dialog_add_button(GtkD
 		GCallback callback, gpointer callbackdata);
 
 /**
- * pidgin_dialog_get_action_area:
- * @dialog:       The dialog window
- *
- * Retrieves the action area (button box) from a pidgin dialog window
- */
-GtkWidget *pidgin_dialog_get_action_area(GtkDialog *dialog);
-
-/**
  * pidgin_toggle_sensitive:
  * @widget:    %NULL. Used for signal handlers.
  * @to_toggle: The widget to toggle.
diff --git a/pidgin/gtkxfer.c b/pidgin/gtkxfer.c
--- a/pidgin/gtkxfer.c
+++ b/pidgin/gtkxfer.c
@@ -771,7 +771,7 @@ pidgin_xfer_dialog_new(void)
 	gtk_container_add(GTK_CONTAINER(alignment), grid);
 	gtk_widget_show(grid);
 
-	bbox = pidgin_dialog_get_action_area(GTK_DIALOG(window));
+	bbox = gtk_dialog_get_action_area(GTK_DIALOG(window));
 
 #define ADD_BUTTON(b, label, callback, callbackdata) do { \
 		GtkWidget *button = gtk_button_new_with_mnemonic(_(label)); \
diff --git a/pidgin/plugins/disco/gtkdisco.c b/pidgin/plugins/disco/gtkdisco.c
--- a/pidgin/plugins/disco/gtkdisco.c
+++ b/pidgin/plugins/disco/gtkdisco.c
@@ -662,7 +662,7 @@ PidginDiscoDialog *pidgin_disco_dialog_n
 	gtk_widget_show(dialog->progress);
 
 	/* button box */
-	bbox = pidgin_dialog_get_action_area(GTK_DIALOG(window));
+	bbox = gtk_dialog_get_action_area(GTK_DIALOG(window));
 	gtk_box_set_spacing(GTK_BOX(bbox), PIDGIN_HIG_BOX_SPACE);
 	gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
 



More information about the Commits mailing list