static gboolean
idle_notify_progress (gpointer data)
{
- gdk_threads_enter ();
-
ModestMailOperation *mail_op = MODEST_MAIL_OPERATION (data);
ModestMailOperationState *state;
g_signal_emit (G_OBJECT (mail_op), signals[PROGRESS_CHANGED_SIGNAL], 0, state, NULL);
g_slice_free (ModestMailOperationState, state);
- gdk_threads_leave ();
-
return TRUE;
}
static gboolean
idle_notify_progress_once (gpointer data)
{
- gdk_threads_enter ();
-
ModestPair *pair;
pair = (ModestPair *) data;
g_slice_free (ModestMailOperationState, (ModestMailOperationState*)pair->second);
g_object_unref (pair->first);
- gdk_threads_leave ();
-
return FALSE;
}
Gtk+. We use a timeout in order to provide more status
information, because the sync tinymail call does not
provide it for the moment */
- gint timeout = g_timeout_add (250, idle_notify_progress, info->mail_op);
+ gint timeout = g_timeout_add (100, idle_notify_progress, info->mail_op);
/* Refresh folders */
new_headers = g_ptr_array_new ();
gboolean delete_original)
{
ModestMailOperationPrivate *priv = NULL;
- ModestTnyFolderRules parent_rules, rules;
+ ModestTnyFolderRules parent_rules = 0, rules;
g_return_if_fail (MODEST_IS_MAIL_OPERATION (self));
g_return_if_fail (TNY_IS_FOLDER (folder));
/* The moveable restriction is applied also to copy operation */
if ((!TNY_IS_FOLDER_STORE (parent)) || (rules & MODEST_FOLDER_RULES_FOLDER_NON_MOVEABLE)) {
+ printf("DEBUG: %s: Not allowing the move.\n", __FUNCTION__);
/* Set status failed and set an error */
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR,
priv->status = MODEST_MAIL_OPERATION_STATUS_SUCCESS;
}
+ /* Notify about operation end */
+ modest_mail_operation_notify_end (self, TRUE);
+
/* If user defined callback function was defined, call it */
if (helper->user_callback) {
gdk_threads_enter ();
g_slice_free (XFerMsgAsyncHelper, helper);
g_object_unref (folder);
- /* Notify about operation end */
- modest_mail_operation_notify_end (self, TRUE);
}
void