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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed May 2 10:36:22 EEST 2007
Author: mdk
Date: 2007-05-02 10:36:21 +0300 (Wed, 02 May 2007)
New Revision: 11379

Modified:
   projects/haf/trunk/hildon-1/ChangeLog
   projects/haf/trunk/hildon-1/src/hildon-font-selection-dialog.c
   projects/haf/trunk/hildon-1/src/hildon-wizard-dialog.c
Log:
Adding a small check when freeing memory in font dialog. 
Applying a patch by Iain Holmes to fix buttons sensitivity on page switching in wizard dialog.


Modified: projects/haf/trunk/hildon-1/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-1/ChangeLog	2007-05-02 07:27:18 UTC (rev 11378)
+++ projects/haf/trunk/hildon-1/ChangeLog	2007-05-02 07:36:21 UTC (rev 11379)
@@ -1,3 +1,11 @@
+2007-05-02  Michael Dominic Kostrzewa  <michael.kostrzewa at nokia.com> 
+
+	* src/hildon-font-selection-dialog.c: Adding a small check when
+	freeing memory. 
+
+	* src/hildon-wizard-dialog.c: Applying a patch by Iain Holmes to fix
+	buttons sensitivity on page switching.
+
 2007-04-27  Xan Lopez  <xan.lopez at nokia.com>
 
 	* src/hildon-bread-crumb-trail.c: make the add method handle all the

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-02 07:27:18 UTC (rev 11378)
+++ projects/haf/trunk/hildon-1/src/hildon-font-selection-dialog.c	2007-05-02 07:36:21 UTC (rev 11379)
@@ -932,9 +932,16 @@
     priv = HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE (fontsel);
     g_assert (priv);
 
-    g_free (priv->preview_text);
-    g_free (priv->families);
+    if (priv->preview_text != NULL) {
+        g_free (priv->preview_text);
+        priv->preview_text = NULL;
+    }
 
+    if (priv->families != NULL) {
+        g_free (priv->families);
+        priv->families = NULL;
+    }
+
     if (G_OBJECT_CLASS (parent_class)->finalize)
         G_OBJECT_CLASS (parent_class)->finalize (object);
 }

Modified: projects/haf/trunk/hildon-1/src/hildon-wizard-dialog.c
===================================================================
--- projects/haf/trunk/hildon-1/src/hildon-wizard-dialog.c	2007-05-02 07:27:18 UTC (rev 11378)
+++ projects/haf/trunk/hildon-1/src/hildon-wizard-dialog.c	2007-05-02 07:36:21 UTC (rev 11379)
@@ -427,13 +427,25 @@
 
     g_assert (priv);
 
+    current = gtk_notebook_current_page (notebook);
+
     switch (response_id) {
 
         case HILDON_WIZARD_DIALOG_PREVIOUS:
+            --current;
+            is_last = (current == last);
+            is_first = (current == 0);
+            make_buttons_sensitive (wizard_dialog,
+                                    !is_first, !is_first, !is_last); 
             gtk_notebook_prev_page (notebook); /* go to previous page */
             break;
 
         case HILDON_WIZARD_DIALOG_NEXT:
+            ++current;
+            is_last = (current == last);
+            is_first = (current == 0);
+            make_buttons_sensitive (wizard_dialog,
+                                    !is_first, !is_first, !is_last);
             gtk_notebook_next_page (notebook); /* go to next page */
             break;
 


More information about the maemo-commits mailing list