changeset 29750:2b9db39bd7ed

propagate from branch 'im.pidgin.pidgin' (head 97a9c0e52ad7b57090076da83c4fc7bfeefad0a8) to branch 'im.pidgin.pidgin.next.minor' (head 52f9485ad7afb4d7002b2d45a2662de0f458068c)
author Paul Aurich <paul@darkrain42.org>
date Tue, 09 Feb 2010 22:40:36 +0000
parents 8c87d8558fb5 (current diff) 9b0d3a48a467 (diff)
children 55515a760e87
files ChangeLog libpurple/protocols/yahoo/libymsg.c pidgin/gtkcelllayout.c pidgin/gtkcelllayout.h pidgin/gtkcellrendererprogress.c pidgin/gtkcellrendererprogress.h pidgin/gtkcellview.c pidgin/gtkcellview.h pidgin/gtkcellviewmenuitem.c pidgin/gtkcellviewmenuitem.h pidgin/gtkconv.c pidgin/gtkdebug.c pidgin/gtkexpander.c pidgin/gtkexpander.h pidgin/gtkft.c pidgin/gtkwhiteboard.c pidgin/pidgincombobox.c pidgin/pidgincombobox.h pidgin/pixmaps/tray/16/tray-away.png pidgin/pixmaps/tray/16/tray-busy.png pidgin/pixmaps/tray/16/tray-connecting.png pidgin/pixmaps/tray/16/tray-extended-away.png pidgin/pixmaps/tray/16/tray-invisible.png pidgin/pixmaps/tray/16/tray-message.png pidgin/pixmaps/tray/16/tray-new-im.png pidgin/pixmaps/tray/16/tray-offline.png pidgin/pixmaps/tray/16/tray-online.png pidgin/pixmaps/tray/22/tray-away.png pidgin/pixmaps/tray/22/tray-busy.png pidgin/pixmaps/tray/22/tray-connecting.png pidgin/pixmaps/tray/22/tray-extended-away.png pidgin/pixmaps/tray/22/tray-invisible.png pidgin/pixmaps/tray/22/tray-message.png pidgin/pixmaps/tray/22/tray-new-im.png pidgin/pixmaps/tray/22/tray-offline.png pidgin/pixmaps/tray/22/tray-online.png pidgin/pixmaps/tray/32/tray-away.png pidgin/pixmaps/tray/32/tray-busy.png pidgin/pixmaps/tray/32/tray-connecting.png pidgin/pixmaps/tray/32/tray-extended-away.png pidgin/pixmaps/tray/32/tray-invisible.png pidgin/pixmaps/tray/32/tray-message.png pidgin/pixmaps/tray/32/tray-new-im.png pidgin/pixmaps/tray/32/tray-offline.png pidgin/pixmaps/tray/32/tray-online.png pidgin/pixmaps/tray/48/tray-away.png pidgin/pixmaps/tray/48/tray-busy.png pidgin/pixmaps/tray/48/tray-connecting.png pidgin/pixmaps/tray/48/tray-extended-away.png pidgin/pixmaps/tray/48/tray-invisible.png pidgin/pixmaps/tray/48/tray-message.png pidgin/pixmaps/tray/48/tray-new-im.png pidgin/pixmaps/tray/48/tray-offline.png pidgin/pixmaps/tray/48/tray-online.png
diffstat 10 files changed, 116 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Mon Feb 08 17:07:30 2010 +0000
+++ b/COPYRIGHT	Tue Feb 09 22:40:36 2010 +0000
@@ -311,6 +311,7 @@
 Paul Miller
 Arkadiusz Miskiewicz
 David Mohr
+Kartik Mohta
 Andrew Molloy
 Tomasz Mon
 Michael Monreal
--- a/ChangeLog	Mon Feb 08 17:07:30 2010 +0000
+++ b/ChangeLog	Tue Feb 09 22:40:36 2010 +0000
@@ -25,6 +25,9 @@
 	  to be improperly converted to XHTML.
 	* Set "controlling-mode" correctly when initializing a media session.
 	  Fixes receiving voice calls from Psi.
+	* When looking up DNS records, use the type of record returned by the
+	  server (instead of the type we asked for) to determine how to process
+	  the record.
 
 	General:
 	* Correctly disable all missing dependencies when using the
