pidgin: 2201ce7c: Maintain ABI compatibility by keeping he...

qulogic at pidgin.im qulogic at pidgin.im
Sat Mar 20 02:51:17 EDT 2010


-----------------------------------------------------------------
Revision: 2201ce7ce7e248c26f7eac80d2097135fbfdeb1b
Ancestor: 6d79836ef57805a40b20c46467e6a4595605d195
Author: qulogic at pidgin.im
Date: 2010-03-20T06:17:13
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/2201ce7ce7e248c26f7eac80d2097135fbfdeb1b

Modified files:
        pidgin/gtkblist.c pidgin/gtkblist.h

ChangeLog: 

Maintain ABI compatibility by keeping headline_close a GdkPixbuf.
Seperate commit for easy disapproval when 3.0.0 comes around.

Refs #8727.

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	b934d2a4bf45c66fdddf88ba10257c0e86da4a93
+++ pidgin/gtkblist.c	571bf27d7bd44981e8fc02fb3c1347606193cb65
@@ -5904,17 +5904,19 @@ static void pidgin_blist_show(PurpleBudd
 			  NULL);
 	gtk_widget_set_name(gtkblist->headline_hbox, "gtk-tooltips");
 
+	gtkblist->headline_close = gtk_widget_render_icon(ebox, GTK_STOCK_CLOSE,
+		gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_MICROSCOPIC), NULL);
 	gtkblist->hand_cursor = gdk_cursor_new (GDK_HAND2);
 	gtkblist->arrow_cursor = gdk_cursor_new (GDK_LEFT_PTR);
 
 	/* Close button. */
 	close = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
-	gtkblist->headline_close = pidgin_create_small_button(close);
-	gtk_box_pack_start(GTK_BOX(gtkblist->headline_hbox), gtkblist->headline_close, FALSE, FALSE, 0);
+	close = pidgin_create_small_button(close);
+	gtk_box_pack_start(GTK_BOX(gtkblist->headline_hbox), close, FALSE, FALSE, 0);
 #if GTK_CHECK_VERSION(2,12,0)
-	gtk_widget_set_tooltip_text(gtkblist->headline_close, _("Close"));
+	gtk_widget_set_tooltip_text(close, _("Close"));
 #endif
-	g_signal_connect(gtkblist->headline_close, "clicked", G_CALLBACK(headline_close_press_cb), gtkblist);
+	g_signal_connect(close, "clicked", G_CALLBACK(headline_close_press_cb), gtkblist);
 
 	g_signal_connect(G_OBJECT(ebox), "enter-notify-event", G_CALLBACK(headline_box_enter_cb), gtkblist);
 	g_signal_connect(G_OBJECT(ebox), "leave-notify-event", G_CALLBACK(headline_box_leave_cb), gtkblist);
@@ -6919,6 +6921,9 @@ static void pidgin_blist_destroy(PurpleB
 
 	purple_signals_disconnect_by_handle(gtkblist);
 
+	if (gtkblist->headline_close)
+		gdk_pixbuf_unref(gtkblist->headline_close);
+
 	gtk_widget_destroy(gtkblist->window);
 
 	pidgin_blist_tooltip_destroy();
============================================================
--- pidgin/gtkblist.h	04580e94eaef9e1a27ac042000f25f283f76281c
+++ pidgin/gtkblist.h	4e1d7c35c67cd80e44fb277277e66f18476185cd
@@ -119,7 +119,7 @@ struct _PidginBuddyList {
 	GtkWidget *headline_hbox;       /**< Hbox for headline notification */
 	GtkWidget *headline_label;	/**< Label for headline notifications */
 	GtkWidget *headline_image;      /**< Image for headline notifications */
-	GtkWidget *headline_close;      /**< Button for closing the headline without triggering the callback */
+	GdkPixbuf *headline_close;      /**< @deprecated: Close image for closing the headline without triggering the callback */ 
 	GCallback headline_callback;    /**< Callback for headline notifications */
 	gpointer headline_data;         /**< User data for headline notifications */
 	GDestroyNotify headline_destroy; /**< Callback to use for destroying the headline-data */


More information about the Commits mailing list