build fixes for maemo
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Wed, 11 Apr 2007 12:00:44 +0000 (12:00 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Wed, 11 Apr 2007 12:00:44 +0000 (12:00 +0000)
pmo-trunk-r1546

src/modest-ui-actions.c

index 0870c32..f3a7176 100644 (file)
@@ -230,25 +230,23 @@ modest_ui_actions_on_add_to_contacts (GtkAction *action, ModestWindow *win)
 void
 modest_ui_actions_on_accounts (GtkAction *action, ModestWindow *win)
 {
-       GSList *account_names = modest_account_mgr_account_names (modest_runtime_get_account_mgr());
-                                                    
-       //gboolean accounts_exist = account_names != NULL;
-       g_slist_free (account_names);
        
        /* This is currently only implemented for Maemo,
         * because it requires a providers preset file which is not publically available.
         */
 #ifdef MODEST_PLATFORM_MAEMO /* Defined in config.h */
-       /* To test, while modest_account_mgr_account_names() is broken: accounts_exist = TRUE; */
+       GSList *account_names = modest_account_mgr_account_names (modest_runtime_get_account_mgr());
+       gboolean accounts_exist = account_names != NULL;
+       g_slist_free (account_names);
+       
+/* To test, while modest_account_mgr_account_names() is broken: accounts_exist = TRUE; */
        if (!accounts_exist) {
                /* If there are no accounts yet, just show the easy-setup wizard, as per the UI spec: */
                ModestEasysetupWizardDialog *wizard = modest_easysetup_wizard_dialog_new ();
                gtk_window_set_transient_for (GTK_WINDOW (wizard), GTK_WINDOW (win));
                gtk_dialog_run (GTK_DIALOG (wizard));
                gtk_widget_destroy (GTK_WIDGET (wizard));
-       }
-       else
-       {
+       } else  {
                /* Show the list of accounts: */
                GtkDialog *account_win = GTK_DIALOG(modest_account_view_window_new ());
                gtk_window_set_transient_for (GTK_WINDOW (account_win), GTK_WINDOW(win));
@@ -256,29 +254,29 @@ modest_ui_actions_on_accounts (GtkAction *action, ModestWindow *win)
                gtk_widget_destroy (GTK_WIDGET(account_win));
        }
 #else
-   GtkWidget *dialog, *label;
-   
-   /* Create the widgets */
-   
-   dialog = gtk_dialog_new_with_buttons ("Message",
-                                         GTK_WINDOW(win),
-                                         GTK_DIALOG_DESTROY_WITH_PARENT,
-                                         GTK_STOCK_OK,
-                                         GTK_RESPONSE_NONE,
-                                         NULL);
-   label = gtk_label_new ("Hello World!");
-   
-   /* Ensure that the dialog box is destroyed when the user responds. */
-   
-   g_signal_connect_swapped (dialog, "response", 
-                             G_CALLBACK (gtk_widget_destroy),
-                             dialog);
-
-   /* Add the label, and show everything we've added to the dialog. */
-
-   gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),
-                      label);
-   gtk_widget_show_all (dialog);
+       GtkWidget *dialog, *label;
+       
+       /* Create the widgets */
+       
+       dialog = gtk_dialog_new_with_buttons ("Message",
+                                             GTK_WINDOW(win),
+                                             GTK_DIALOG_DESTROY_WITH_PARENT,
+                                             GTK_STOCK_OK,
+                                             GTK_RESPONSE_NONE,
+                                             NULL);
+       label = gtk_label_new ("Hello World!");
+       
+       /* Ensure that the dialog box is destroyed when the user responds. */
+       
+       g_signal_connect_swapped (dialog, "response", 
+                                 G_CALLBACK (gtk_widget_destroy),
+                                 dialog);
+       
+       /* Add the label, and show everything we've added to the dialog. */
+       
+       gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),
+                          label);
+       gtk_widget_show_all (dialog);
 #endif /* MODEST_PLATFORM_MAEMO */
 }