@@ -46,6 +49,10 @@
 	* Buddies who sign in from a second location will no longer cause an
 	  unnecessary chat window to open.
 	* Support setting an animated GIF as a buddy icon.
+	* Numerous code cleanups and memory savings.
+
+	MySpace:
+	* Fix a leak and crash when retrieving buddy icons.
 
 	XMPP:
 	* Added support for the SCRAM-SHA-1 SASL mechanism.  This is only
@@ -63,6 +70,8 @@
 
 	Yahoo:
 	* Don't send <span> and </span> tags.  (Fartash Faghri)
+	* Support PingBox.  PingBoxes will appear as pbx/PingBoxName.  (Kartik
+	  Mohta)
 
 	Pidgin:
 	* Correctly size conversation and status box entries when the
@@ -71,6 +80,26 @@
 	  request form.  (Thanks to Florian Zeitz for finding this problem)
 	* Search friends by email-addresses in the buddy list. (Luoh Ren-Shan)
 	* Allow dropping an image on Custom Smiley window to add a new one.
+	* Prompt for confirmation when clearing a whiteboard (doodle) session.
+	  (Kartik Mohta)
+	* Use the "hand" cursor when hovering over usernames in chat history to
+	  indicate that the username is an actionable item.
+	* Double-clicking usernames in chat history will open an IM with that
+	  user.
+	* Put an icon on the "Filter" button in the debug window.
+	* Don't treat "/messages/like/this " as commands.
+	* Explicitly mark user interaction when inserting smilies from the
+	  toolbar so "Undo" correctly removes these smilies.
+	* Clicking "New" or "Saved" in the status selector menu while typing a
+	  status message no longer keeps the status entry area stuck in "typing"
+	  mode forever.
+	* Show tooltips for ellipsized conversation tabs.  On older systems,
+	  tooltips will show for all tabs.
+	* The File Transfers and Debug Window windows are no longer created as
+	  dialogs.  These windows should now have minimize buttons in many
+	  environments in which they were previously missing (including Windows).
+	* Smiley themes with Windows line endings no longer cause theme
+	  descriptions not to be displayed in the theme selector.
 
 	Finch:
 	* Rebindable 'move-first' and 'move-last' actions for tree widgets. So
--- a/libpurple/protocols/yahoo/libymsg.c	Mon Feb 08 17:07:30 2010 +0000
+++ b/libpurple/protocols/yahoo/libymsg.c	Tue Feb 09 22:40:36 2010 +0000
@@ -541,6 +541,9 @@
 					case YAHOO_FEDERATION_IBM:
 						norm_bud = g_strconcat("ibm/", temp, NULL);
 						break;
+					case YAHOO_FEDERATION_PBX:
+						norm_bud = g_strconcat("pbx/", temp, NULL);
+						break;
 					case YAHOO_FEDERATION_NONE:
 						norm_bud = g_strdup(temp);
 						break;
@@ -833,6 +836,9 @@
 			case YAHOO_FEDERATION_IBM:
 				fed_from = g_strconcat("ibm/", from, NULL);
 				break;
+			case YAHOO_FEDERATION_PBX:
+				fed_from = g_strconcat("pbx/", from, NULL);
+				break;
 			case YAHOO_FEDERATION_NONE:
 			default:
 				break;
@@ -844,7 +850,7 @@
 			serv_got_typing_stopped(gc, fed_from);
 		
 		if (fed_from != from)
