changeset 22335:9d02eb04f406

merge of 'd7446f6ac5bc209e6a03852945edf2f8cecffe9f' and 'fbe90f886e5d8d0dae0ad4d461dfa9f08e5de32a'
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Mon, 25 Feb 2008 00:25:51 +0000
parents 7253669b9fcd (diff) 9479cf89a97d (current diff)
children 63f102c210ad
files
diffstat 14 files changed, 126 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Mon Feb 25 00:25:23 2008 +0000
+++ b/COPYRIGHT	Mon Feb 25 00:25:51 2008 +0000
@@ -154,6 +154,7 @@
 Konrad Gräfe
 Miah Gregory
 David Grohmann
+Gideon N. Guillen
 Christian Hammond
 Erick Hamness
 Fred Hampton
--- a/ChangeLog	Mon Feb 25 00:25:23 2008 +0000
+++ b/ChangeLog	Mon Feb 25 00:25:51 2008 +0000
@@ -10,12 +10,15 @@
 	* Partial support for viewing ICQ status notes (Collin from
 	  ComBOTS GmbH).
 	* Support for /notice on IRC.
-	* Support for Yahoo Messenger 7.0+ file transfer method (Thanumalayan S.)
+	* Support for Yahoo! Messenger 7.0+ file transfer method (Thanumalayan S.)
 	* Support for retrieving full names and addresses from the address book
 	  on Yahoo! Japan (Yusuke Odate)
 	* The AIM/ICQ server-side preference for "allow others to see me
 	  as idle" is no longer unconditionally set to "yes" even when
 	  your libpurple preference is "no."
+	* Fixed retrieval of buddy icons and setting of server-side aliases on
+	  Yahoo! and Yahoo! Japan when using an HTTP proxy server (Gideon N.
+	  Guillen)
 
 	Pidgin:
 	* Added the ability to theme conversation name colors (red and blue)
--- a/libpurple/blist.c	Mon Feb 25 00:25:23 2008 +0000
+++ b/libpurple/blist.c	Mon Feb 25 00:25:51 2008 +0000
@@ -1588,7 +1588,7 @@
 					hb->group = gnode;
 					g_hash_table_replace(purplebuddylist->buddies, hb, b);
 
