diff options
| author | Xan Lopez <xan.lopez@nokia.com> | 2007-05-08 07:55:13 +0000 |
|---|---|---|
| committer | Xan Lopez <xan.lopez@nokia.com> | 2007-05-08 07:55:13 +0000 |
| commit | ff7fc7eab22c71014deb61bd8dba9043cb6070b3 (patch) | |
| tree | af867487b4d4e4a1087793ad63c66358a04843ee | |
| parent | ade49a2cbce9de74b41c9724bb07cb7311580e37 (diff) | |
* 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.
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | examples/hildon-bread-crumb-trail-example.c | 6 | ||||
| -rw-r--r-- | src/hildon-bread-crumb-trail.c | 7 |
3 files changed, 14 insertions, 6 deletions
@@ -1,3 +1,10 @@ +2007-05-08 Xan Lopez <xan.lopez@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@nokia.com> [1.0.5-1 release] diff --git a/examples/hildon-bread-crumb-trail-example.c b/examples/hildon-bread-crumb-trail-example.c index 959bd93..8f287bf 100644 --- a/examples/hildon-bread-crumb-trail-example.c +++ b/examples/hildon-bread-crumb-trail-example.c @@ -210,9 +210,11 @@ sort_iter_compare_func (GtkTreeModel *model, { /* 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: diff --git a/src/hildon-bread-crumb-trail.c b/src/hildon-bread-crumb-trail.c index e203d93..a8996ba 100644 --- a/src/hildon-bread-crumb-trail.c +++ b/src/hildon-bread-crumb-trail.c @@ -47,6 +47,7 @@ struct _HildonBreadCrumbTrailPrivate { GtkWidget *back_button; GList *item_list; + GtkWidget *arrow; }; /* Signals */ @@ -284,7 +285,6 @@ hildon_bread_crumb_trail_size_allocate (GtkWidget *widget, { 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 @@ hildon_bread_crumb_trail_size_allocate (GtkWidget *widget, 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 @@ hildon_bread_crumb_trail_size_allocate (GtkWidget *widget, 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 @@ hildon_bread_crumb_trail_update_back_button_sensitivity (HildonBreadCrumbTrail * 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 @@ create_back_button (HildonBreadCrumbTrail *bct) 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); |