-			g_free(fed_from);			
+			g_free(fed_from);
 	
 	} else if (!g_ascii_strncasecmp(msg, "GAME", strlen("GAME"))) {
 		PurpleBuddy *bud = purple_find_buddy(account, from);
@@ -999,6 +1005,9 @@
 					case YAHOO_FEDERATION_IBM:
 						im->fed_from = g_strconcat("ibm/",im->from, NULL);
 						break;
+					case YAHOO_FEDERATION_PBX:
+						im->fed_from = g_strconcat("pbx/",im->from, NULL);
+						break;
 					case YAHOO_FEDERATION_NONE:
 					default:
 						im->fed_from = g_strdup(im->from);
@@ -1010,7 +1019,7 @@
 			/* peer session id */
 			if (im && (pair->key == 11)) {
 				/* disconnect the peer if connected through p2p and sends wrong value for session id */
-				if( (im->fed == YAHOO_FEDERATION_NONE) && (pkt_type == YAHOO_PKT_TYPE_P2P) 
+				if( (im->fed == YAHOO_FEDERATION_NONE) && (pkt_type == YAHOO_PKT_TYPE_P2P)
 						&& (yd->session_id != strtol(pair->value, NULL, 10)) )
 				{
 					purple_debug_warning("yahoo","p2p: %s sent us message with wrong session id. Disconnecting p2p connection to peer\n", im->fed_from);
@@ -4256,15 +4265,19 @@
 		validate_data_child = xmlnode_get_child(validate_data_root, "carrier");
 		carrier = xmlnode_get_data(validate_data_child);
 
-		purple_debug_info("yahoo","SMS validate data: Mobile:%s, Status:%s, Carrier:%s\n", mobile_no, status, carrier);
-
-		if( strcmp(status, "Valid") == 0) {
-			g_hash_table_insert(yd->sms_carrier, g_strdup_printf("+%s", mobile_no), g_strdup(carrier));
-			yahoo_send_im(sms_cb_data->gc, sms_cb_data->who, sms_cb_data->what, PURPLE_MESSAGE_SEND);
-		}
-		else	{
-			g_hash_table_insert(yd->sms_carrier, g_strdup_printf("+%s", mobile_no), g_strdup("Unknown"));
-			purple_conversation_write(conv, NULL, _("Can't send SMS. Unknown mobile carrier."), PURPLE_MESSAGE_SYSTEM, time(NULL));
+		purple_debug_info("yahoo", "SMS validate data: %s\n", webdata);
+
+		if (status && g_str_equal(status, "Valid") == 0) {
+			g_hash_table_insert(yd->sms_carrier,
+					g_strdup_printf("+%s", mobile_no), g_strdup(carrier));
+			yahoo_send_im(sms_cb_data->gc, sms_cb_data->who,
+					sms_cb_data->what, PURPLE_MESSAGE_SEND);
+		} else {
+			g_hash_table_insert(yd->sms_carrier,
+					g_strdup_printf("+%s", mobile_no), g_strdup("Unknown"));
+			purple_conversation_write(conv, NULL,
+					_("Can't send SMS. Unknown mobile carrier."),
+					PURPLE_MESSAGE_SYSTEM, time(NULL));
 		}
 
 		xmlnode_free(validate_data_child);
@@ -4421,6 +4434,7 @@
 		case YAHOO_FEDERATION_MSN:
 		case YAHOO_FEDERATION_OCS:
 		case YAHOO_FEDERATION_IBM:
+		case YAHOO_FEDERATION_PBX:
 			fed_who += 4;
 			break;
 		case YAHOO_FEDERATION_NONE:
@@ -4521,6 +4535,7 @@
 			case YAHOO_FEDERATION_MSN:
 			case YAHOO_FEDERATION_OCS:
 			case YAHOO_FEDERATION_IBM:
+			case YAHOO_FEDERATION_PBX:
 				fed_who += 4;
 				break;
 			case YAHOO_FEDERATION_NONE:
--- a/libpurple/protocols/yahoo/libymsg.h	Mon Feb 08 17:07:30 2010 +0000
+++ b/libpurple/protocols/yahoo/libymsg.h	Tue Feb 09 22:40:36 2010 +0000
@@ -138,7 +138,8 @@
 	YAHOO_FEDERATION_NONE = 0, /* No federation - Yahoo! network */
 	YAHOO_FEDERATION_OCS = 1,  /* LCS or OCS private networks */
 	YAHOO_FEDERATION_MSN = 2,  /* MSN or Windows Live network */
-	YAHOO_FEDERATION_IBM = 9   /* IBM/Sametime network */
+	YAHOO_FEDERATION_IBM = 9,  /* IBM/Sametime network */
+	YAHOO_FEDERATION_PBX = 100 /* Yahoo! Pingbox service */
 } YahooFederation;
 
 
--- a/libpurple/protocols/yahoo/util.c	Mon Feb 08 17:07:30 2010 +0000
+++ b/libpurple/protocols/yahoo/util.c	Tue Feb 09 22:40:36 2010 +0000
@@ -932,6 +932,8 @@
 			fed = YAHOO_FEDERATION_OCS;
 		else if (!g_ascii_strncasecmp(who, "ibm", 3))
 			fed = YAHOO_FEDERATION_IBM;
+		else if (!g_ascii_strncasecmp(who, "pbx", 3))
+			fed = YAHOO_FEDERATION_PBX;
 	}
 	return fed;
 }
--- a/libpurple/protocols/yahoo/yahoo_friend.c	Mon Feb 08 17:07:30 2010 +0000
+++ b/libpurple/protocols/yahoo/yahoo_friend.c	Tue Feb 09 22:40:36 2010 +0000
@@ -186,6 +186,9 @@
 		case YAHOO_FEDERATION_IBM:
 			who = g_strconcat("ibm/", temp, NULL);
 			break;
+		case YAHOO_FEDERATION_PBX:
+			who = g_strconcat("pbx/", temp, NULL);
+			break;
 		case YAHOO_FEDERATION_NONE:
 			who = g_strdup(temp);
 			break;
--- a/pidgin/gtkconv.c	Mon Feb 08 17:07:30 2010 +0000
+++ b/pidgin/gtkconv.c	Tue Feb 09 22:40:36 2010 +0000
@@ -9469,6 +9469,12 @@
 #if GTK_CHECK_VERSION(2, 12, 0)
 #define gtk_tooltips_set_tip(tips, w, l, p)  gtk_widget_set_tooltip_text(w, l)
 #endif
+/* PANGO_VERSION_CHECK macro was introduced in 1.15. So we need this double check. */
+#ifndef PANGO_VERSION_CHECK
+#define pango_layout_is_ellipsized(l) TRUE
+#elif !PANGO_VERSION_CHECK(1,16,0)
+#define pango_layout_is_ellipsized(l) TRUE
+#endif
 	PangoLayout *layout;
 
 	layout = gtk_label_get_layout(GTK_LABEL(gtkconv->tab_label));
--- a/pidgin/gtkdebug.c	Mon Feb 08 17:07:30 2010 +0000
+++ b/pidgin/gtkdebug.c	Tue Feb 09 22:40:36 2010 +0000
@@ -686,7 +686,7 @@
 	width  = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/width");
 	height = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/height");
 
-	win->window = pidgin_create_dialog(_("Debug Window"), 0, "debug", TRUE);
+	win->window = pidgin_create_window(_("Debug Window"), 0, "debug", TRUE);
 	purple_debug_info("gtkdebug", "Setting dimensions to %d, %d\n",
 					width, height);
 
@@ -714,7 +714,8 @@
 #endif /* HAVE_REGEX_H */
 
 	/* Setup the vbox */
-	vbox = pidgin_dialog_get_vbox(GTK_DIALOG(win->window));
+	vbox = gtk_vbox_new(FALSE, 0);
+	gtk_container_add(GTK_CONTAINER(win->window), vbox);
 
 	if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/toolbar")) {
 		/* Setup our top button bar thingie. */
--- a/pidgin/gtkft.c	Mon Feb 08 17:07:30 2010 +0000
+++ b/pidgin/gtkft.c	Tue Feb 09 22:40:36 2010 +0000
@@ -714,11 +714,11 @@
 	GtkWidget *window;
 	GtkWidget *vbox1, *vbox2;
 	GtkWidget *sw;
-	GtkWidget *button;
 	GtkWidget *expander;
 	GtkWidget *alignment;
 	GtkWidget *table;
 	GtkWidget *checkbox;
+	GtkWidget *bbox;
 
 	dialog = g_new0(PidginXferDialog, 1);
 	dialog->keep_open =
@@ -727,14 +727,16 @@
 		purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/filetransfer/clear_finished");
 
 	/* Create the window. */
-	dialog->window = window = pidgin_create_dialog(_("File Transfers"), PIDGIN_HIG_BORDER, "file transfer", TRUE);
+	dialog->window = window = pidgin_create_window(_("File Transfers"), PIDGIN_HIG_BORDER, "file transfer", TRUE);
 	gtk_window_set_default_size(GTK_WINDOW(window), 450, 250);
 
 	g_signal_connect(G_OBJECT(window), "delete_event",
 					 G_CALLBACK(delete_win_cb), dialog);
 
 	/* Create the parent vbox for everything. */
-	vbox1 = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(window), FALSE, PIDGIN_HIG_BORDER);
+	vbox1 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox1);
+	gtk_container_add(GTK_CONTAINER(window), vbox1);
 
 	/* Create the main vbox for top half of the window. */
 	vbox2 = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
