/soc/2015/mmcc/main: 7a9372afa360: rename custom gtk_* functions...

Michael McConville mmcconville at mykolab.com
Wed Jul 8 14:30:33 EDT 2015


Changeset: 7a9372afa360fe253623089919dd3e89cf9bb94c
Author:	 Michael McConville <mmcconville at mykolab.com>
Date:	 2015-07-08 14:30 -0400
Branch:	 default
URL: https://hg.pidgin.im/soc/2015/mmcc/main/rev/7a9372afa360

Description:

rename custom gtk_* functions with less confusing pidgin_* format

diffstat:

 pidgin/gtk3compat.h                           |   6 +-
 pidgin/gtkaccount.c                           |   2 +-
 pidgin/gtkblist.c                             |  10 ++--
 pidgin/gtkconv.c                              |  20 +++++-----
 pidgin/gtkdialogs.c                           |   2 +-
 pidgin/gtklog.c                               |   4 +-
 pidgin/gtkmedia.c                             |   4 +-
 pidgin/gtknotify.c                            |   8 ++--
 pidgin/gtkplugin.c                            |  16 ++++----
 pidgin/gtkpluginpref.c                        |   8 ++--
 pidgin/gtkpounce.c                            |  54 +++++++++++++-------------
 pidgin/gtkprefs.c                             |  46 +++++++++++-----------
 pidgin/gtkprivacy.c                           |   2 +-
 pidgin/gtkrequest.c                           |  32 ++++++++--------
 pidgin/gtksavedstatuses.c                     |   4 +-
 pidgin/gtkutils.c                             |   6 +-
 pidgin/gtkxfer.c                              |  10 ++--
 pidgin/minidialog.c                           |   6 +-
 pidgin/plugins/cap/cap.c                      |  12 +++---
 pidgin/plugins/contact_priority.c             |   2 +-
 pidgin/plugins/gevolution/add_buddy_dialog.c  |   2 +-
 pidgin/plugins/gevolution/assoc-buddy.c       |   2 +-
 pidgin/plugins/gevolution/gevolution.c        |   2 +-
 pidgin/plugins/gevolution/new_person_dialog.c |   6 +-
 pidgin/plugins/themeedit-icon.c               |   2 +-
 pidgin/plugins/themeedit.c                    |   4 +-
 pidgin/plugins/xmppconsole.c                  |  26 ++++++------
 27 files changed, 149 insertions(+), 149 deletions(-)

diffs (truncated from 1170 to 300 lines):

diff --git a/pidgin/gtk3compat.h b/pidgin/gtk3compat.h
--- a/pidgin/gtk3compat.h
+++ b/pidgin/gtk3compat.h
@@ -59,7 +59,7 @@ pidgin_color_chooser_get_rgb(GtkColorCho
 }
 
 static inline void
