X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-ui-actions.c;h=b640bde35bb5349deaf4ca6de6051920f49ffa46;hp=be1f87e8a13db838d5831aeed1e700345e9469c2;hb=dc8f7048af4418298076c46916cd993597e292b8;hpb=0caba6fbcbd5d6dfad79f9c640e23ebe1c9ff851 diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index be1f87e..b640bde 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -2683,16 +2683,17 @@ msgs_move_to_confirmation (GtkWindow *win, static void -tranasfer_msgs_from_viewer_cb (const GObject *object, gpointer user_data) +transfer_msgs_from_viewer_cb (const GObject *object, gpointer user_data) { ModestMsgViewWindow *self = NULL; - gboolean found = FALSE; g_return_if_fail (MODEST_IS_MSG_VIEW_WINDOW (object)); self = MODEST_MSG_VIEW_WINDOW (object); - found = modest_msg_view_window_select_first_message (self); - g_return_if_fail (found); + /* If there are not more messages don't do anything. The + viewer will show the same message */ + if (!modest_msg_view_window_select_first_message (self)) + return; } void @@ -2865,7 +2866,7 @@ modest_ui_actions_on_msg_view_window_move_to (GtkAction *action, headers, TNY_FOLDER (folder_store), TRUE, - tranasfer_msgs_from_viewer_cb, + transfer_msgs_from_viewer_cb, NULL); g_object_unref (G_OBJECT (mail_op)); }