@@ -785,24 +787,36 @@
 	gtk_container_add(GTK_CONTAINER(alignment), table);
 	gtk_widget_show(table);
 
+	bbox = gtk_hbutton_box_new();
+	gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
+	gtk_box_set_spacing(GTK_BOX(bbox), PIDGIN_HIG_BOX_SPACE);
+	gtk_box_pack_end(GTK_BOX(vbox1), bbox, FALSE, TRUE, 0);
+	gtk_widget_show(bbox);
+
+#define ADD_BUTTON(b, label, callback, callbackdata) do { \
+		GtkWidget *button = gtk_button_new_from_stock(label); \
+		gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); \
+		g_signal_connect(G_OBJECT(button), "clicked", callback, callbackdata); \
+		gtk_widget_show(button); \
+		b = button; \
+	} while (0)
+
 	/* Open button */
-	button = pidgin_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_OPEN, G_CALLBACK(open_button_cb), dialog);
-	gtk_widget_set_sensitive(button, FALSE);
-	dialog->open_button = button;
+	ADD_BUTTON(dialog->open_button, GTK_STOCK_OPEN, G_CALLBACK(open_button_cb), dialog);
+	gtk_widget_set_sensitive(dialog->open_button, FALSE);
 
 	/* Remove button */
-	button = pidgin_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_REMOVE, G_CALLBACK(remove_button_cb), dialog);
-	gtk_widget_hide(button);
-	dialog->remove_button = button;
+	ADD_BUTTON(dialog->remove_button, GTK_STOCK_REMOVE, G_CALLBACK(remove_button_cb), dialog);
+	gtk_widget_hide(dialog->remove_button);
 
 	/* Stop button */