-					if (b->account->gc)
+					if (purple_account_get_connection(b->account))
 						serv_move_buddy(b, (PurpleGroup *)cnode->parent, g);
 				} else {
 					gboolean empty_contact = FALSE;
@@ -1597,7 +1597,7 @@
 					 * gonna delete it instead */
 					g_free(hb->name);
 					g_free(hb);
-					if (b->account->gc)
+					if (purple_account_get_connection(b->account))
 						purple_account_remove_buddy(b->account, b, (PurpleGroup *)cnode->parent);
 
 					if (!cnode->child->next)
@@ -2087,7 +2087,7 @@
 	prpl = purple_find_prpl(purple_account_get_protocol_id(chat->account));
 	prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
 
-	parts = prpl_info->chat_info(chat->account->gc);
+	parts = prpl_info->chat_info(purple_account_get_connection(chat->account));
 	pce = parts->data;
 	ret = g_hash_table_lookup(chat->components, pce->identifier);
 	g_list_foreach(parts, (GFunc)g_free, NULL);
--- a/libpurple/conversation.c	Mon Feb 25 00:25:23 2008 +0000
+++ b/libpurple/conversation.c	Mon Feb 25 00:25:51 2008 +0000
@@ -209,11 +209,14 @@
 		const char *message, PurpleMessageFlags flags, time_t when)
 {
 	PurpleConvMessage *msg;
+	PurpleConnection *gc;
+
+	gc = purple_account_get_connection(conv->account);
 
 	if (flags & PURPLE_MESSAGE_SEND) {
 		const char *me = NULL;
-		if (conv->account->gc)
-			me = conv->account->gc->display_name;
+		if (gc)
+			me = purple_connection_get_display_name(gc);
 		if (!me)
 			me = conv->account->username;
 		who = me;
--- a/libpurple/protocols/yahoo/yahoo.c	Mon Feb 25 00:25:23 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Mon Feb 25 00:25:51 2008 +0000
@@ -3509,8 +3509,13 @@
 		"Host: login.yahoo.com\r\n"
 		"Content-Length: 0\r\n\r\n",
 		yd->cookie_t, yd->cookie_y);
-
-	url_data = purple_util_fetch_url_request(base_url, FALSE,
+	gboolean use_whole_url = FALSE;
+
+	/* use whole URL if using HTTP Proxy */
+	if ((gc->account->proxy_info) && (gc->account->proxy_info->type == PURPLE_PROXY_HTTP))
+	    use_whole_url = TRUE;
+
+	url_data = purple_util_fetch_url_request(base_url, use_whole_url,
 			"Mozilla/4.0 (compatible; MSIE 5.5)", TRUE, request, FALSE,
 			yahoo_get_inbox_token_cb, gc);
 
--- a/libpurple/protocols/yahoo/yahoo_aliases.c	Mon Feb 25 00:25:23 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo_aliases.c	Mon Feb 25 00:25:51 2008 +0000
@@ -148,6 +148,12 @@
 	char *request, *webpage, *webaddress;
 	PurpleUtilFetchUrlData *url_data;
 
+	gboolean use_whole_url = FALSE;
+
+	/* use whole URL if using HTTP Proxy */
+	if ((gc->account->proxy_info) && (gc->account->proxy_info->type == PURPLE_PROXY_HTTP))
+	    use_whole_url = TRUE;
+
 	/* Using callback_data so I have access to gc in the callback function */
 	cb = g_new0(struct callback_data, 1);
 	cb->gc = gc;
@@ -155,15 +161,15 @@
 	/*  Build all the info to make the web request */
 	url = yd->jp ? YAHOOJP_ALIAS_FETCH_URL : YAHOO_ALIAS_FETCH_URL;
 	purple_url_parse(url, &webaddress, NULL, &webpage, NULL, NULL);
-	request = g_strdup_printf("GET /%s HTTP/1.1\r\n"
+	request = g_strdup_printf("GET %s%s/%s HTTP/1.1\r\n"
 				 "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n"
 				 "Cookie: T=%s; Y=%s\r\n"
 				 "Host: %s\r\n"
 				 "Cache-Control: no-cache\r\n\r\n",
-				 webpage, yd->cookie_t,yd->cookie_y, webaddress);
+				  use_whole_url ? "http://" : "", use_whole_url ? webaddress : "", webpage, yd->cookie_t,yd->cookie_y, webaddress);
 
 	/* We have a URL and some header information, let's connect and get some aliases  */
-	url_data = purple_util_fetch_url_request(url, FALSE, NULL, TRUE, request, FALSE, yahoo_fetch_aliases_cb, cb);
+	url_data = purple_util_fetch_url_request(url, use_whole_url, NULL, TRUE, request, FALSE, yahoo_fetch_aliases_cb, cb);
 	if (url_data != NULL) {
 		yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
 	}
@@ -232,6 +238,11 @@
 	struct callback_data *cb;
 	PurpleBuddy *buddy;
 	PurpleUtilFetchUrlData *url_data;
+	gboolean use_whole_url = FALSE;
+
+	/* use whole URL if using HTTP Proxy */
+	if ((gc->account->proxy_info) && (gc->account->proxy_info->type == PURPLE_PROXY_HTTP))
+	    use_whole_url = TRUE;
 
 	g_return_if_fail(alias != NULL);
 	g_return_if_fail(who != NULL);
@@ -274,18 +285,18 @@
 		g_free(escaped_alias);
 	}
 
-	request = g_strdup_printf("POST /%s HTTP/1.1\r\n"
+	request = g_strdup_printf("POST %s%s/%s HTTP/1.1\r\n"
 				  "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n"
 				  "Cookie: T=%s; Y=%s\r\n"
 				  "Host: %s\r\n"
 				  "Content-Length: %" G_GSIZE_FORMAT "\r\n"
 				  "Cache-Control: no-cache\r\n\r\n"
 				  "%s",
-				  webpage, yd->cookie_t,yd->cookie_y, webaddress,
+				  use_whole_url ? "http://" : "", use_whole_url ? webaddress : "", webpage, yd->cookie_t,yd->cookie_y, webaddress,
 			 	  strlen(content), content);
 
 	/* We have a URL and some header information, let's connect and update the alias  */
-	url_data = purple_util_fetch_url_request(url, FALSE, NULL, TRUE, request, FALSE, yahoo_update_alias_cb, cb);
+	url_data = purple_util_fetch_url_request(url, use_whole_url, NULL, TRUE, request, FALSE, yahoo_update_alias_cb, cb);
 	if (url_data != NULL) {
 		yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
 	}
--- a/libpurple/protocols/yahoo/yahoo_picture.c	Mon Feb 25 00:25:23 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo_picture.c	Mon Feb 25 00:25:51 2008 +0000
@@ -116,6 +116,11 @@
 		struct yahoo_fetch_picture_data *data;
 		PurpleBuddy *b = purple_find_buddy(gc->account, who);
 		const char *locksum = NULL;
+		gboolean use_whole_url = FALSE;
+
+		/* use whole URL if using HTTP Proxy */
+		if ((gc->account->proxy_info) && (gc->account->proxy_info->type == PURPLE_PROXY_HTTP))
+		    use_whole_url = TRUE;
 
 		/* FIXME: Cleanup this strtol() stuff if possible. */
 		if (b && (locksum = purple_buddy_icons_get_checksum_for_user(b)) != NULL && 
@@ -126,7 +131,7 @@
 		data->gc = gc;
 		data->who = g_strdup(who);
 		data->checksum = checksum;
-		url_data = purple_util_fetch_url(url, FALSE,
+		url_data = purple_util_fetch_url(url, use_whole_url,
 				"Mozilla/4.0 (compatible; MSIE 5.0)", FALSE,
 				yahoo_fetch_picture_cb, data);
 		if (url_data != NULL) {
--- a/libpurple/protocols/yahoo/yahoo_profile.c	Mon Feb 25 00:25:23 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo_profile.c	Mon Feb 25 00:25:51 2008 +0000
@@ -932,11 +932,17 @@
 	/* Try to put the photo in there too, if there's one */
 	if (photo_url_text) {
 		PurpleUtilFetchUrlData *url_data;
+		gboolean use_whole_url = FALSE;
+
+		/* use whole URL if using HTTP Proxy */
+		if ((info_data->gc->account->proxy_info) && (info_data->gc->account->proxy_info->type == PURPLE_PROXY_HTTP))
+		    use_whole_url = TRUE;
+
 		/* User-uploaded photos use a different server that requires the Host
 		 * header, but Yahoo Japan will use the "chunked" content encoding if
 		 * we specify HTTP 1.1. So we have to specify 1.0 & fix purple_util_fetch_url
 		 */
-		url_data = purple_util_fetch_url(photo_url_text, FALSE, NULL,
+		url_data = purple_util_fetch_url(photo_url_text, use_whole_url, NULL,
 				FALSE, yahoo_got_photo, info2_data);
 		if (url_data != NULL)
 			yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
--- a/libpurple/proxy.c	Mon Feb 25 00:25:23 2008 +0000
+++ b/libpurple/proxy.c	Mon Feb 25 00:25:51 2008 +0000
@@ -737,6 +737,7 @@
 				proxy_do_write(connect_data, connect_data->fd, cond);
 				return;
 			} else if((ntlm = g_strrstr((const char *)connect_data->read_buffer, "Proxy-Authenticate: NTLM"))) { /* Empty message */
+				gchar *ntlm_type1;
 				gchar request[2048];
 				gchar *domain = (gchar*) purple_proxy_info_get_username(connect_data->gpi);
 				gchar *username = NULL;
@@ -759,11 +760,13 @@
 						connect_data->host, connect_data->port);
 
 				g_return_if_fail(request_len < sizeof(request));
+				ntlm_type1 = purple_ntlm_gen_type1(hostname, domain);
 				request_len += g_snprintf(request + request_len,
 					sizeof(request) - request_len,
 					"Proxy-Authorization: NTLM %s\r\n"
 					"Proxy-Connection: Keep-Alive\r\n\r\n",
-					purple_ntlm_gen_type1(hostname, domain));
+					ntlm_type1);
+				g_free(ntlm_type1);
 				*username = '\\';
 
 				purple_input_remove(connect_data->inpa);
@@ -847,7 +850,7 @@
 
 	if (purple_proxy_info_get_username(connect_data->gpi) != NULL)
 	{
-		char *t1, *t2;
+		char *t1, *t2, *ntlm_type1;
 		char hostname[256];
 
 		ret = gethostname(hostname, sizeof(hostname));
@@ -864,11 +867,14 @@
 		t2 = purple_base64_encode((const guchar *)t1, strlen(t1));
 		g_free(t1);
 
+		ntlm_type1 = purple_ntlm_gen_type1(hostname, "");
+
 		g_string_append_printf(request,
 			"Proxy-Authorization: Basic %s\r\n"
 			"Proxy-Authorization: NTLM %s\r\n"
 			"Proxy-Connection: Keep-Alive\r\n",
-			t2, purple_ntlm_gen_type1(hostname, ""));
+			t2, ntlm_type1);
+		g_free(ntlm_type1);
 		g_free(t2);
 	}
 
--- a/pidgin/gtkaccount.c	Mon Feb 25 00:25:23 2008 +0000
+++ b/pidgin/gtkaccount.c	Mon Feb 25 00:25:51 2008 +0000
@@ -2092,8 +2092,10 @@
 	/* Figure out which node was clicked */
 	if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(dialog->treeview), event->x, event->y, &path, &column, NULL, NULL))
 		return FALSE;
-	if (column == gtk_tree_view_get_column(treeview, 0))
+	if (column == gtk_tree_view_get_column(treeview, 0)) {
+		gtk_tree_path_free(path);
 		return FALSE;
+	}
 
 	gtk_tree_model_get_iter(GTK_TREE_MODEL(dialog->model), &iter, path);
 	gtk_tree_path_free(path);
--- a/pidgin/gtkblist.c	Mon Feb 25 00:25:23 2008 +0000
+++ b/pidgin/gtkblist.c	Mon Feb 25 00:25:51 2008 +0000
@@ -2953,6 +2953,9 @@
 	gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), x, y, &path, NULL, NULL, NULL);
 	gtk_tree_view_get_cell_area(GTK_TREE_VIEW(tv), path, NULL, &rect);
 
