The VVolumebar example now uses slightly bigger height. Adding some checks before...
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Thu, 3 May 2007 11:44:54 +0000 (11:44 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Thu, 3 May 2007 11:44:54 +0000 (11:44 +0000)
ChangeLog
examples/hildon-vvolumebar-example.c
src/hildon-font-selection-dialog.c

index 86cea6c..edbc9d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-05-03  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
+
+       * examples/hildon-vvolumebar-example.c: The VVolumebar example now
+       uses slightly bigger height.
+
+       * src/hildon-font-selection-dialog.c: Adding some checks before
+       freeing memory in the font selection dialog.
+
 2007-05-02  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
 
        * src/hildon-font-selection-dialog.c: Adding a small check when
index d837513..87eb31c 100644 (file)
@@ -37,7 +37,7 @@ main                                            (int argc,
     GtkDialog *dialog = GTK_DIALOG (gtk_dialog_new ());
 
     HildonVVolumebar *bar = HILDON_VVOLUMEBAR (hildon_vvolumebar_new ());
-    gtk_widget_set_size_request (GTK_WIDGET (bar), -1, 200);
+    gtk_widget_set_size_request (GTK_WIDGET (bar), -1, 300);
 
     gtk_box_pack_start (GTK_BOX (dialog->vbox), GTK_WIDGET (bar), FALSE, FALSE, 0);
     gtk_dialog_add_button (dialog, "Close", GTK_RESPONSE_CLOSE);
index c2373f5..777662c 100644 (file)
@@ -1159,7 +1159,9 @@ hildon_font_selection_dialog_show_preview       (HildonFontSelectionDialog *font
     preview_label = gtk_label_new (str);
     gtk_label_set_line_wrap (GTK_LABEL(preview_label), TRUE);
 
-    g_free (str);
+    if (str) 
+        g_free (str);
+
     str = NULL;
 
     gtk_container_add (GTK_CONTAINER (GTK_DIALOG(preview_dialog)->vbox),
@@ -1171,7 +1173,7 @@ hildon_font_selection_dialog_show_preview       (HildonFontSelectionDialog *font
             G_CALLBACK(hildon_font_selection_dialog_preview_key_press),
             NULL);
 
-    /*Set the font*/
+    /* Set the font */
     list = (show_ref) ? hildon_font_selection_dialog_create_attrlist (fontsel, 
             strlen (_("ecdg_fi_preview_font_preview_reference")),
             strlen (priv->preview_text)) :
@@ -1195,9 +1197,12 @@ hildon_font_selection_dialog_show_preview       (HildonFontSelectionDialog *font
         attr = pango_attr_family_new (str);
         add_preview_text_attr (list, attr, 0, strlen (_("ecdg_fi_preview_font_preview_reference")));
     }
-    g_free (str);
+    if (str != NULL)
+        g_free (str);
+
+    str = NULL;
 
-    /*size*/
+    /* size */
     if (size_set)
     {
         attr = pango_attr_size_new (size * PANGO_SCALE);