changeset 16923:968941822155

merge of 'bcc638c7caff684bb6ee1563ef0c5862931d8287' and 'c1b4b10171113a2ad73fa63dae56afbc79055fdf'
author Luke Schierer <lschiere@pidgin.im>
date Sat, 05 May 2007 22:04:26 +0000
parents ba47cfaa013b (diff) a00cf76108c6 (current diff)
children 240690ebd868
files
diffstat 6 files changed, 51 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/doc/funniest_home_convos.txt	Sat May 05 14:36:31 2007 +0000
+++ b/doc/funniest_home_convos.txt	Sat May 05 22:04:26 2007 +0000
@@ -460,3 +460,15 @@
 23:59 -!- beta7 was kicked from #pidgin by elb [getting feisty, are we?]
 23:59 -!- mode/#pidgin [-o elb] by ChanServ
 23:59 <marv> elb: good job getting beta7 out
+
+14:07 <elb> rizzo: I actually prefer elb, and used it for a long time -- but 
+            switched to Paco-Paco because people kept asking me what an 'elb'
+            was
+14:08 <rizzo> elb: tell them it's short for "elbow", and don't explain any 
+              further
+14:08 <elb> rizzo: I actually had people ASK about that
+14:08 <elb> 'is your nick elbow?'
+14:08 <elb> "... yes"
+14:08 <elb> I mean, what do you say
+14:08 <Robot101> elb: was their nick "idi"?
+          
--- a/finch/libgnt/gntentry.c	Sat May 05 14:36:31 2007 +0000
+++ b/finch/libgnt/gntentry.c	Sat May 05 22:04:26 2007 +0000
@@ -75,6 +75,7 @@
 	int count = 0;
 	GList *iter;
 	const char *text = NULL;
+	const char *sgst = NULL;
 
 	if (entry->word)
 	{
@@ -116,6 +117,7 @@
 					gnt_tree_create_row(GNT_TREE(entry->ddown), text),
 					NULL, NULL);
 			count++;
+			sgst = text;
 		}
 	}
 	g_free(suggest);
@@ -125,7 +127,7 @@
 		return FALSE;
 	} else if (count == 1) {
 		destroy_suggest(entry);
-		return complete_suggest(entry, text);
+		return complete_suggest(entry, sgst);
 	} else {
 		gnt_widget_draw(entry->ddown->parent);
 	}
--- a/libpurple/dnssrv.c	Sat May 05 14:36:31 2007 +0000
+++ b/libpurple/dnssrv.c	Sat May 05 22:04:26 2007 +0000
@@ -192,11 +192,19 @@
 	PurpleSrvCallback cb = query_data->cb;
 	int status;
 
-	read(source, &size, sizeof(int));
-	purple_debug_info("dnssrv","found %d SRV entries\n", size);
-	tmp = res = g_new0(PurpleSrvResponse, size);
-	for (i = 0; i < size; i++) {
-		read(source, tmp++, sizeof(PurpleSrvResponse));
+	if (read(source, &size, sizeof(int)) > 0)
+	{
+		purple_debug_info("dnssrv","found %d SRV entries\n", size);
+		tmp = res = g_new0(PurpleSrvResponse, size);
+		for (i = 0; i < size; i++) {
+			read(source, tmp++, sizeof(PurpleSrvResponse));
+		}
+	}
+	else
+	{
+		purple_debug_info("dnssrv","found 0 SRV entries; errno is %i\n", errno);
+		size = 0;
+		res = NULL;
 	}
 
 	cb(res, size, query_data->extradata);
--- a/libpurple/protocols/oscar/family_feedbag.c	Sat May 05 14:36:31 2007 +0000
+++ b/libpurple/protocols/oscar/family_feedbag.c	Sat May 05 22:04:26 2007 +0000
@@ -588,9 +588,7 @@
 	od->ssi.waiting_for_ack = TRUE;
 
 	/* Now go mail off our data and wait 4 to 6 weeks */
-	aim_ssi_addmoddel(od);
-
-	return 0;
+	return aim_ssi_addmoddel(od);;
 }
 
 /**
@@ -714,9 +712,7 @@
 		aim_ssi_itemlist_del(&od->ssi.local, cur);
 
 	/* If we've made any changes then sync our list with the server's */