+	if (path)
+		gtk_tree_path_free(path);
+
 	/* Only autoexpand when in the middle of the cell to avoid annoying un-intended expands */
 	if (y < rect.y + (rect.height / 3) ||
 	    y > rect.y + (2 * (rect.height /3)))
@@ -2963,8 +2966,6 @@
 
 	gtkblist->tip_rect = rect;
 
-	if (path)
-		gtk_tree_path_free(path);
 	gtkblist->drag_timeout = g_timeout_add(delay, (GSourceFunc)pidgin_blist_expand_timeout, tv);
 
 	if (gtkblist->mouseover_contact) {
--- a/pidgin/gtklog.c	Mon Feb 25 00:25:23 2008 +0000
+++ b/pidgin/gtklog.c	Mon Feb 25 00:25:51 2008 +0000
@@ -263,11 +263,10 @@
 				gtk_tree_store_remove(treestore, iter);
 			}
 		}
-		gtk_tree_path_free(path);
 #else
 		gtk_tree_store_remove(treestore, iter);
+#endif
 		gtk_tree_path_free(path);
-#endif
 	}
 
 	delete_log_cleanup_cb(data);
@@ -363,6 +362,7 @@
 		gtk_tree_model_get_iter(GTK_TREE_MODEL(lv->treestore), iter, path);
 		val.g_type = 0;
 		gtk_tree_model_get_value(GTK_TREE_MODEL(lv->treestore), iter, 1, &val);
