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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed May 9 18:51:34 EEST 2007
Author: jobi
Date: 2007-05-09 18:51:33 +0300 (Wed, 09 May 2007)
New Revision: 11553

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

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

	* libhildondesktop/hildon-home-area.c:
	- fixed a bug I just introduced, the Damage needs to be created
	even if the applet is already realized when added
	- removed some debug messages
	* libhildondesktop/hildon-desktop-toggle-button.c:
	- removed excessive debug messages



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-05-09 15:24:35 UTC (rev 11552)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-05-09 15:51:33 UTC (rev 11553)
@@ -1,3 +1,12 @@
+2007-05-09  Johan Bilien  <johan.bilien at nokia.com>
+
+	* libhildondesktop/hildon-home-area.c:
+	- fixed a bug I just introduced, the Damage needs to be created
+	even if the applet is already realized when added
+	- removed some debug messages
+	* libhildondesktop/hildon-desktop-toggle-button.c:
+	- removed excessive debug messages
+
 2007-05-09  Moises Martinez  <moises.martinez at nokia.com>
 
 	* src/hd-config.h: Added thumb icon size.
@@ -61,6 +70,7 @@
 	- removed _init_applets, no longer necessary
 	- when layout mode sucks, save the layout once
 	every second when an applet is moved
+	Fixes: NB#56368
 	* src/hd-desktop.c: Do not call _applet_init anymore
 	* background-manager/background-manager.c:
 	- do not apply the borders for the initial background

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-toggle-button.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-toggle-button.c	2007-05-09 15:24:35 UTC (rev 11552)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-toggle-button.c	2007-05-09 15:51:33 UTC (rev 11553)
@@ -130,8 +130,6 @@
                           event->area.width, event->area.height);
 
       if (priv->focus_picture != None && GTK_WIDGET_HAS_FOCUS (widget))
-        {
-          g_debug ("painting focus");
         XRenderComposite (GDK_DISPLAY (),
                           PictOpOver,
                           priv->focus_picture,
@@ -141,7 +139,6 @@
                           event->area.x, event->area.y,
                           event->area.x - x_offset, event->area.y - y_offset,
                           event->area.width, event->area.height);
-        }
 
       XRenderFreePicture (GDK_DISPLAY (),
                           picture);

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c	2007-05-09 15:24:35 UTC (rev 11552)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c	2007-05-09 15:51:33 UTC (rev 11553)
@@ -748,7 +748,6 @@
 
   if (priv->batch_add)
     {
-      g_debug ("Batch adding it");
       priv->to_add = g_list_append (priv->to_add, applet);
       g_signal_emit_by_name (area, "layout-changed");
       return;
@@ -756,18 +755,14 @@
 
   if (priv->layout && HILDON_DESKTOP_IS_HOME_ITEM (applet))
     {
-      g_debug ("Adding Hildon Home applet");
       GdkRectangle *rect;
       const gchar *name = hildon_desktop_item_get_id (
                                      HILDON_DESKTOP_ITEM (applet));
 
-      g_debug ("Name: %s", name);
-
       rect = g_hash_table_lookup (priv->layout, name);
 
       if (rect)
         {
-          g_debug ("Found layout configuration");
           gtk_fixed_put (GTK_FIXED (area), applet, rect->x, rect->y);
           if (rect->width > 0 && rect->height > 0)
             gtk_widget_set_size_request (applet, rect->width, rect->height);
@@ -775,7 +770,6 @@
 
       else
         {
-          g_debug ("No layout configuration");
           gtk_fixed_put (GTK_FIXED (area), applet, 0, 0);
         }
 
@@ -867,8 +861,6 @@
 {
   ChildData    *child_data;
 
-  g_debug ("Child style set");
-
   if (!HILDON_DESKTOP_IS_HOME_ITEM (child))
     return;
 
@@ -901,6 +893,7 @@
 
   data->old_allocation = *allocation;
 
+
 }
 
 static void
@@ -938,7 +931,7 @@
 
   if (mask_file_name)
     {
-      pixbuf = gdk_pixbuf_new_from_file (mask_file_name, 
+      pixbuf = gdk_pixbuf_new_from_file (mask_file_name,
                                          &error);
     }
 
@@ -950,6 +943,7 @@
       pixbuf = NULL;
     }
 
+  g_debug ("Loaded %s for alpha mask", mask_file_name);
 
   if (pixbuf)
     {
@@ -1069,10 +1063,11 @@
                            "child-data", &child_data,
                            NULL);
 
-  if (!child_data->alpha_mask_unscaled)
+  if (child_data->alpha_mask_unscaled == None)
     hildon_home_area_child_build_alpha_mask_unscaled (area, child);
 
-  g_return_if_fail (child_data->alpha_mask_unscaled);
+  if (child_data->alpha_mask_unscaled == None)
+    return;
 
   if (child_data->alpha_mask != None)
     XRenderFreePicture (GDK_DISPLAY (),
@@ -1088,12 +1083,6 @@
       XRenderPictureAttributes  pa;
       XRenderPictFormat        *format;
 
-      g_debug ("Got border values: %i %i %i %i",
-               borders->left,
-               borders->right,
-               borders->top,
-               borders->bottom);
-
       w = child->allocation.width;
       h = child->allocation.height;
 
@@ -1284,7 +1273,7 @@
 
   priv = HILDON_HOME_AREA_GET_PRIVATE (widget);
 
-  if (GTK_WIDGET_VISIBLE (widget))
+  if (GTK_WIDGET_DRAWABLE (widget))
     {
       GList                    *children;
       XRectangle                rectangle;
@@ -1351,7 +1340,7 @@
 
       for (i = 0; i < n_children; i++)
         {
-          GList        *l = NULL; 
+          GList        *l = NULL;
 
           l = g_list_find_custom (children,
                                   &wchildren[i],
@@ -1445,6 +1434,11 @@
       child_data->damage = XDamageCreate (GDK_DISPLAY (),
                                           child_data->window,
                                           XDamageReportNonEmpty);
+
+      gdk_window_add_filter (child_data->widget->window,
+                             (GdkFilterFunc)
+                                 hildon_home_area_child_window_filter,
+                             child_data->widget);
     }
 }
 
@@ -1465,11 +1459,6 @@
   if (data->picture == None)
     hildon_home_area_create_child_data (HILDON_HOME_AREA (area), child);
 
-  gdk_window_add_filter (child->window,
-                         (GdkFilterFunc)
-                         hildon_home_area_child_window_filter,
-                         data->widget);
-
   if (data->alpha_mask == None)
     hildon_home_area_child_build_alpha_mask (area, child);
 }
@@ -1680,8 +1669,6 @@
       w = GTK_WIDGET (i->data);
       name = hildon_desktop_item_get_id (HILDON_DESKTOP_ITEM (w));
 
-      g_debug ("Placing %s", name);
-
       gtk_widget_size_request (w, &req);
 
       i_rect = region;
@@ -1689,11 +1676,6 @@
       while (i_rect)
         {
           GdkRectangle *r = (GdkRectangle *)i_rect->data;
-          g_debug ("Rectangle: (%i,%i) %ix%i",
-                   r->x,
-                   r->y,
-                   r->width,
-                   r->height);
 
           if (r->width  >= req.width &&
               r->height >= req.height)
@@ -1953,8 +1935,6 @@
   g_return_if_fail (area);
   priv = HILDON_HOME_AREA_GET_PRIVATE (area);
 
-  g_debug ("Loading Hildon Home layout from %s", path);
-
   applets = gtk_container_get_children (GTK_CONTAINER (area));
 
   keyfile = g_key_file_new ();


More information about the maemo-commits mailing list