[gnome-panel/gtk3] window-list: Don't use deprecated size-allocate signal



commit 77a45f0abf8d0db41bb4b99e08dfbdd968cb6be8
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Wed Jan 19 14:56:25 2011 +0100

    window-list: Don't use deprecated size-allocate signal

 applets/wncklet/window-list.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index 39244fd..330abe8 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -382,18 +382,14 @@ setup_gconf (TasklistData *tasklist)
 }
 
 static void
-applet_size_request (GtkWidget      *widget,
-		     GtkRequisition *requisition,
-		     TasklistData   *tasklist)
+applet_size_allocate (GtkWidget      *widget,
+                      GtkAllocation  *allocation,
+                      TasklistData   *tasklist)
 {
 	int len;
 	const int *size_hints;
-	GtkRequisition child_req;
-    	WnckTasklist *wncktl = WNCK_TASKLIST (tasklist->tasklist);
 
-	gtk_widget_get_preferred_size (tasklist->applet, &child_req, NULL);
-
-	size_hints = wnck_tasklist_get_size_hint_list (wncktl, &len);
+	size_hints = wnck_tasklist_get_size_hint_list (WNCK_TASKLIST (tasklist->tasklist), &len);
 	g_assert (len % 2 == 0);
 
         panel_applet_set_size_hints (PANEL_APPLET (tasklist->applet),
@@ -521,9 +517,8 @@ window_list_applet_fill (PanelApplet *applet)
 	g_signal_connect (G_OBJECT (tasklist->tasklist), "destroy",
 			  G_CALLBACK (destroy_tasklist),
 			  tasklist);
-
-	g_signal_connect (G_OBJECT (tasklist->applet), "size_request",
-			  G_CALLBACK (applet_size_request),
+	g_signal_connect (G_OBJECT (tasklist->applet), "size_allocate",
+			  G_CALLBACK (applet_size_allocate),
 			  tasklist);
 	tasklist_update (tasklist);
 	gtk_widget_show (tasklist->tasklist);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]