Fixes NB#131178, use logical id instead of semicolon in setup wizard to fix grammar...
[modest] / src / widgets / modest-wizard-dialog.c
index b8a141a..930090a 100644 (file)
@@ -283,10 +283,14 @@ init (ModestWizardDialog *wizard_dialog)
     priv->autotitle = TRUE;
 
     /* Build wizard layout */
-    gtk_box_pack_start_defaults (GTK_BOX (dialog->vbox), GTK_WIDGET (priv->box));
-    gtk_box_pack_start_defaults (GTK_BOX (priv->box), GTK_WIDGET (vbox));
-    if (priv->image)
-      gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (priv->image), FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (dialog->vbox), GTK_WIDGET (priv->box), TRUE, TRUE, 0);
+    gtk_box_pack_start (GTK_BOX (priv->box), GTK_WIDGET (vbox), FALSE, FALSE, 0);
+    gtk_widget_show (vbox);
+    gtk_widget_show (GTK_WIDGET (priv->box));
+    if (priv->image) {
+           gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (priv->image), TRUE, TRUE, 0);
+           gtk_widget_show (priv->image);
+    }
 
     /* Add response buttons: finish, previous, next, cancel */
 #ifdef MODEST_TOOLKIT_HILDON1
@@ -310,8 +314,7 @@ init (ModestWizardDialog *wizard_dialog)
     /* Set initial button states: previous and finish buttons are disabled */
     make_buttons_sensitive (wizard_dialog, FALSE, FALSE, TRUE);
 
-    /* Show all the internal widgets */
-    gtk_widget_show_all (GTK_WIDGET (dialog->vbox));
+    gtk_widget_show (GTK_WIDGET (dialog->vbox));
 
     /* connect to dialog's response signal */
     g_signal_connect (G_OBJECT (dialog), "response",
@@ -432,7 +435,7 @@ set_property (GObject      *object,
              * and remove borders) to make it look like a nice wizard widget */
             gtk_notebook_set_show_tabs (priv->notebook, FALSE);
             gtk_notebook_set_show_border (priv->notebook, FALSE);
-            gtk_box_pack_start_defaults (GTK_BOX( priv->box), GTK_WIDGET (priv->notebook));
+            gtk_box_pack_start (GTK_BOX( priv->box), GTK_WIDGET (priv->notebook), TRUE, TRUE, 0);
 
             /* Show the notebook so that a gtk_widget_show on the dialog is
              * all that is required to display the dialog correctly */
@@ -487,48 +490,33 @@ create_title (ModestWizardDialog *wizard_dialog)
     gchar *str = NULL;
     ModestWizardDialogPrivate *priv = NULL;
     GtkNotebook *notebook = NULL;
+    gint pages, current;
+    const gchar *steps;
 
     g_return_if_fail (MODEST_IS_WIZARD_DIALOG(wizard_dialog));
     g_return_if_fail (wizard_dialog->priv != NULL);
 
-    priv = wizard_dialog->priv;    
+    priv = wizard_dialog->priv;
     notebook = priv->notebook;
 
     if (!notebook)
         return;
 
     /* Get page information, we'll need that when creating title */
-    gint pages = gtk_notebook_get_n_pages (notebook);
+    pages = gtk_notebook_get_n_pages (notebook);
     if (pages == 0)
-      return;
-       
-    gint current = gtk_notebook_get_current_page (priv->notebook);
+           return;
+
+    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 (_HL("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));
-                
-               /* 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 (_HL("ecdg_ti_wizard_step"), 
-                priv->wizard_name, current + 1, pages, steps);
-        */
-
-        str = g_strdup_printf ((steps&&*steps)?_HL("%s: %s"):_HL("%s"), 
-                priv->wizard_name, steps);
-    /* } */
+           current = 0;
+
+    steps = gtk_notebook_get_tab_label_text (notebook,
+                                            gtk_notebook_get_nth_page (notebook, current));
+
+    str = g_strdup_printf ((steps&&*steps)?_HL("%s%s %s"):_HL("%s"),
+                          priv->wizard_name, _HL("ecdg_ti_caption_separator"),
+                          steps);
 
     /* Update the dialog to display the generated title */
     gtk_window_set_title (GTK_WINDOW (wizard_dialog), str);