+		gtk_tree_path_free(path);
 
 		log = g_value_get_pointer(&val);
 
--- a/pidgin/minidialog.c	Mon Feb 25 00:25:23 2008 +0000
+++ b/pidgin/minidialog.c	Mon Feb 25 00:25:51 2008 +0000
@@ -164,7 +164,8 @@
 	priv->idle_destroy_cb_id =
 		g_idle_add((GSourceFunc) idle_destroy_cb, data->mini_dialog);
 
-	data->callback(data->mini_dialog, button, data->user_data);
+	if (data->callback != NULL)
+		data->callback(data->mini_dialog, button, data->user_data);
 
 }
 
--- a/po/de.po	Mon Feb 25 00:25:23 2008 +0000
+++ b/po/de.po	Mon Feb 25 00:25:51 2008 +0000
@@ -11,8 +11,8 @@
 msgstr ""
 "Project-Id-Version: de\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-02-08 16:08+0100\n"
-"PO-Revision-Date: 2008-02-08 16:08+0100\n"
+"POT-Creation-Date: 2008-02-24 19:28+0100\n"
+"PO-Revision-Date: 2008-02-24 19:28+0100\n"
 "Last-Translator: Jochen Kemnade <jochenkemnade@web.de>\n"
 "Language-Team: Deutsch <de@li.org>\n"
 "MIME-Version: 1.0\n"
@@ -196,11 +196,11 @@
 msgid "Screen Name"
 msgstr "Benutzername"
 