-	aim_ssi_sync(od);
-
-	return 0;
+	return aim_ssi_sync(od);
 }
 
 /**
@@ -769,9 +765,7 @@
 	aim_ssi_itemlist_rebuildgroup(od->ssi.local, group);
 
 	/* Sync our local list with the server list */
-	aim_ssi_sync(od);
-
-	return 0;
+	return aim_ssi_sync(od);
 }
 
 /**
@@ -795,9 +789,7 @@
 	aim_ssi_itemlist_add(&od->ssi.local, name, 0x0000, 0xFFFF, AIM_SSI_TYPE_PERMIT, NULL);
 
 	/* Sync our local list with the server list */
-	aim_ssi_sync(od);
-
-	return 0;
+	return aim_ssi_sync(od);
 }
 
 /**
@@ -821,9 +813,7 @@
 	aim_ssi_itemlist_add(&od->ssi.local, name, 0x0000, 0xFFFF, AIM_SSI_TYPE_DENY, NULL);
 
 	/* Sync our local list with the server list */
-	aim_ssi_sync(od);
-
-	return 0;
+	return aim_ssi_sync(od);
 }
 
 /**
@@ -865,9 +855,7 @@
 	}
 
 	/* Sync our local list with the server list */
-	aim_ssi_sync(od);
-
-	return 0;
+	return aim_ssi_sync(od);
 }
 
 /**
@@ -892,9 +880,7 @@
 	aim_ssi_itemlist_del(&od->ssi.local, del);
 
 	/* Sync our local list with the server list */
-	aim_ssi_sync(od);
-
-	return 0;
+	return aim_ssi_sync(od);
 }
 
 /**
@@ -919,9 +905,7 @@
 	aim_ssi_itemlist_del(&od->ssi.local, del);
 
 	/* Sync our local list with the server list */
-	aim_ssi_sync(od);
-
-	return 0;
+	return aim_ssi_sync(od);
 }
 
 /**
@@ -977,9 +961,7 @@
 		aim_tlvlist_remove(&tmp->data, 0x0131);
 
 	/* Sync our local list with the server list */
-	aim_ssi_sync(od);
-
-	return 0;
+	return aim_ssi_sync(od);
 }
 
 /**
@@ -1009,9 +991,7 @@
 		aim_tlvlist_remove(&tmp->data, 0x013c);
 
 	/* Sync our local list with the server list */
-	aim_ssi_sync(od);
-
-	return 0;
+	return aim_ssi_sync(od);
 }
 
 /**
@@ -1037,9 +1017,7 @@
 	strcpy(group->name, newgn);
 
 	/* Sync our local list with the server list */
-	aim_ssi_sync(od);
-
-	return 0;
+	return aim_ssi_sync(od);
 }
 
 /**
@@ -1079,9 +1057,7 @@
 	aim_tlvlist_replace_32(&tmp->data, 0x00cb, vismask);
 
 	/* Sync our local list with the server list */
-	aim_ssi_sync(od);
-
-	return 0;
+	return aim_ssi_sync(od);
 }
 
 /**
@@ -1171,9 +1147,7 @@
 	aim_tlvlist_replace_32(&tmp->data, 0x00c9, presence);
 
 	/* Sync our local list with the server list */
-	aim_ssi_sync(od);
-
-	return 0;
+	return aim_ssi_sync(od);
 }
 
 /*
--- a/libpurple/protocols/oscar/oscar.c	Sat May 05 14:36:31 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Sat May 05 22:04:26 2007 +0000
@@ -5098,7 +5098,6 @@
 	purple_debug_info("oscar",
 			   "ssi: %s has given you permission to add him to your buddy list\n", sn);
 
-	/* XXX Should data->nick store the alias and nombre just have the sn? -evands */
 	buddy = purple_find_buddy(gc->account, sn);
 	if (buddy && (purple_buddy_get_alias_only(buddy)))
 		nombre = g_strdup_printf("%s (%s)", sn, purple_buddy_get_alias_only(buddy));
