* make modest_text_utils_get_display_date return a ptr to
[modest] / src / maemo / modest-main-window.c
index 73eed0f..999b4d3 100644 (file)
@@ -1659,7 +1659,7 @@ create_details_widget (GtkWidget *styled_widget, TnyAccount *account)
                TnyAccount *account = TNY_ACCOUNT(folder_store);
                
                time_t last_updated;
-               gchar *last_updated_string;
+               const gchar *last_updated_string;
                /* Get last updated from configuration */
                last_updated = modest_account_mgr_get_last_updated (modest_runtime_get_account_mgr (), 
                                                                    tny_account_get_id (account));
@@ -1674,7 +1674,6 @@ create_details_widget (GtkWidget *styled_widget, TnyAccount *account)
                label_w = gtk_label_new (NULL);
                gtk_label_set_markup (GTK_LABEL (label_w), label);
                gtk_box_pack_start (GTK_BOX (vbox), label_w, FALSE, FALSE, 0);
-               g_free (last_updated_string);
                g_free (label);
        }
 
@@ -2285,9 +2284,15 @@ static void
 refresh_account (const gchar *account_name)
 {
        ModestWindow *win;
-
-       win = MODEST_WINDOW (modest_window_mgr_get_main_window (modest_runtime_get_window_mgr ()));
-
+       
+       /* win must already exists here, obviously */ 
+       win = modest_window_mgr_get_main_window (modest_runtime_get_window_mgr (),
+                                                FALSE);
+       if (!win) {
+               g_warning ("%s: BUG: no main window!", __FUNCTION__);
+               return;
+       }
+       
        /* If account_name == NULL, we must update all (option All) */
        if (!account_name)
                modest_ui_actions_do_send_receive_all (win);
@@ -2388,6 +2393,9 @@ modest_main_window_on_folder_selection_changed (ModestFolderView *folder_view,
                                        show_clipboard = show_delete = show_cancel_send = TRUE;
                                        show_reply = show_forward = FALSE;
                                        break;
+                               case TNY_FOLDER_TYPE_INVALID:
+                                       g_warning ("%s: BUG: TNY_FOLDER_TYPE_INVALID", __FUNCTION__);
+                                       break;
                                default:
                                        show_reply = show_forward = show_clipboard = show_delete = TRUE;
                                        show_cancel_send = FALSE;