2006-09-19 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Tue, 19 Sep 2006 12:25:25 +0000 (12:25 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Tue, 19 Sep 2006 12:25:25 +0000 (12:25 +0000)
* hildon-widgets/hildon-caption.c: Do not draw the focus border when
the label has no text set. Fixes #NB40649.
Also fixing some memory leaks in properties setting.

ChangeLog
hildon-widgets/hildon-caption.c

index 0732199..fd02294 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-09-19  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
 
+       * hildon-widgets/hildon-caption.c: Do not draw the focus border when
+       the label has no text set. Fixes #NB40649. 
+       Also fixing some memory leaks in properties setting.
+
+2006-09-19  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
+
        * hildon-widgets/hildon-time-editor.c:
        (hildon_time_editor_entry_clicked): This function has been
        removed. It is not needed any more.
index afd756e..d23ba65 100644 (file)
@@ -341,7 +341,7 @@ static gboolean hildon_caption_expose( GtkWidget *widget,
 
   /* If our child control is focused, we draw nice looking focus
      graphics for the caption */  
-  if ( priv->is_focused )
+  if ( priv->is_focused && priv->text )
   {
     /* Determine focus box dimensions */
     gtk_widget_get_child_requisition( priv->caption_area, &req );
@@ -384,7 +384,7 @@ static void hildon_caption_set_property( GObject *object, guint param_id,
       }
 
       /* Update label */
-      priv->text = g_strdup( g_value_get_string(value) );
+      priv->text = g_value_get_string(value);
       hildon_caption_set_label_text( priv );
       break;
       
@@ -428,7 +428,7 @@ static void hildon_caption_set_property( GObject *object, guint param_id,
         priv->separator = NULL;
       }
 
-      priv->separator = g_strdup( g_value_get_string(value) );
+      priv->separator = g_value_get_string(value);
       hildon_caption_set_label_text( priv );
       break;
 
@@ -546,6 +546,7 @@ static void hildon_caption_init( HildonCaption *caption )
   priv->icon = NULL;
   priv->group = NULL;
   priv->is_focused = FALSE;
+  priv->text = NULL;
 
   priv->separator = g_strdup(_("ecdg_ti_caption_separator"));