diff src/gtkutils.c @ 8289:e39ea2b4f6cd

[gaim-migrate @ 9013] - Moved GaimCheckAccountFunc into account.h, and renamed it to GaimFilterAccountFunc. - Added filter functions to the account field in the gaim_request_fields API. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 19 Feb 2004 07:25:31 +0000
parents 4a6448907382
children 19459d9eead2
line wrap: on
line diff
--- a/src/gtkutils.c	Thu Feb 19 00:00:37 2004 +0000
+++ b/src/gtkutils.c	Thu Feb 19 07:25:31 2004 +0000
@@ -761,7 +761,7 @@
 
 static void
 create_account_menu(GtkWidget *optmenu, GaimAccount *default_account,
-					GaimCheckAccountFunc check_account_func, gboolean show_all)
+					GaimFilterAccountFunc filter_func, gboolean show_all)
 {
 	GaimAccount *account;
 	GtkWidget *menu;
@@ -801,7 +801,7 @@
 			account = gaim_connection_get_account(gc);
 		}
 
-		if (check_account_func && !check_account_func(account)) {
+		if (filter_func && !filter_func(account)) {
 			i--;
 			continue;
 		}
@@ -891,7 +891,7 @@
 	GtkWidget *item;
 	gboolean show_all;
 	GaimAccount *account;
-	GaimCheckAccountFunc check_account_func;
+	GaimFilterAccountFunc filter_func;
 
 	menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(optmenu));
 	item = gtk_menu_get_active(GTK_MENU(menu));
@@ -900,12 +900,12 @@
 	show_all = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(optmenu),
 												 "show_all"));
 
-	check_account_func = g_object_get_data(G_OBJECT(optmenu),
-										   "check_account_func");
+	filter_func = g_object_get_data(G_OBJECT(optmenu),
+										   "filter_func");
 
 	gtk_option_menu_remove_menu(GTK_OPTION_MENU(optmenu));
 
-	create_account_menu(optmenu, account, check_account_func, show_all);
+	create_account_menu(optmenu, account, filter_func, show_all);
 }
 
 static void
@@ -932,7 +932,7 @@
 GtkWidget *
 gaim_gtk_account_option_menu_new(GaimAccount *default_account,
 								 gboolean show_all, GCallback cb,
-								 GaimCheckAccountFunc check_account_func,
+								 GaimFilterAccountFunc filter_func,
 								 gpointer user_data)
 {
 	GtkWidget *optmenu;
@@ -961,11 +961,11 @@
 	/* Set some data. */
 	g_object_set_data(G_OBJECT(optmenu), "user_data", user_data);
 	g_object_set_data(G_OBJECT(optmenu), "show_all", GINT_TO_POINTER(show_all));
-	g_object_set_data(G_OBJECT(optmenu), "check_account_func",
-					  check_account_func);
+	g_object_set_data(G_OBJECT(optmenu), "filter_func",
+					  filter_func);
 
 	/* Create and set the actual menu. */
-	create_account_menu(optmenu, default_account, check_account_func, show_all);
+	create_account_menu(optmenu, default_account, filter_func, show_all);
 
 	/* And now the last callback. */
 	g_signal_connect(G_OBJECT(optmenu), "changed",