-gtk_grid_attach_defaults(GtkGrid *grid, GtkWidget *child, gint left, gint top,
+pidgin_grid_attach_defaults(GtkGrid *grid, GtkWidget *child, gint left, gint top,
 	gint width, gint height)
 {
 	gtk_grid_attach(grid, child, left, top, width, height);
@@ -68,7 +68,7 @@ gtk_grid_attach_defaults(GtkGrid *grid, 
 }
 
 static inline void
-gtk_grid_attach_full(GtkGrid *grid, GtkWidget *child, guint left, guint top,
+pidgin_grid_attach_full(GtkGrid *grid, GtkWidget *child, guint left, guint top,
 	guint width, guint height, GtkAttachOptions xoptions,
 	GtkAttachOptions yoptions, guint xpadding, guint ypadding)
 {
@@ -90,7 +90,7 @@ gtk_grid_attach_full(GtkGrid *grid, GtkW
 }
 
 static inline void
-gtk_label_set_alignment(GtkLabel *label, gfloat xalign, gfloat yalign)
+pidgin_label_set_alignment(GtkLabel *label, gfloat xalign, gfloat yalign)
 {
 #if GTK_CHECK_VERSION (3,16,0)
 	gtk_label_set_xalign(label, xalign);
diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -2299,7 +2299,7 @@ create_accounts_list(AccountsWindow *dia
 	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
 	gtk_widget_show(label);
 
-	gtk_label_set_alignment(GTK_LABEL(label), 0.5, 0.5);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0.5, 0.5);
 	gtk_notebook_append_page(GTK_NOTEBOOK(accounts_window->notebook), label, NULL);
 
 	/* Create the list model. */
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -1010,7 +1010,7 @@ make_blist_request_dialog(PidginBlistReq
 
 	gtk_widget_set_size_request(label, 400, -1);
 	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-	gtk_label_set_alignment(GTK_LABEL(label), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0, 0);
 	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
 
 	data->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
@@ -5375,7 +5375,7 @@ create_account_label(PurpleAccount *acco
 	markup = g_strdup_printf("<span size=\"smaller\">%s</span>", username);
 	gtk_label_set_markup(GTK_LABEL(label), markup);
 	g_free(markup);
-	gtk_label_set_alignment(GTK_LABEL(label), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0, 0);
 	g_object_set(G_OBJECT(label), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
 	description = purple_account_get_current_error(account)->description;
 	if (description != NULL && *description != '\0')
@@ -5555,14 +5555,14 @@ kiosk_page()
 
 	label = gtk_label_new(NULL);
 	gtk_label_set_markup(GTK_LABEL(label), _("<b>Username:</b>"));
-	gtk_label_set_alignment(GTK_LABEL(label), 0.0, 0.5);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0.0, 0.5);
 	gtk_box_pack_start(GTK_BOX(ret), label, FALSE, FALSE, 0);
 	entry = gtk_entry_new();
 	gtk_box_pack_start(GTK_BOX(ret), entry, FALSE, FALSE, 0);
 
 	label = gtk_label_new(NULL);
 	gtk_label_set_markup(GTK_LABEL(label), _("<b>Password:</b>"));
-	gtk_label_set_alignment(GTK_LABEL(label), 0.0, 0.5);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0.0, 0.5);
 	gtk_box_pack_start(GTK_BOX(ret), label, FALSE, FALSE, 0);
 	entry = gtk_entry_new();
 	gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
@@ -5872,7 +5872,7 @@ static void pidgin_blist_show(PurpleBudd
 	g_free(tmp);
 	label = gtk_label_new(NULL);
 	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-	gtk_label_set_alignment(GTK_LABEL(label), 0.5, 0.2);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0.5, 0.2);
 	gtk_label_set_markup(GTK_LABEL(label), pretty);
 	g_free(pretty);
 	gtk_notebook_append_page(GTK_NOTEBOOK(gtkblist->notebook),label, NULL);
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -970,7 +970,7 @@ invite_cb(GtkWidget *widget, PidginConve
 								"message."));
 		gtk_widget_set_size_request(label, 350, -1);
 		gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-		gtk_label_set_alignment(GTK_LABEL(label), 0, 0);
+		pidgin_label_set_alignment(GTK_LABEL(label), 0, 0);
 		gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
 
 		/* hbox for the grid, and to give it some spacing on the left. */
@@ -987,28 +987,28 @@ invite_cb(GtkWidget *widget, PidginConve
 		/* Now the Buddy label */
 		label = gtk_label_new(NULL);
 		gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), _("_Buddy:"));
-		gtk_label_set_alignment(GTK_LABEL(label), 0, 0);
-		gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, 0, 1, 1);
+		pidgin_label_set_alignment(GTK_LABEL(label), 0, 0);
+		pidgin_grid_attach_defaults(GTK_GRID(grid), label, 0, 0, 1, 1);
 
 		/* Now the Buddy drop-down entry field. */
 		info->entry = gtk_entry_new();
 		pidgin_setup_screenname_autocomplete(info->entry, NULL, chat_invite_filter,
 				purple_conversation_get_account(PURPLE_CONVERSATION(chat)));
-		gtk_grid_attach_defaults(GTK_GRID(grid), info->entry, 1, 0, 1, 1);
+		pidgin_grid_attach_defaults(GTK_GRID(grid), info->entry, 1, 0, 1, 1);
 		gtk_label_set_mnemonic_widget(GTK_LABEL(label), info->entry);
 
 		/* Now the label for "Message" */
 		label = gtk_label_new(NULL);
 		gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), _("_Message:"));
-		gtk_label_set_alignment(GTK_LABEL(label), 0, 0);
-		gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, 1, 1, 1);
+		pidgin_label_set_alignment(GTK_LABEL(label), 0, 0);
+		pidgin_grid_attach_defaults(GTK_GRID(grid), label, 0, 1, 1, 1);
 
 
 		/* And finally, the Message entry field. */
 		info->message = gtk_entry_new();
 		gtk_entry_set_activates_default(GTK_ENTRY(info->message), TRUE);
 
-		gtk_grid_attach_defaults(GTK_GRID(grid), info->message, 1, 1, 1, 1);
+		pidgin_grid_attach_defaults(GTK_GRID(grid), info->message, 1, 1, 1, 1);
 		gtk_label_set_mnemonic_widget(GTK_LABEL(label), info->message);
 
 		/* Connect the signals. */
