changeset 12088:980c877bd238

[gaim-migrate @ 14385] sf patch #1356873, from Will Thompson (resiak) "gaim_find_buddys_group is a stupid name. gaim_buddy_get_group is not a stupid name." Way to think outside the box! committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 14 Nov 2005 22:41:52 +0000
parents f30a6ad84aff
children ed60afb9294f
files plugins/perl/common/BuddyList.xs src/account.c src/blist.c src/blist.h src/gtkconv.c src/gtkdialogs.c src/protocols/jabber/roster.c src/protocols/oscar/oscar.c src/protocols/sametime/sametime.c src/protocols/yahoo/yahoo.c
diffstat 10 files changed, 25 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/perl/common/BuddyList.xs	Mon Nov 14 22:20:24 2005 +0000
+++ b/plugins/perl/common/BuddyList.xs	Mon Nov 14 22:41:52 2005 +0000
@@ -36,10 +36,6 @@
 gaim_find_group(name)
 	const char *name
 
-Gaim::BuddyList::Group  
-gaim_find_buddys_group(buddy)
-	Gaim::BuddyList::Buddy buddy
-
 
 
 
@@ -363,6 +359,10 @@
 gaim_buddy_get_account(buddy)
 	Gaim::BuddyList::Buddy buddy
 
+Gaim::BuddyList::Group
+gaim_buddy_get_group(buddy)
+	Gaim::BuddyList::Buddy buddy
+
 const char *
 gaim_buddy_get_name(buddy)
 	Gaim::BuddyList::Buddy buddy
--- a/src/account.c	Mon Nov 14 22:20:24 2005 +0000
+++ b/src/account.c	Mon Nov 14 22:41:52 2005 +0000
@@ -1942,7 +1942,7 @@
 
 	if (prpl_info != NULL && g_list_find(gaim_connections_get_all(), gc) &&
 			prpl_info->add_buddy != NULL)
-		prpl_info->add_buddy(gc, buddy, gaim_find_buddys_group(buddy));
+		prpl_info->add_buddy(gc, buddy, gaim_buddy_get_group(buddy));
 }
 
 void
--- a/src/blist.c	Mon Nov 14 22:20:24 2005 +0000
+++ b/src/blist.c	Mon Nov 14 22:41:52 2005 +0000
@@ -2121,7 +2121,7 @@
 	return buddy->presence;
 }
 
-GaimGroup *gaim_find_buddys_group(GaimBuddy *buddy)
+GaimGroup *gaim_buddy_get_group(GaimBuddy *buddy)
 {
 	g_return_val_if_fail(buddy != NULL, NULL);
 
--- a/src/blist.h	Mon Nov 14 22:20:24 2005 +0000
+++ b/src/blist.h	Mon Nov 14 22:41:52 2005 +0000
@@ -634,7 +634,7 @@
  * @param buddy   The buddy
  * @return        The group or NULL if the buddy is not in a group
  */
-GaimGroup *gaim_find_buddys_group(GaimBuddy *buddy);
+GaimGroup *gaim_buddy_get_group(GaimBuddy *buddy);
 
 
 /**
--- a/src/gtkconv.c	Mon Nov 14 22:20:24 2005 +0000
+++ b/src/gtkconv.c	Mon Nov 14 22:41:52 2005 +0000
@@ -6519,11 +6519,6 @@
 gaim_gtk_conv_window_raise(GaimGtkWindow *win)
 {
 	gtk_window_present(GTK_WINDOW(win->window));
-/*
-	gtk_widget_show(win->window);
-	gtk_window_deiconify(GTK_WINDOW(win->window));
-	gdk_window_raise(win->window->window);
-*/
 }
 
 void
@@ -6928,7 +6923,7 @@
 		                        gaim_conversation_get_name(conv->active_conv));
 
 		if (buddy != NULL)
