Rename optmenu -> chooser in other files.

Tue, 13 Aug 2019 05:40:30 -0400

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Tue, 13 Aug 2019 05:40:30 -0400
changeset 39796
b42070e4ea6e
parent 39795
5b9c99c1378d
child 39797
b291719ba156

Rename optmenu -> chooser in other files.

pidgin/gtkutils.c file | annotate | diff | comparison | revisions
pidgin/gtkutils.h file | annotate | diff | comparison | revisions
pidgin/plugins/contact_priority.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkutils.c	Tue Aug 13 05:33:59 2019 -0400
+++ b/pidgin/gtkutils.c	Tue Aug 13 05:40:30 2019 -0400
@@ -1794,7 +1794,9 @@
 }
 
 void
-pidgin_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *accountopt, PidginFilterBuddyCompletionEntryFunc filter_func, gpointer user_data)
+pidgin_setup_screenname_autocomplete(
+        GtkWidget *entry, GtkWidget *chooser,
+        PidginFilterBuddyCompletionEntryFunc filter_func, gpointer user_data)
 {
 	PidginCompletionData *data;
 
@@ -1813,7 +1815,7 @@
 	                           G_TYPE_POINTER);
 
 	data->entry = entry;
-	data->accountopt = accountopt;
+	data->accountopt = chooser;
 	if (filter_func == NULL) {
 		data->filter_func = pidgin_screenname_autocomplete_default_filter;
 		data->filter_func_user_data = NULL;
--- a/pidgin/gtkutils.h	Tue Aug 13 05:33:59 2019 -0400
+++ b/pidgin/gtkutils.h	Tue Aug 13 05:40:30 2019 -0400
@@ -286,16 +286,19 @@
 /**
  * pidgin_setup_screenname_autocomplete:
  * @entry:       The GtkEntry on which to setup autocomplete.
- * @optmenu: A menu for accounts, returned by pidgin_account_chooser_new(). If
- *           @optmenu is not %NULL, it'll be updated when a username is chosen
+ * @chooser: A menu for accounts, returned by pidgin_account_chooser_new(). If
+ *           @chooser is not %NULL, it'll be updated when a username is chosen
  *           from the autocomplete list.
  * @filter_func: (scope call): A function for checking if an autocomplete entry
  *                    should be shown. This can be %NULL.
  * @user_data:  The data to be passed to the filter_func function.
  *
- * Add autocompletion of screenames to an entry, supporting a filtering function.
+ * Add autocompletion of screenames to an entry, supporting a filtering
+ * function.
  */
-void pidgin_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *optmenu, PidginFilterBuddyCompletionEntryFunc filter_func, gpointer user_data);
+void pidgin_setup_screenname_autocomplete(
+        GtkWidget *entry, GtkWidget *chooser,
+        PidginFilterBuddyCompletionEntryFunc filter_func, gpointer user_data);
 
 /**
  * pidgin_screenname_autocomplete_default_filter:
--- a/pidgin/plugins/contact_priority.c	Tue Aug 13 05:33:59 2019 -0400
+++ b/pidgin/plugins/contact_priority.c	Tue Aug 13 05:40:30 2019 -0400
@@ -39,11 +39,11 @@
 }
 
 static void
-account_update(GtkWidget *widget, GtkWidget *optmenu)
+account_update(GtkWidget *widget, GtkWidget *chooser)
 {
 	PurpleAccount *account = NULL;
 
-	account = pidgin_account_chooser_get_selected(optmenu);
+	account = pidgin_account_chooser_get_selected(chooser);
 	purple_account_set_int(account, "score", gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget)));
 }
 
@@ -78,7 +78,7 @@
 {
 	GtkWidget *ret = NULL, *hbox = NULL, *frame = NULL, *vbox = NULL;
 	GtkWidget *label = NULL, *spin = NULL, *check = NULL;
-	GtkWidget *optmenu = NULL;
+	GtkWidget *chooser = NULL;
 	GtkAdjustment *adj = NULL;
 	GtkSizeGroup *sg = NULL;
 	PurpleAccount *account = NULL;
@@ -147,17 +147,17 @@
 	adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -500, 500, 1, 1, 1));
 	spin = gtk_spin_button_new(adj, 1, 0);
 
-	optmenu = pidgin_account_chooser_new(NULL, TRUE);
-	gtk_box_pack_start(GTK_BOX(hbox), optmenu, FALSE, FALSE, 0);
-	g_signal_connect(optmenu, "changed", G_CALLBACK(select_account), spin);
+	chooser = pidgin_account_chooser_new(NULL, TRUE);
+	gtk_box_pack_start(GTK_BOX(hbox), chooser, FALSE, FALSE, 0);
+	g_signal_connect(chooser, "changed", G_CALLBACK(select_account), spin);
 
 	/* this is where we set up the spin button we made above */
-	account = pidgin_account_chooser_get_selected(optmenu);
+	account = pidgin_account_chooser_get_selected(chooser);
 	gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin),
 	                          (gdouble)purple_account_get_int(account, "score", 0));
 	gtk_spin_button_set_adjustment(GTK_SPIN_BUTTON(spin), GTK_ADJUSTMENT(adj));
 	g_signal_connect(G_OBJECT(spin), "value-changed",
-	                 G_CALLBACK(account_update), optmenu);
+	                 G_CALLBACK(account_update), chooser);
 	gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0);
 
 	gtk_widget_show_all(ret);

mercurial