* Fixes NB#90182, let message view grab focus after closing the find toolbar
[modest] / src / maemo / modest-msg-view-window.c
index cc58ece..34778ba 100644 (file)
@@ -1425,6 +1425,7 @@ modest_msg_view_window_toggle_find_toolbar (GtkToggleAction *toggle,
                hildon_find_toolbar_highlight_entry (HILDON_FIND_TOOLBAR (priv->find_toolbar), TRUE);
        } else {
                gtk_widget_hide (priv->find_toolbar);
+               modest_msg_view_grab_focus (MODEST_MSG_VIEW (priv->msg_view));
        }
 
        /* update the toggle buttons status */
@@ -2389,7 +2390,7 @@ on_mail_operation_started (ModestMailOperation *mail_op,
        tmp = priv->progress_widgets;
        source = modest_mail_operation_get_source(mail_op);
        if (G_OBJECT (self) == source) {
-               if (op_type == MODEST_MAIL_OPERATION_TYPE_RECEIVE || op_type == MODEST_MAIL_OPERATION_TYPE_OPEN ) {
+               if (op_type == MODEST_MAIL_OPERATION_TYPE_RECEIVE ) {
                        set_toolbar_transfer_mode(self);
                        while (tmp) {
                                modest_progress_object_add_operation (
@@ -2416,7 +2417,7 @@ on_mail_operation_finished (ModestMailOperation *mail_op,
        op_type = modest_mail_operation_get_type_operation (mail_op);
        tmp = priv->progress_widgets;
        
-       if (op_type == MODEST_MAIL_OPERATION_TYPE_RECEIVE || op_type == MODEST_MAIL_OPERATION_TYPE_OPEN ) {
+       if (op_type == MODEST_MAIL_OPERATION_TYPE_RECEIVE ) {
                while (tmp) {
                        modest_progress_object_remove_operation (MODEST_PROGRESS_OBJECT (tmp->data),
                                                                 mail_op);
@@ -2653,7 +2654,7 @@ modest_msg_view_window_view_attachment (ModestMsgViewWindow *window,
                        msg_win = modest_msg_view_window_new_for_attachment (TNY_MSG (mime_part), account, attachment_uid);
                        modest_window_set_zoom (MODEST_WINDOW (msg_win), 
                                                modest_window_get_zoom (MODEST_WINDOW (window)));
-                       modest_window_mgr_register_window (mgr, msg_win);
+                       modest_window_mgr_register_window (mgr, msg_win, MODEST_WINDOW (window));
                        gtk_widget_show_all (GTK_WIDGET (msg_win));
                }
        }