-msgid "Alias"
-msgstr "Alias"
-
-msgid "Group"
-msgstr "Gruppe"
+msgid "Alias (optional)"
+msgstr "Alias (optional)"
+
+msgid "Add in group"
+msgstr "Zu Gruppe hinzufügen"
 
 msgid "Account"
 msgstr "Konto"
@@ -218,6 +218,12 @@
 msgid "Name"
 msgstr "Name"
 
+msgid "Alias"
+msgstr "Alias"
+
+msgid "Group"
+msgstr "Gruppe"
+
 msgid "Auto-join"
 msgstr "Automatisch beitreten"
 
@@ -758,13 +764,13 @@
 msgid "Transferring"
 msgstr "Übertragung"
 
-#, fuzzy, c-format
+#, c-format
 msgid "Conversation in %s on %s"
-msgstr "Unterhaltung in %s"
-
-#, fuzzy, c-format
+msgstr "Unterhaltung in %s am %s"
+
+#, c-format
 msgid "Conversation with %s on %s"
-msgstr "Unterhaltung mit %s"
+msgstr "Unterhaltung mit %s am %s"
 
 msgid "%B %Y"
 msgstr "%B %Y"
@@ -5346,23 +5352,22 @@
 msgid "MySpace"
 msgstr "MySpace"
 
+msgid "MySpaceIM - No Username Set"
+msgstr "MySpaceIM - Kein Benutzername gesetzt"
+
+msgid "You appear to have no MySpace username."
+msgstr "Sie scheinen keinen MySpace-Benutzernamen zu haben."
+
+msgid "Would you like to set one now? (Note: THIS CANNOT BE CHANGED!)"
+msgstr ""
+"Möchten Sie jetzt einen setzen? (Bemerkung: DIES KANN NICHT GEÄNDERT WERDEN!)"
+
 #. The session is now set up, ready to be connected. This emits the
 #. * signedOn signal, so clients can now do anything with msimprpl, and
 #. * we're ready for it (session key, userid, username all setup).
 msgid "Connected"
 msgstr "Verbunden"
 
-msgid "No username set"
-msgstr "Kein Benutzername gesetzt"
-
-msgid ""
-"Please go to http://editprofile.myspace.com/index.cfm?fuseaction=profile."
-"username and choose a username and try to login again."
-msgstr ""
-"Bitte besuchen Sie http://editprofile.myspace.com/index.cfm?"
-"fuseaction=profile.username und wählen sie einen Benutzernamen und versuchen "
-"Sie sich erneut anzumelden."
-
 #, c-format
 msgid "Protocol error, code %d: %s"
 msgstr "Protokollfehler, Code %d: %s"
@@ -5492,6 +5497,32 @@
 msgid "Client Version"
 msgstr "Client-Version"
 
+#. Protocol won't log in now without a username set.. Disconnect
+msgid "No username set"
+msgstr "Kein Benutzername gesetzt"
+
+msgid "MySpaceIM - Please Set a Username"
+msgstr "MySpaceIM - Bitte setzen Sie einen Benutzernamen"
+
+msgid "Please enter a username to check its availability:"
+msgstr ""
+"Bitte geben Sie einen Benutzernamen ein um seine Verfügbarkeit zu überprüfen:"
+
+msgid "MySpaceIM - Username Available"
+msgstr "MySpaceIM - Benutzername verfügbar"
+
+msgid "This username is available. Would you like to set it?"
+msgstr "Dieser Benutzername ist verfügbar. Möchten Sie ihn setzen?"
+
+msgid "ONCE SET, THIS CANNOT BE CHANGED!"
+msgstr "EINMAL GESETZT, KANN DIES NICHT GEÄNDERT WERDEN!"
+
+msgid "This username is unavailable."
+msgstr "Dieser Benutzername ist nicht verfügbar."
+
+msgid "Please try another username:"
+msgstr "Bitte versuchen Sie einen anderen Benutzernamen:"
+
 #. TODO: icons for each zap
 #. Lots of comments for translators:
 #. Zap means "to strike suddenly and forcefully as if with a
@@ -11838,6 +11869,9 @@
 msgid "Show _formatting on incoming messages"
 msgstr "Zeige _Formatierung bei ankommenden Nachrichten"
 
+msgid "Close IMs immediately when the tab is closed"
+msgstr "IMs automatisch schließen, wenn der Reiter geschlossen wird"
+
 msgid "Show _detailed information"
 msgstr "_Detaillierte Informationen anzeigen"