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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu May 3 14:44:54 EEST 2007
Author: mdk
Date: 2007-05-03 14:44:54 +0300 (Thu, 03 May 2007)
New Revision: 11404

Modified:
   projects/haf/trunk/hildon-1/ChangeLog
   projects/haf/trunk/hildon-1/examples/hildon-vvolumebar-example.c
   projects/haf/trunk/hildon-1/src/hildon-font-selection-dialog.c
Log:
The VVolumebar example now uses slightly bigger height.
Adding some checks before freeing memory in the font selection dialog.


Modified: projects/haf/trunk/hildon-1/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-1/ChangeLog	2007-05-03 11:33:38 UTC (rev 11403)
+++ projects/haf/trunk/hildon-1/ChangeLog	2007-05-03 11:44:54 UTC (rev 11404)
@@ -1,3 +1,11 @@
+2007-05-03  Michael Dominic Kostrzewa  <michael.kostrzewa at 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 at nokia.com> 
 
 	* src/hildon-font-selection-dialog.c: Adding a small check when

Modified: projects/haf/trunk/hildon-1/examples/hildon-vvolumebar-example.c
===================================================================
--- projects/haf/trunk/hildon-1/examples/hildon-vvolumebar-example.c	2007-05-03 11:33:38 UTC (rev 11403)
+++ projects/haf/trunk/hildon-1/examples/hildon-vvolumebar-example.c	2007-05-03 11:44:54 UTC (rev 11404)
@@ -37,7 +37,7 @@
     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);

Modified: projects/haf/trunk/hildon-1/src/hildon-font-selection-dialog.c
===================================================================
--- projects/haf/trunk/hildon-1/src/hildon-font-selection-dialog.c	2007-05-03 11:33:38 UTC (rev 11403)
+++ projects/haf/trunk/hildon-1/src/hildon-font-selection-dialog.c	2007-05-03 11:44:54 UTC (rev 11404)
@@ -1159,7 +1159,9 @@
     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 @@
             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 @@
         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);
 
-    /*size*/
+    str = NULL;
+
+    /* size */
     if (size_set)
     {
         attr = pango_attr_size_new (size * PANGO_SCALE);


More information about the maemo-commits mailing list