[maemo-commits] [maemo-commits] r13630 - in projects/haf/trunk/hildon-desktop: . libhildondesktop

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Sep 6 09:53:45 EEST 2007
Author: jobi
Date: 2007-09-06 09:53:43 +0300 (Thu, 06 Sep 2007)
New Revision: 13630

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c
Log:

2007-09-06 Johan Bilien  <johan.bilien at nokia.com>

	* libhildondesktop/hildon-home-area.c: signal a layout change
	when placing or removing a widget



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-09-06 06:34:46 UTC (rev 13629)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-09-06 06:53:43 UTC (rev 13630)
@@ -1,5 +1,10 @@
 2007-09-06 Johan Bilien  <johan.bilien at nokia.com>
 
+	* libhildondesktop/hildon-home-area.c: signal a layout change
+	when placing or removing a widget
+
+2007-09-06 Johan Bilien  <johan.bilien at nokia.com>
+
 	* libhildondesktop/hildon-desktop-picture.[ch]:
 	- added _picture_from_color
 	* background-manager/background-manager.{c,h,xml.in}:

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c	2007-09-06 06:34:46 UTC (rev 13629)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c	2007-09-06 06:53:43 UTC (rev 13630)
@@ -840,10 +840,6 @@
 
       if (layout)
         {
-
-          g_debug ("Found a layout, setting %ix%i",
-                   layout->rect.width,
-                   layout->rect.height);
           if (layout->rect.width > 0 && layout->rect.height > 0)
             gtk_widget_set_size_request (applet,
                                          layout->rect.width,
@@ -1691,6 +1687,7 @@
 
     g_hash_table_insert (priv->layout, g_strdup (name), layout);
     hildon_home_area_put (area, w, 0, 0, G_MAXINT);
+    g_signal_emit_by_name (area, "layout-changed");
 
     g_list_foreach (region, (GFunc)g_free, NULL);
     g_list_free (region);
@@ -1719,7 +1716,9 @@
 
         g_hash_table_insert (priv->layout, g_strdup (name), layout);
         hildon_home_area_put (area, w, r->x, r->y, G_MAXINT);
+        g_signal_emit_by_name (area, "layout-changed");
 
+
         break;
       }
 
@@ -1777,6 +1776,17 @@
 
       child_data_free (child_data);
     }
+
+  if (HILDON_DESKTOP_IS_HOME_ITEM (applet))
+  {
+    const gchar *name =
+        hildon_desktop_item_get_id (HILDON_DESKTOP_ITEM (applet));
+
+    if (g_hash_table_remove (priv->layout, name))
+      g_signal_emit_by_name (area, "layout-changed");
+
+  }
+
 }
 
 /* Public functions */


More information about the maemo-commits mailing list