gpointer user_data)
{
ModestMainWindow *win = MODEST_MAIN_WINDOW (user_data);
-
- /* We need to refresh the details widget because it could have changed */
- if (modest_main_window_get_contents_style(win) == MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS) {
- modest_main_window_set_contents_style (win, MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS);
- }
- /* Update the menus as well, the account name could be
- changed. Transport accounts and local ones (MMC and the
- Local folders account do now cause menu changes */
- if (TNY_IS_STORE_ACCOUNT (account) &&
- modest_tny_folder_store_is_remote (TNY_FOLDER_STORE (account)))
- update_menus (MODEST_MAIN_WINDOW (user_data));
+ /* Transport accounts and local ones (MMC and the Local
+ folders account do now cause menu changes */
+ if (TNY_IS_STORE_ACCOUNT (account)) {
+ /* We need to refresh the details widget because it could have changed */
+ if (modest_main_window_get_contents_style(win) == MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS)
+ modest_main_window_set_contents_style (win, MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS);
+
+ /* Update the menus as well, name could change */
+ if (modest_tny_folder_store_is_remote (TNY_FOLDER_STORE (account)))
+ update_menus (MODEST_MAIN_WINDOW (user_data));
+ }
}
/*
helper->last_total_bytes = 0;
helper->sum_total_bytes = 0;
helper->total_bytes = tny_header_get_message_size (header);
+ helper->more_msgs = NULL;
modest_mail_operation_notify_start (self);
{
ModestFolderView *folder_view;
+ /* If the window was closed when renaming a folder this could
+ happen */
+ if (MODEST_IS_FOLDER_VIEW (user_data))
+ return;
+
folder_view = MODEST_FOLDER_VIEW (user_data);
/* Note that if the rename fails new_folder will be NULL */
if (new_folder) {
{
ModestFolderViewPrivate *priv;
GtkTreeModel *sort_model, *filter_model;
+ GtkTreeSelection *sel;
/* Ignore transport account insertions, we're not showing them
in the folder view */
return;
}
+ /* Unselect the folder, clear the header list */
+ sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (user_data));
+ gtk_tree_selection_unselect_all (sel);
+
/* Remove the account from the model */
tny_list_remove (TNY_LIST (gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (sort_model))),
G_OBJECT (tny_account));
priv->folder_to_select = g_object_ref (instance);
}
g_object_unref (instance);
-
if (priv->folder_to_select) {
gtk_tree_selection_select_iter (sel, iter);
gtk_tree_view_set_cursor (GTK_TREE_VIEW(self), path, NULL, FALSE);
- gtk_tree_path_free (path);
-
+ gtk_tree_path_free (path);
}
/* Disable next */