pidgin: 37765988: Don't add the Send button to a gtkconv->...

qulogic at pidgin.im qulogic at pidgin.im
Fri Nov 14 02:00:40 EST 2008


-----------------------------------------------------------------
Revision: 37765988fd42bcd48342876626906fd125e3f611
Ancestor: f456fe571991ad3488d9bc1407d6229614f25f28
Author: qulogic at pidgin.im
Date: 2008-11-13T04:32:54
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/37765988fd42bcd48342876626906fd125e3f611

Modified files:
        pidgin/plugins/sendbutton.c

ChangeLog: 

Don't add the Send button to a gtkconv->lower_hbox when the data specifying it
already exists. This means you shouldn't get multiple Send buttons for
conversations with contacts with multiple contained buddies with whom you've
started a conversation.
Also, remove that same data when the Send button plugin is removed so that it
will come back properly next time you load the plugin.

-------------- next part --------------
============================================================
--- pidgin/plugins/sendbutton.c	e3245e3963dbf7102ace70e0c7d8abb3c531718b
+++ pidgin/plugins/sendbutton.c	3c6de1f95947418e11c7d5d728757cabd52f5503
@@ -41,6 +41,12 @@ create_send_button_pidgin(PidginConversa
 {
 	GtkWidget *send_button;
 
+	send_button = g_object_get_data(G_OBJECT(gtkconv->lower_hbox),
+	                                "send_button");
+
+	if (send_button != NULL)
+		return;
+
 	send_button = gtk_button_new_with_mnemonic(_("_Send"));
 	g_signal_connect(G_OBJECT(send_button), "clicked",
 	                 G_CALLBACK(send_button_cb), gtkconv);
@@ -61,6 +67,8 @@ remove_send_button_pidgin(PidginConversa
 	                                "send_button");
 	if (send_button != NULL) {
 		gtk_widget_destroy(send_button);
+		g_object_set_data(G_OBJECT(gtkconv->lower_hbox),
+		                  "send_button", NULL);
 	}
 }
 


More information about the Commits mailing list