-			group = gaim_find_buddys_group(buddy);
+			group = gaim_buddy_get_group(buddy);
 
 	} else if (gaim_conversation_get_type(conv->active_conv) == GAIM_CONV_TYPE_CHAT) {
 		GaimChat *chat;
--- a/src/gtkdialogs.c	Mon Nov 14 22:20:24 2005 +0000
+++ b/src/gtkdialogs.c	Mon Nov 14 22:41:52 2005 +0000
@@ -891,7 +891,7 @@
 	gchar *name;
 	GaimAccount *account;
 
-	group = gaim_find_buddys_group(buddy);
+	group = gaim_buddy_get_group(buddy);
 	name = g_strdup(buddy->name); /* b->name is a crasher after remove_buddy */
 	account = buddy->account;
 
--- a/src/protocols/jabber/roster.c	Mon Nov 14 22:20:24 2005 +0000
+++ b/src/protocols/jabber/roster.c	Mon Nov 14 22:41:52 2005 +0000
@@ -74,7 +74,7 @@
 
 	while(buddies) {
 		GaimBuddy *b = buddies->data;
-		GaimGroup *g = gaim_find_buddys_group(b);
+		GaimGroup *g = gaim_buddy_get_group(b);
 
 		buddies = g_slist_remove(buddies, b);
 
@@ -213,7 +213,7 @@
 			return;
 		while(buddies) {
 			b = buddies->data;
-			g = gaim_find_buddys_group(b);
+			g = gaim_buddy_get_group(b);
 			groups = g_slist_append(groups, g->name);
 			buddies = g_slist_remove(buddies, b);
 		}
@@ -312,7 +312,7 @@
 	buddies = gaim_find_buddies(gc->account, name);
 	while(buddies) {
 		b = buddies->data;
-		g = gaim_find_buddys_group(b);
+		g = gaim_buddy_get_group(b);
 		if(!strcmp(g->name, old_group))
 			groups = g_slist_append(groups, (char*)new_group); /* ick */
 		else
@@ -345,7 +345,7 @@
 
 		while(buddies) {
 			tmpbuddy = buddies->data;
-			tmpgroup = gaim_find_buddys_group(tmpbuddy);
+			tmpgroup = gaim_buddy_get_group(tmpbuddy);
 			groups = g_slist_append(groups, tmpgroup->name);
 			buddies = g_slist_remove(buddies, tmpbuddy);
 		}
--- a/src/protocols/oscar/oscar.c	Mon Nov 14 22:20:24 2005 +0000
+++ b/src/protocols/oscar/oscar.c	Mon Nov 14 22:41:52 2005 +0000
@@ -748,7 +748,7 @@
 		b = gaim_find_buddy(account, userinfo->sn);
 
 	if (b != NULL) {
-		g = gaim_find_buddys_group(b);
+		g = gaim_buddy_get_group(b);
 		presence = gaim_buddy_get_presence(b);
 		status = gaim_presence_get_active_status(presence);
 	}
@@ -4379,7 +4379,7 @@
 	if (g_list_find(gaim_connections_get_all(), gc)) {
 		OscarData *od = gc->proto_data;
 		GaimBuddy *buddy = gaim_find_buddy(gc->account, data->name);
-		GaimGroup *group = gaim_find_buddys_group(buddy);
+		GaimGroup *group = gaim_buddy_get_group(buddy);
 		if (buddy && group) {
 			gaim_debug_info("oscar",
 					   "ssi: adding buddy %s to group %s\n",
@@ -7781,7 +7781,7 @@
 		return;
 	}
 
-	if (!(g = gaim_find_buddys_group(b))) {
+	if (!(g = gaim_buddy_get_group(b))) {
 		oscar_free_name_data(data);
 		return;
 	}
@@ -7813,7 +7813,7 @@
 
 	data = g_new(struct name_data, 1);
 
-	if (!(g = gaim_find_buddys_group(buddy)))
+	if (!(g = gaim_buddy_get_group(buddy)))
 		return;
 	comment = aim_ssi_getcomment(od->sess->ssi.local, g->name, buddy->name);
 	comment_utf8 = comment ? gaim_utf8_try_convert(comment) : NULL;
--- a/src/protocols/sametime/sametime.c	Mon Nov 14 22:20:24 2005 +0000
+++ b/src/protocols/sametime/sametime.c	Mon Nov 14 22:41:52 2005 +0000
@@ -734,7 +734,7 @@
 
   add = g_list_prepend(NULL, &idb);
 
-  group = gaim_find_buddys_group(buddy);
+  group = gaim_buddy_get_group(buddy);
   list = list_ensure(pd, group);
 
   if(mwAwareList_addAware(list, add)) {
@@ -4484,7 +4484,7 @@
     idb->community = NULL;
 
     /* put idb into the list associated with the buddy's group */
-    g = gaim_find_buddys_group(b);
+    g = gaim_buddy_get_group(b);
     l = g_hash_table_lookup(group_sets, g);
     l = g_list_prepend(l, idb++);
     g_hash_table_insert(group_sets, g, l);
@@ -4511,7 +4511,7 @@
   GList *rem = g_list_prepend(NULL, &idb);
 
   pd = gc->proto_data;
-  group = gaim_find_buddys_group(buddy);
+  group = gaim_buddy_get_group(buddy);
   list = list_ensure(pd, group);
 
   mwAwareList_removeAware(list, rem);
--- a/src/protocols/yahoo/yahoo.c	Mon Nov 14 22:20:24 2005 +0000
+++ b/src/protocols/yahoo/yahoo.c	Mon Nov 14 22:41:52 2005 +0000
@@ -395,7 +395,7 @@
 
 	for (i = list; i; i = i->next) {
 		b = i->data;
-		g = gaim_find_buddys_group(b);
+		g = gaim_buddy_get_group(b);
 		if (!gaim_utf8_strcasecmp(group, g->name)) {
 			gaim_debug(GAIM_DEBUG_MISC, "yahoo",
 				"Oh good, %s is in the right group (%s).\n", name, group);
@@ -433,7 +433,7 @@
 
 	for (i = list; i; i = i->next) {
 		b = i->data;
-		g = gaim_find_buddys_group(b);
+		g = gaim_buddy_get_group(b);
 		gaim_debug(GAIM_DEBUG_MISC, "yahoo", "Deleting Buddy %s from group %s.\n", name, g->name);
 		gaim_blist_remove_buddy(b);
 	}
@@ -1701,7 +1701,7 @@
 	if (!buddy)
 		return;
 
-	group = gaim_find_buddys_group(buddy);
+	group = gaim_buddy_get_group(buddy);
 	name = g_strdup(buddy->name);
 	account = buddy->account;
 
@@ -3278,7 +3278,7 @@
 	if (foo)
 		group = foo->name;
 	if (!group) {
-		g = gaim_find_buddys_group(gaim_find_buddy(gc->account, buddy->name));
+		g = gaim_buddy_get_group(gaim_find_buddy(gc->account, buddy->name));
 		if (g)
 			group = g->name;
 		else
@@ -3308,7 +3308,7 @@
 
 	buddies = gaim_find_buddies(gaim_connection_get_account(gc), buddy->name);
 	for (l = buddies; l; l = l->next) {
-		g = gaim_find_buddys_group(l->data);
+		g = gaim_buddy_get_group(l->data);
 		if (gaim_utf8_strcasecmp(group->name, g->name)) {
 			remove = FALSE;
 			break;