pidgin: 185ecd69: Change some menutray internals. This mak...

sadrul at pidgin.im sadrul at pidgin.im
Thu Sep 18 12:10:27 EDT 2008


-----------------------------------------------------------------
Revision: 185ecd692befdcd3150dd1a3bb8ae9a83037c591
Ancestor: e550112b97817b0eafc647bd8c0adddf2a262a62
Author: sadrul at pidgin.im
Date: 2008-09-18T16:19:11
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/185ecd692befdcd3150dd1a3bb8ae9a83037c591

Modified files:
        pidgin/gtkmenutray.c

ChangeLog: 

Change some menutray internals. This makes the tray-icons behave better.

-------------- next part --------------
============================================================
--- pidgin/gtkmenutray.c	6fa3e850fb9737b47291213a00cebdfd2a5d9f92
+++ pidgin/gtkmenutray.c	4e05bc17ff1e83e6cb890dabb267f10c1971b9f5
@@ -84,6 +84,14 @@ static void
 }
 
 static void
+pidgin_menu_tray_map(GtkWidget *widget)
+{
+	GTK_WIDGET_CLASS(parent_class)->map(widget);
+	gtk_container_add(GTK_CONTAINER(widget),
+			PIDGIN_MENU_TRAY(widget)->tray);
+}
+
+static void
 pidgin_menu_tray_finalize(GObject *obj)
 {
 	PidginMenuTray *tray = PIDGIN_MENU_TRAY(obj);
@@ -109,6 +117,7 @@ pidgin_menu_tray_class_init(PidginMenuTr
 pidgin_menu_tray_class_init(PidginMenuTrayClass *klass) {
 	GObjectClass *object_class = G_OBJECT_CLASS(klass);
 	GtkItemClass *item_class = GTK_ITEM_CLASS(klass);
+	GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
 	GParamSpec *pspec;
 
 	parent_class = g_type_class_peek_parent(klass);
@@ -119,6 +128,8 @@ pidgin_menu_tray_class_init(PidginMenuTr
 	item_class->select = pidgin_menu_tray_select;
 	item_class->deselect = pidgin_menu_tray_deselect;
 
+	widget_class->map = pidgin_menu_tray_map;
+
 	pspec = g_param_spec_object("box", "The box",
 								"The box",
 								GTK_TYPE_BOX,
@@ -152,8 +163,6 @@ pidgin_menu_tray_init(PidginMenuTray *me
 		gtk_widget_set_size_request(widget, -1, height);
 	}
 
-	gtk_container_add(GTK_CONTAINER(menu_tray), menu_tray->tray);
-
 	gtk_widget_show(menu_tray->tray);
 }
 


More information about the Commits mailing list