Adding a small check when freeing memory in font dialog. Applying a patch by Iain...
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Wed, 2 May 2007 07:36:21 +0000 (07:36 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Wed, 2 May 2007 07:36:21 +0000 (07:36 +0000)
ChangeLog
src/hildon-font-selection-dialog.c
src/hildon-wizard-dialog.c

index 5d7333b..86cea6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-05-02  Michael Dominic Kostrzewa  <michael.kostrzewa@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@nokia.com>
 
        * src/hildon-bread-crumb-trail.c: make the add method handle all the
index a5e1c21..c2373f5 100644 (file)
@@ -932,8 +932,15 @@ hildon_font_selection_dialog_finalize           (GObject *object)
     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);
index 2c7d9cf..28249e6 100644 (file)
@@ -427,13 +427,25 @@ response                                        (HildonWizardDialog *wizard_dial
 
     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;