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));
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);
}
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);
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;