-	button = pidgin_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_STOP, G_CALLBACK(stop_button_cb), dialog);
-	gtk_widget_set_sensitive(button, FALSE);
-	dialog->stop_button = button;
+	ADD_BUTTON(dialog->stop_button, GTK_STOCK_STOP, G_CALLBACK(stop_button_cb), dialog);
+	gtk_widget_set_sensitive(dialog->stop_button, FALSE);
 
 	/* Close button */
-	button = pidgin_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_CLOSE, G_CALLBACK(close_button_cb), dialog);
-	dialog->close_button = button;
+	ADD_BUTTON(dialog->close_button, GTK_STOCK_CLOSE, G_CALLBACK(close_button_cb), dialog);
+
+#undef ADD_BUTTON
 
 #ifdef _WIN32
 	g_signal_connect(G_OBJECT(dialog->window), "show",
--- a/pidgin/gtkwhiteboard.c	Mon Feb 08 17:07:30 2010 +0000
+++ b/pidgin/gtkwhiteboard.c	Tue Feb 09 22:40:36 2010 +0000
@@ -738,12 +738,24 @@
 {
 	PidginWhiteboard *gtkwb = (PidginWhiteboard*)(data);
 
-	pidgin_whiteboard_clear(gtkwb->wb);
+	/* Confirm whether the user really wants to clear */
+	GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(gtkwb->window),
+											   GTK_DIALOG_DESTROY_WITH_PARENT,
+											   GTK_MESSAGE_QUESTION,
+											   GTK_BUTTONS_YES_NO,
+											   _("Do you really want to clear?"));
+	gint response = gtk_dialog_run(GTK_DIALOG(dialog));
+	gtk_widget_destroy(dialog);
 
-	pidgin_whiteboard_set_canvas_as_icon(gtkwb);
+	if (response == GTK_RESPONSE_YES)
+	{
+		pidgin_whiteboard_clear(gtkwb->wb);
 
-	/* Do protocol specific clearing procedures */
-	purple_whiteboard_send_clear(gtkwb->wb);
+		pidgin_whiteboard_set_canvas_as_icon(gtkwb);
+
+		/* Do protocol specific clearing procedures */
+		purple_whiteboard_send_clear(gtkwb->wb);
+	}
 }
 
 static void pidgin_whiteboard_button_save_press(GtkWidget *widget, gpointer data)