* Fixes NB#61607, the renaming was not working because we're getting the wrong response from the dialog
pmo-trunk-r2450
transfer_folder_cb (TnyFolder *folder,
TnyFolderStore *into,
gboolean cancelled,
- TnyFolder *new_folder, GError **err,
+ TnyFolder *new_folder,
+ GError **err,
gpointer user_data)
{
ModestMailOperation *self = NULL;
/* Set the account back to not busy */
if (priv->account_name) {
- modest_account_mgr_set_account_busy(modest_runtime_get_account_mgr(), priv->account_name,
- FALSE);
+ modest_account_mgr_set_account_busy (modest_runtime_get_account_mgr(),
+ priv->account_name, FALSE);
g_free(priv->account_name);
priv->account_name = NULL;
}
response = modest_platform_run_rename_folder_dialog (GTK_WINDOW (main_window), NULL,
current_name, &folder_name);
- if (response == GTK_RESPONSE_OK && strlen (folder_name) > 0) {
+ if (response == GTK_RESPONSE_ACCEPT && strlen (folder_name) > 0) {
ModestMailOperation *mail_op;
mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_TYPE_INFO, G_OBJECT(main_window));
/* Ask the user */
message = g_strdup_printf (_("mcen_nc_delete_folder_text"),
tny_folder_get_name (TNY_FOLDER (folder)));
- response = modest_platform_run_confirmation_dialog (GTK_WINDOW (main_window),
+ response = modest_platform_run_confirmation_dialog (GTK_WINDOW (main_window),
(const gchar *) message);
g_free (message);
/* Notify that there is no folder selected */
g_signal_emit (G_OBJECT(self),
signals[FOLDER_SELECTION_CHANGED_SIGNAL], 0,
- NULL, TRUE);
+ NULL, FALSE);
+ if (priv->cur_folder_store) {
+ g_object_unref (priv->cur_folder_store);
+ priv->cur_folder_store = NULL;
+ }
/* FIXME: the local accounts are not shown when the query
selects only the subscribed folders. */
won't longer exist. We can not wait for the end of
the operation, because the operation won't start if
the folder is in use */
- if (source_widget == widget)
+ if (source_widget == widget) {
+ ModestFolderViewPrivate *priv;
+
+ priv = MODEST_FOLDER_VIEW_GET_PRIVATE (widget);
+ if (priv->cur_folder_store) {
+ g_object_unref (priv->cur_folder_store);
+ priv->cur_folder_store = NULL;
+ }
+
g_signal_emit (G_OBJECT (widget),
- signals[FOLDER_SELECTION_CHANGED_SIGNAL], 0, NULL, TRUE);
+ signals[FOLDER_SELECTION_CHANGED_SIGNAL], 0, NULL, FALSE);
+ }
}
/* Check if the get_data failed */