Delay call to gtk_widget_show(self->combo_account_country)
[modest] / src / maemo / easysetup / modest-wizard-dialog.c
index d205f46..fbb25e3 100644 (file)
 #include <config.h>
 #endif
 
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
 #include <hildon-widgets/hildon-defines.h>
 #else
 #include <hildon/hildon-defines.h>
-#endif /*MODEST_HILDON_VERSION_0*/
+#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
 
 #include "modest-wizard-dialog.h"
 
@@ -255,12 +255,15 @@ init (ModestWizardDialog *wizard_dialog)
     gtk_dialog_set_has_separator (dialog, FALSE);
     wizard_dialog->priv = priv;
     priv->box = GTK_BOX (gtk_hbox_new (FALSE, 0));
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
     priv->image = gtk_image_new_from_icon_name ("qgn_widg_wizard",
                                                HILDON_ICON_SIZE_WIDG_WIZARD);
-#else
+#else      
+    static int icon_size = 0;
+    if (!icon_size)
+           icon_size = gtk_icon_size_register("modest_wizard", 50, 50);
     priv->image = gtk_image_new_from_icon_name ("qgn_widg_wizard",
-                                               HILDON_ICON_SIZE_WIZARD);
+                                               icon_size);
 #endif /*MODEST_HILDON_VERSION_0*/
     /* Default values for user provided properties */
     priv->notebook = NULL;
@@ -441,7 +444,6 @@ get_property (GObject      *object,
 static void
 create_title (ModestWizardDialog *wizard_dialog)
 {
-    gint pages, current;
     gchar *str = NULL;
     ModestWizardDialogPrivate *priv = NULL;
     GtkNotebook *notebook = NULL;
@@ -456,22 +458,37 @@ create_title (ModestWizardDialog *wizard_dialog)
         return;
 
     /* Get page information, we'll need that when creating title */
-    pages = gtk_notebook_get_n_pages (notebook);
-    current = gtk_notebook_get_current_page (priv->notebook);
+    gint pages = gtk_notebook_get_n_pages (notebook);
+    if (pages == 0)
+      return;
+       
+    gint current = gtk_notebook_get_current_page (priv->notebook);
     if (current < 0)
         current = 0;
 
     /* the welcome title on the initial page */
+    /* This is the standard wizard title, with, e.g., 1/4 at the end,
+        * but the Modest UI spec does not want this. */
+       /*
     if (current == 0) {
         str = g_strdup_printf (_("ecdg_ti_wizard_welcome"), 
                 priv->wizard_name, pages);
     } else {
-        const gchar *steps = gtk_notebook_get_tab_label_text (notebook,
-                gtk_notebook_get_nth_page (notebook, current));
-
+    */
+       const gchar *steps = gtk_notebook_get_tab_label_text (notebook,
+               gtk_notebook_get_nth_page (notebook, current));
+                
+               /* This is the standard wizard title, with, e.g., 1/4 at the end,
+                * but the Modest UI spec does not want this.
+                */
+               /*
         str = g_strdup_printf (_("ecdg_ti_wizard_step"), 
                 priv->wizard_name, current + 1, pages, steps);
-    }
+        */
+
+        str = g_strdup_printf (_("%s: %s"), 
+                priv->wizard_name, steps);
+    /* } */
 
     /* Update the dialog to display the generated title */
     gtk_window_set_title (GTK_WINDOW (wizard_dialog), str);
@@ -481,7 +498,7 @@ create_title (ModestWizardDialog *wizard_dialog)
 /*
  * Response signal handler. This function is needed because GtkDialog's 
  * handler for this signal closes the dialog and we don't want that, we 
- * want to change pages and, dimm certain response buttons. Overriding the 
+ * want to change pages and, dim certain response buttons. Overriding the 
  * virtual function would not work because that would be called after the 
  * signal handler implemented by GtkDialog.
  * FIXME: There is a much saner way to do that [MDK]