@@ -9042,7 +9042,7 @@ build_warn_close_dialog(PidginConvWindow
 	label = gtk_label_new(_("You have unread messages. Are you sure you want to close the window?"));
 	gtk_widget_set_size_request(label, 350, -1);
 	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-	gtk_label_set_alignment(GTK_LABEL(label), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0, 0);
 	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
 
 	/* Connect the signals. */
@@ -10344,7 +10344,7 @@ pidgin_conv_window_add_gtkconv(PidginCon
 
 	gtk_box_pack_start(GTK_BOX(gtkconv->menu_tabby), gtkconv->menu_label, TRUE, TRUE, 0);
 	gtk_widget_show(gtkconv->menu_label);
-	gtk_label_set_alignment(GTK_LABEL(gtkconv->menu_label), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(gtkconv->menu_label), 0, 0);
 
 	gtk_widget_show(gtkconv->menu_tabby);
 
@@ -10406,7 +10406,7 @@ pidgin_conv_tab_pack(PidginConvWindow *w
 	gtk_label_set_angle(GTK_LABEL(gtkconv->tab_label), angle);
 
 #if 0
-	gtk_label_set_alignment(GTK_LABEL(gtkconv->tab_label), 0, 0.5);
+	pidgin_label_set_alignment(GTK_LABEL(gtkconv->tab_label), 0, 0.5);
 	gtk_misc_set_padding(GTK_MISC(gtkconv->tab_label), 4, 0);
 #endif
 
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -1071,7 +1071,7 @@ pidgin_dialogs_ee(const char *ee)
 	gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
 
 	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-	gtk_label_set_alignment(GTK_LABEL(label), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0, 0);
 	gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
 
 	gtk_widget_show_all(window);
diff --git a/pidgin/gtklog.c b/pidgin/gtklog.c
--- a/pidgin/gtklog.c
+++ b/pidgin/gtklog.c
@@ -602,7 +602,7 @@ static PidginLogViewer *display_log_view
 	text = g_strdup_printf("<span size='larger' weight='bold'>%s</span>", title);
 
 	gtk_label_set_markup(lv->label, text);
-	gtk_label_set_alignment(GTK_LABEL(lv->label), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(lv->label), 0, 0);
 	gtk_box_pack_start(GTK_BOX(title_box), GTK_WIDGET(lv->label), FALSE, FALSE, 0);
 	g_free(text);
 
@@ -644,7 +644,7 @@ static PidginLogViewer *display_log_view
 		size_label = gtk_label_new(NULL);
 		gtk_label_set_markup(GTK_LABEL(size_label), text);
 		/*		gtk_paned_add1(GTK_PANED(pane), size_label); */
-		gtk_label_set_alignment(GTK_LABEL(size_label), 0, 0);
+		pidgin_label_set_alignment(GTK_LABEL(size_label), 0, 0);
 		gtk_box_pack_end(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(lv->window))),
 		                 size_label, FALSE, FALSE, 0);
 		g_free(sz_txt);
diff --git a/pidgin/gtkmedia.c b/pidgin/gtkmedia.c
--- a/pidgin/gtkmedia.c
+++ b/pidgin/gtkmedia.c
@@ -768,10 +768,10 @@ phone_create_button(const gchar *text_hi
 
 	button = gtk_button_new();
 	label_hi = gtk_label_new(text_hi_local);
-	gtk_label_set_alignment(GTK_LABEL(label_hi), 0.5, 0.5);
+	pidgin_label_set_alignment(GTK_LABEL(label_hi), 0.5, 0.5);
 	gtk_box_pack_end(GTK_BOX(grid), label_hi, FALSE, TRUE, 0);
 	label_lo = gtk_label_new(text_lo);
-	gtk_label_set_alignment(GTK_LABEL(label_lo), 0.5, 0.5);
+	pidgin_label_set_alignment(GTK_LABEL(label_lo), 0.5, 0.5);
 	gtk_label_set_use_markup(GTK_LABEL(label_lo), TRUE);
 	gtk_box_pack_end(GTK_BOX(grid), label_lo, FALSE, TRUE, 0);
 	gtk_container_add(GTK_CONTAINER(button), grid);
diff --git a/pidgin/gtknotify.c b/pidgin/gtknotify.c
--- a/pidgin/gtknotify.c
+++ b/pidgin/gtknotify.c
@@ -611,7 +611,7 @@ pidgin_notify_message(PurpleNotifyMsgTyp
 	gtk_label_set_markup(GTK_LABEL(label), label_text);
 	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
 	gtk_label_set_selectable(GTK_LABEL(label), TRUE);
-	gtk_label_set_alignment(GTK_LABEL(label), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0, 0);
 	gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
 
 	g_object_set_data(G_OBJECT(dialog), "pidgin-parent-from",
@@ -914,7 +914,7 @@ pidgin_notify_formatted(const char *titl
 	gtk_label_set_markup(GTK_LABEL(label), label_text);
 	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
 	gtk_label_set_selectable(GTK_LABEL(label), TRUE);
-	gtk_label_set_alignment(GTK_LABEL(label), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0, 0);
 	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
 	gtk_widget_show(label);
 
@@ -1039,7 +1039,7 @@ pidgin_notify_searchresults(PurpleConnec
 	label = gtk_label_new(NULL);
 	gtk_label_set_markup(GTK_LABEL(label), label_text);
 	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-	gtk_label_set_alignment(GTK_LABEL(label), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0, 0);
 	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
 	gtk_widget_show(label);
 	g_free(label_text);
@@ -1739,7 +1739,7 @@ pidgin_create_notification_dialog(Pidgin
 		_("_Close"), GTK_RESPONSE_CLOSE);
 
 	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-	gtk_label_set_alignment(GTK_LABEL(label), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0, 0);
 	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
 	gtk_box_pack_start(GTK_BOX(vbox),
 		pidgin_make_scrollable(spec_dialog->treeview, GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS, GTK_SHADOW_IN, -1, -1),
diff --git a/pidgin/gtkplugin.c b/pidgin/gtkplugin.c
--- a/pidgin/gtkplugin.c
+++ b/pidgin/gtkplugin.c
@@ -895,7 +895,7 @@ create_details()
 	GtkWidget *label, *view, *website_button;
 
 	plugin_name = GTK_LABEL(gtk_label_new(NULL));
-	gtk_label_set_alignment(GTK_LABEL(plugin_name), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(plugin_name), 0, 0);
 	gtk_label_set_line_wrap(plugin_name, FALSE);
 	gtk_label_set_selectable(plugin_name, TRUE);
 	gtk_box_pack_start(vbox, GTK_WIDGET(plugin_name), FALSE, FALSE, 0);
@@ -910,19 +910,19 @@ create_details()
 	gtk_box_pack_start(vbox, view, TRUE, TRUE, 0);
 
 	plugin_error = GTK_LABEL(gtk_label_new(NULL));
-	gtk_label_set_alignment(GTK_LABEL(plugin_error), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(plugin_error), 0, 0);
 	gtk_label_set_line_wrap(plugin_error, FALSE);
 	gtk_label_set_selectable(plugin_error, TRUE);
 	gtk_box_pack_start(vbox, GTK_WIDGET(plugin_error), FALSE, FALSE, 0);
 
 	plugin_authors = GTK_LABEL(gtk_label_new(NULL));
 	gtk_label_set_line_wrap(plugin_authors, FALSE);
-	gtk_label_set_alignment(GTK_LABEL(plugin_authors), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(plugin_authors), 0, 0);
 	gtk_label_set_selectable(plugin_authors, TRUE);
 	pidgin_add_widget_to_vbox(vbox, "", sg,
 		GTK_WIDGET(plugin_authors), TRUE, &label);
 	gtk_label_set_markup(GTK_LABEL(label), _("<b>Written by:</b>"));
-	gtk_label_set_alignment(GTK_LABEL(label), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(label), 0, 0);
 
 	website_button = gtk_event_box_new();
 	gtk_event_box_set_visible_window(GTK_EVENT_BOX(website_button), FALSE);
@@ -930,7 +930,7 @@ create_details()
 	plugin_website = GTK_LABEL(gtk_label_new(NULL));
 	g_object_set(G_OBJECT(plugin_website),
 		"ellipsize", PANGO_ELLIPSIZE_MIDDLE, NULL);
-	gtk_label_set_alignment(GTK_LABEL(plugin_website), 0, 0);
+	pidgin_label_set_alignment(GTK_LABEL(plugin_website), 0, 0);
 	gtk_container_add(GTK_CONTAINER(website_button),
 		GTK_WIDGET(plugin_website));
 	g_signal_connect(website_button, "button-release-event",
@@ -942,16 +942,16 @@ create_details()
 
 	pidgin_add_widget_to_vbox(vbox, "", sg, website_button, TRUE, &label);
 	gtk_label_set_markup(GTK_LABEL(label), _("<b>Web site:</b>"));
-	gtk_label_set_alignment(GTK_LABEL(label), 0, 0.5);



More information about the Commits mailing list