@@ -5106,10 +5105,12 @@
 		nombre = g_strdup(sn);
 
 	dialog_msg = g_strdup_printf(_("The user %s has given you permission to add you to their buddy list.  Do you want to add them?"), nombre);
+	g_free(nombre);
+
 	data = g_new(struct name_data, 1);
 	data->gc = gc;
 	data->name = g_strdup(sn);
-	data->nick = NULL;
+	data->nick = (buddy ? g_strdup(purple_buddy_get_alias_only(buddy)) : NULL);
 
 	purple_request_yes_no(gc, NULL, _("Authorization Given"), dialog_msg,
 						PURPLE_DEFAULT_ACTION_NONE,
@@ -5117,9 +5118,7 @@
 						data,
 						G_CALLBACK(purple_icq_buddyadd),
 						G_CALLBACK(oscar_free_name_data));
-
 	g_free(dialog_msg);
-	g_free(nombre);
 
 	return 1;
 }
@@ -5130,7 +5129,6 @@
 	char *sn;
 	char *msg;
 	PurpleAccount *account = purple_connection_get_account(gc);
-	gchar *nombre;
 	gchar *reason = NULL;
 	struct name_data *data;
 	PurpleBuddy *buddy;
@@ -5144,10 +5142,6 @@
 			   "ssi: received authorization request from %s\n", sn);
 
 	buddy = purple_find_buddy(account, sn);
-	if (buddy && (purple_buddy_get_alias_only(buddy)))
-		nombre = g_strdup_printf("%s (%s)", sn, purple_buddy_get_alias_only(buddy));
-	else
-		nombre = g_strdup(sn);
 
 	if (msg != NULL)
 		reason = purple_plugin_oscar_decode_im_part(account, sn, AIM_CHARSET_CUSTOM, 0x0000, msg, strlen(msg));
@@ -5155,12 +5149,12 @@
 	data = g_new(struct name_data, 1);
 	data->gc = gc;
 	data->name = g_strdup(sn);
-	data->nick = NULL;
-
-	purple_account_request_authorization(account, nombre, NULL, NULL,
+	data->nick = (buddy ? g_strdup(purple_buddy_get_alias_only(buddy)) : NULL);
+
+	purple_account_request_authorization(account, sn, NULL,
+			(buddy ? purple_buddy_get_alias_only(buddy) : NULL),
 			reason, buddy != NULL, G_CALLBACK(purple_auth_grant),
 			G_CALLBACK(purple_auth_dontgrant_msgprompt), data);
-	g_free(nombre);
 	g_free(reason);
 
 	return 1;
@@ -5791,8 +5785,8 @@
 	comment_utf8 = comment ? oscar_utf8_try_convert(gc->account, comment) : NULL;
 
 	data->gc = gc;
-	data->name = g_strdup(buddy->name);
-	data->nick = NULL;
+	data->name = g_strdup(purple_buddy_get_name(buddy));
+	data->nick = g_strdup(purple_buddy_get_alias_only(buddy));
 
 	title = g_strdup_printf(_("Buddy Comment for %s"), data->name);
 	purple_request_input(gc, title, _("Buddy Comment:"), NULL,
--- a/pidgin/gtksound.c	Sat May 05 14:36:31 2007 +0000
+++ b/pidgin/gtksound.c	Sat May 05 22:04:26 2007 +0000
@@ -430,7 +430,7 @@
 			return;
 		}
 
-		esc_filename = g_strdup_printf("'%s'", filename);
+		esc_filename = g_shell_quote(filename);
 
 		if(strstr(sound_cmd, "%s"))
 			command = purple_strreplace(sound_cmd, "%s", esc_filename);