changeset 31587:365ec0996ca0

merge of '2efa9b7fc41104668975df54e8be8a7171383794' and '88aea2f701d6cff5efc151d40ef06257da67cf3d'
author Paul Aurich <paul@darkrain42.org>
date Mon, 10 Jan 2011 05:20:06 +0000
parents d5b710c91104 (diff) 6826925abd6d (current diff)
children be5cb357c7b5 7986f4e5a05f
files ChangeLog
diffstat 6 files changed, 42 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Mon Jan 10 05:19:11 2011 +0000
+++ b/COPYRIGHT	Mon Jan 10 05:20:06 2011 +0000
@@ -81,6 +81,7 @@
 Norbert Buchmuller
 Johannes Buchner
 Sean Burke
+Gabriel Burt
 Thomas Butter
 Trevor Caira
 Andrea Canciani
--- a/ChangeLog	Mon Jan 10 05:19:11 2011 +0000
+++ b/ChangeLog	Mon Jan 10 05:20:06 2011 +0000
@@ -11,6 +11,10 @@
 	  (#12638)
 	* Added AddTrust External Root CA.  (#11554)
 
+	Groupwise:
+	* Don't show two windows when using "Get Info" on a buddy. (Gabriel Burt;
+	  Novell, Inc.) (#13108)
+
 	IRC:
 	* Don't send ISON messages longer than 512 bytes. (Jeffrey Honig) (#9692)
 
--- a/configure.ac	Mon Jan 10 05:19:11 2011 +0000
+++ b/configure.ac	Mon Jan 10 05:20:06 2011 +0000
@@ -329,7 +329,7 @@
 dnl #######################################################################
 dnl # Check for GLib 2.12 (required)
 dnl #######################################################################
-PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.12.0 gio-2.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [
+PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.12.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [
 	AC_MSG_RESULT(no)
 	AC_MSG_ERROR([
 
--- a/libpurple/protocols/msn/error.c	Mon Jan 10 05:19:11 2011 +0000
+++ b/libpurple/protocols/msn/error.c	Mon Jan 10 05:20:06 2011 +0000
@@ -31,7 +31,7 @@
 
 typedef struct
 {
-	PurpleConnection *gc;
+	MsnSession *session;
 	char *who;
 	char *group;
 	gboolean add;
@@ -293,9 +293,9 @@
 		group = purple_find_group(data->group);
 
 	if (group != NULL)
-		buddy = purple_find_buddy_in_group(purple_connection_get_account(data->gc), data->who, group);
+		buddy = purple_find_buddy_in_group(data->session->account, data->who, group);
 	else
-		buddy = purple_find_buddy(purple_connection_get_account(data->gc), data->who);
+		buddy = purple_find_buddy(data->session->account, data->who);
 
 	if (buddy != NULL)
 		purple_blist_remove_buddy(buddy);
@@ -309,14 +309,9 @@
 	/* this *should* be necessary !! */
 	msn_complete_sync_issue(data);
 #endif
+	MsnUserList *userlist = data->session->userlist;
 
-	if (g_list_find(purple_connections_get_all(), data->gc) != NULL)
-	{
-		MsnSession *session = data->gc->proto_data;
-		MsnUserList *userlist = session->userlist;
-
-		msn_userlist_add_buddy(userlist, data->who, data->group);
-	}
+	msn_userlist_add_buddy(userlist, data->who, data->group);
 
 	g_free(data->group);
 	g_free(data->who);
@@ -326,18 +321,14 @@
 static void
 msn_rem_cb(MsnAddRemData *data)
 {
+	MsnUserList *userlist = data->session->userlist;
 	msn_complete_sync_issue(data);
 
-	if (g_list_find(purple_connections_get_all(), data->gc) != NULL)
-	{
-		MsnSession *session = data->gc->proto_data;
-		MsnUserList *userlist = session->userlist;
 
-		if (data->group == NULL) {
-			msn_userlist_rem_buddy_from_list(userlist, data->who, MSN_LIST_FL);
-		} else {
-			g_free(data->group);
-		}
+	if (data->group == NULL) {
+		msn_userlist_rem_buddy_from_list(userlist, data->who, MSN_LIST_FL);
+	} else {
+		g_free(data->group);
 	}
 
 	g_free(data->who);
@@ -356,10 +347,10 @@
 	account = session->account;
 	gc = purple_account_get_connection(account);
 
-	data        = g_new0(MsnAddRemData, 1);
-	data->who   = g_strdup(passport);
-	data->group = g_strdup(group_name);
-	data->gc    = gc;
+	data          = g_new0(MsnAddRemData, 1);
+	data->who     = g_strdup(passport);
+	data->group   = g_strdup(group_name);
+	data->session = session;
 
 	msg = g_strdup_printf(_("Buddy list synchronization issue in %s (%s)"),
 						  purple_account_get_username(account),
@@ -382,7 +373,7 @@
 	}
 
 	purple_request_action(gc, NULL, msg, reason, PURPLE_DEFAULT_ACTION_NONE,
-						purple_connection_get_account(gc), data->who, NULL,
+						account, data->who, NULL,
 						data, 2,
 						_("Yes"), G_CALLBACK(msn_add_cb),
 						_("No"), G_CALLBACK(msn_rem_cb));
@@ -390,3 +381,4 @@
 	g_free(reason);
 	g_free(msg);
 }
+
--- a/libpurple/protocols/novell/novell.c	Mon Jan 10 05:19:11 2011 +0000
+++ b/libpurple/protocols/novell/novell.c	Mon Jan 10 05:20:06 2011 +0000
@@ -74,7 +74,7 @@
 _sync_privacy_lists(NMUser *user);
 
 static void
-_show_info(PurpleConnection * gc, NMUserRecord * user_record);
+_show_info(PurpleConnection * gc, NMUserRecord * user_record, char * name);
 
 const char *
 _get_conference_name(int id);
@@ -705,7 +705,7 @@
 		user_record = (NMUserRecord *) resp_data;
 		if (user_record) {
 			_show_info(purple_account_get_connection(user->client_data),
-					   user_record);
+					   user_record, g_strdup(name));
 		}
 	} else {
 		gc = purple_account_get_connection(user->client_data);
@@ -1505,7 +1505,7 @@
 
 /* Display a dialog box showing the properties for the given user record */
 static void
-_show_info(PurpleConnection * gc, NMUserRecord * user_record)
+_show_info(PurpleConnection * gc, NMUserRecord * user_record, char * name)
 {
 	PurpleNotifyUserInfo *user_info =	purple_notify_user_info_new();
 	int count, i;
@@ -1544,9 +1544,10 @@
 		}
 	}
 
-	purple_notify_userinfo(gc, nm_user_record_get_userid(user_record),
-						 user_info, NULL, NULL);
+	purple_notify_userinfo(gc, name, user_info, NULL, NULL);
 	purple_notify_user_info_destroy(user_info);
+
+	g_free(name);
 }
 
 /* Send a join conference, the first item in the parms list is the
@@ -2912,11 +2913,9 @@
 
 		user_record = nm_find_user_record(user, name);
 		if (user_record) {
-
-			_show_info(gc, user_record);
+			_show_info(gc, user_record, g_strdup(name));
 
 		} else {
-
 			rc = nm_send_get_details(user, name,
 									 _get_details_resp_show_info, g_strdup(name));
 
--- a/libpurple/protocols/zephyr/zephyr.c	Mon Jan 10 05:19:11 2011 +0000
+++ b/libpurple/protocols/zephyr/zephyr.c	Mon Jan 10 05:20:06 2011 +0000
@@ -870,12 +870,12 @@
 			zephyr_triple *zt1, *zt2;
 			gchar *send_inst_utf8;
 			zephyr_account *zephyr = gc->proto_data;
-			zt1 = new_triple(gc->proto_data,notice.z_class, notice.z_class_inst, notice.z_recipient);
-			zt2 = find_sub_by_triple(gc->proto_data,zt1);
+			zt1 = new_triple(zephyr,notice.z_class, notice.z_class_inst, notice.z_recipient);
+			zt2 = find_sub_by_triple(zephyr,zt1);
 			if (!zt2) {
 				/* This is a server supplied subscription */
 				zephyr->subscrips = g_slist_append(zephyr->subscrips, new_triple(zephyr,zt1->class,zt1->instance,zt1->recipient));
-				zt2 = find_sub_by_triple(gc->proto_data,zt1);
+				zt2 = find_sub_by_triple(zephyr,zt1);
 			}
 
 			if (!zt2->open) {
@@ -1499,6 +1499,7 @@
 
 static void process_anyone(PurpleConnection *gc)
 {
+	zephyr_account *zephyr = purple_connection_get_protocol_data(gc);
 	FILE *fd;
 	gchar buff[BUFSIZ], *filename;
 	PurpleGroup *g;
@@ -1515,7 +1516,7 @@
 			strip_comments(buff);
 			if (buff[0]) {
 				if (!(b = purple_find_buddy(gc->account, buff))) {
-					char *stripped_user = zephyr_strip_local_realm(gc->proto_data,buff);
+					char *stripped_user = zephyr_strip_local_realm(zephyr,buff);
 					purple_debug_info("zephyr","stripped_user %s\n",stripped_user);
 					if (!(b = purple_find_buddy(gc->account,stripped_user))){
 						b = purple_buddy_new(gc->account, stripped_user, NULL);
@@ -1924,13 +1925,12 @@
 	fclose(fd);
 }
 
-static void write_anyone(PurpleConnection *gc)
+static void write_anyone(zephyr_account *zephyr)
 {
 	GSList *buddies;
 	char *fname;
 	FILE *fd;
 	PurpleAccount *account;
-	zephyr_account* zephyr = gc->proto_data;
 	fname = g_strdup_printf("%s/.anyone", purple_home_dir());
 	fd = g_fopen(fname, "w");
 	if (!fd) {
@@ -1938,7 +1938,7 @@
 		return;
 	}
 
-	account = purple_connection_get_account(gc);
+	account = zephyr->account;
 	for (buddies = purple_find_buddies(account, NULL); buddies;
 			buddies = g_slist_delete_link(buddies, buddies)) {
 		PurpleBuddy *b = buddies->data;
@@ -1966,10 +1966,10 @@
 	g_list_free(zephyr->pending_zloc_names);
 
 	if (purple_account_get_bool(gc->account, "write_anyone", FALSE))
-		write_anyone(gc);
+		write_anyone(zephyr);
 
 	if (purple_account_get_bool(gc->account, "write_zsubs", FALSE))
-		write_zsubs(gc->proto_data);
+		write_zsubs(zephyr);
 
 	s = zephyr->subscrips;
 	while (s) {
@@ -2032,7 +2032,7 @@
 	char *recipient;
 	zephyr_account *zephyr = gc->proto_data;
 
-	zt = find_sub_by_id(gc->proto_data,id);
+	zt = find_sub_by_id(zephyr,id);
 	if (!zt)
 		/* this should never happen. */
 		return -EINVAL;
@@ -2432,8 +2432,8 @@
 	if (!g_ascii_strcasecmp(recip, "%me%"))
 		recip = zephyr->username;
 
-	zt1 = new_triple(gc->proto_data,classname, instname, recip);
-	zt2 = find_sub_by_triple(gc->proto_data,zt1);
+	zt1 = new_triple(zephyr,classname, instname, recip);
+	zt2 = find_sub_by_triple(zephyr,zt1);
 	if (zt2) {
 		free_triple(zt1);
 		if (!zt2->open) {
@@ -2563,7 +2563,7 @@
 	zephyr_account* zephyr = gc->proto_data;
 	char *sender = (char *)zephyr->username;
 
-	zt = find_sub_by_id(gc->proto_data,id);
+	zt = find_sub_by_id(zephyr,id);
 	/* find_sub_by_id can return NULL */
 	if (!zt)
 		return;