[maemo-commits] [maemo-commits] r11509 - in projects/haf/trunk/hildon-1: . examples src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue May 8 10:55:14 EEST 2007
Author: xan
Date: 2007-05-08 10:55:13 +0300 (Tue, 08 May 2007)
New Revision: 11509

Modified:
   projects/haf/trunk/hildon-1/ChangeLog
   projects/haf/trunk/hildon-1/examples/hildon-bread-crumb-trail-example.c
   projects/haf/trunk/hildon-1/src/hildon-bread-crumb-trail.c
Log:
	* src/hildon-bread-crumb-trail.c: Use set_child_visible only to
	control the visibility of the children.

	* examples/hildon-bread-crumb-trail-example.c: Plug leak.


Modified: projects/haf/trunk/hildon-1/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-1/ChangeLog	2007-05-07 18:32:14 UTC (rev 11508)
+++ projects/haf/trunk/hildon-1/ChangeLog	2007-05-08 07:55:13 UTC (rev 11509)
@@ -1,3 +1,10 @@
+2007-05-08  Xan Lopez  <xan.lopez at nokia.com>
+
+	* src/hildon-bread-crumb-trail.c: Use set_child_visible only to
+	control the visibility of the children.
+
+	* examples/hildon-bread-crumb-trail-example.c: Plug leak.
+
 2007-05-07  Michael Dominic Kostrzewa  <michael.kostrzewa at nokia.com> 
 
 	[1.0.5-1 release]

Modified: projects/haf/trunk/hildon-1/examples/hildon-bread-crumb-trail-example.c
===================================================================
--- projects/haf/trunk/hildon-1/examples/hildon-bread-crumb-trail-example.c	2007-05-07 18:32:14 UTC (rev 11508)
+++ projects/haf/trunk/hildon-1/examples/hildon-bread-crumb-trail-example.c	2007-05-08 07:55:13 UTC (rev 11509)
@@ -210,9 +210,11 @@
           {
             /* Same type, alphabetical sort */
             ret = g_utf8_collate (string_a, string_b);
-            g_free (string_a);
-            g_free (string_b);
           }
+
+        g_free (string_a);
+        g_free (string_b);
+
         break;
       }
     default:

Modified: projects/haf/trunk/hildon-1/src/hildon-bread-crumb-trail.c
===================================================================
--- projects/haf/trunk/hildon-1/src/hildon-bread-crumb-trail.c	2007-05-07 18:32:14 UTC (rev 11508)
+++ projects/haf/trunk/hildon-1/src/hildon-bread-crumb-trail.c	2007-05-08 07:55:13 UTC (rev 11509)
@@ -47,6 +47,7 @@
 {
   GtkWidget *back_button;
   GList *item_list;
+  GtkWidget *arrow;
 };
 
 /* Signals */
@@ -284,7 +285,6 @@
             {
               first_hide = p->next;
               gtk_widget_size_allocate (child, &child_allocation);
-              gtk_widget_show (child);
               gtk_widget_set_child_visible (child, TRUE);
               child_allocation.x += child_allocation.width;
             }
@@ -322,7 +322,6 @@
 
       child_allocation.width = natural_width;
       gtk_widget_size_allocate (child, &child_allocation);
-      gtk_widget_show (child);
       gtk_widget_set_child_visible (child, TRUE);
       child_allocation.x += child_allocation.width;
     }
@@ -332,7 +331,6 @@
       item = HILDON_BREAD_CRUMB (p->data);
       child = GTK_WIDGET (item);
 
-      gtk_widget_hide (GTK_WIDGET (item));
       gtk_widget_set_child_visible (GTK_WIDGET (item), FALSE);
     }
 }
@@ -463,7 +461,7 @@
 
   list_length = g_list_length (priv->item_list);
 
-  if (list_length == 0 || list_length == 1)
+  if (list_length <= 1)
     {
       gtk_widget_set_sensitive (priv->back_button, FALSE);
     }
@@ -487,6 +485,7 @@
   gtk_widget_set_sensitive (button, FALSE);
 
   arrow = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
+  bct->priv->arrow = arrow;
   gtk_widget_style_get (GTK_WIDGET (bct),
                         "arrow-size", &arrow_size,
                         NULL);


More information about the maemo-commits mailing list