Remove scroll with arrows in gtk
[modest] / src / widgets / modest-msg-view-window.c
index 44886b6..d7e3872 100644 (file)
@@ -37,7 +37,7 @@
 #include "modest-marshal.h"
 #include "modest-platform.h"
 #include <modest-utils.h>
-#include <modest-maemo-utils.h>
+#include <modest-toolkit-utils.h>
 #include <modest-tny-msg.h>
 #include <modest-msg-view-window.h>
 #include "modest-msg-view-window-ui-dimming.h"
 #include <modest-account-protocol.h>
 #include <modest-icon-names.h>
 #include <modest-ui-actions.h>
-#include <modest-hildon2-window-mgr.h>
+#include <modest-window-mgr.h>
 #include <tny-camel-msg.h>
+#include <modest-icon-names.h>
+
+#ifdef MODEST_PLATFORM_MAEMO
+#include <modest-maemo-utils.h>
+#endif
 
 #define MYDOCS_ENV "MYDOCSDIR"
 #define DOCS_FOLDER ".documents"
@@ -282,8 +287,8 @@ modest_msg_view_window_get_type (void)
                        (GInstanceInitFunc) modest_msg_view_window_init,
                        NULL
                };
-#ifdef MODEST_TOOLKIT_GTK
-               my_type = g_type_register_static (MODEST_TYPE_WINDOW,
+#ifndef MODEST_TOOLKIT_HILDON2
+               my_type = g_type_register_static (MODEST_TYPE_SHELL_WINDOW,
                                                  "ModestMsgViewWindow",
                                                  &my_info, 0);
 #else
@@ -467,11 +472,6 @@ modest_msg_view_window_init (ModestMsgViewWindow *obj)
                g_error_free (error);
                error = NULL;
        }
-       /* ****** */
-
-       /* Add accelerators */
-       gtk_window_add_accel_group (GTK_WINDOW (obj), 
-                                   gtk_ui_manager_get_accel_group (parent_priv->ui_manager));
        
        priv->is_search_result = FALSE;
        priv->is_outbox = FALSE;
@@ -1599,7 +1599,7 @@ modest_msg_view_window_isearch_toolbar_search (GtkWidget *widget,
                                                     priv->last_search);
                if (!result) {
                        modest_platform_system_banner (NULL, NULL, 
-                                                       _HL("ckct_ib_find_no_matches"));
+                                                       _HL_IB_FIND_NO_MATCHES);
                        g_free (priv->last_search);
                        priv->last_search = NULL;
                } else {
@@ -1608,7 +1608,7 @@ modest_msg_view_window_isearch_toolbar_search (GtkWidget *widget,
        } else {
                if (!modest_isearch_view_search_next (MODEST_ISEARCH_VIEW (priv->msg_view))) {
                        modest_platform_system_banner (NULL, NULL, 
-                                                       _HL("ckct_ib_find_search_complete"));
+                                                       _HL_IB_FIND_COMPLETE);
                        g_free (priv->last_search);
                        priv->last_search = NULL;
                } else {
@@ -1677,7 +1677,7 @@ modest_msg_view_window_zoom_plus (ModestWindow *window)
 
        /* set zoom level */
        int_zoom = (gint) rint (zoom_level*100.0+0.1);
-       banner_text = g_strdup_printf (_HL("wdgt_ib_zoom"), int_zoom);
+       banner_text = g_strdup_printf (_HL_IB_ZOOM, int_zoom);
        modest_platform_information_banner (GTK_WIDGET (window), NULL, banner_text);
        g_free (banner_text);
        modest_zoomable_set_zoom (MODEST_ZOOMABLE (priv->msg_view), zoom_level);
@@ -1718,7 +1718,7 @@ modest_msg_view_window_zoom_minus (ModestWindow *window)
 
        /* set zoom level */
        int_zoom = (gint) rint (zoom_level*100.0+0.1);
-       banner_text = g_strdup_printf (_HL("wdgt_ib_zoom"), int_zoom);
+       banner_text = g_strdup_printf (_HL_IB_ZOOM, int_zoom);
        modest_platform_information_banner (GTK_WIDGET (window), NULL, banner_text);
        g_free (banner_text);
        modest_zoomable_set_zoom (MODEST_ZOOMABLE (priv->msg_view), zoom_level);
@@ -1892,6 +1892,7 @@ message_reader_performer (gboolean canceled,
        info = (MsgReaderInfo *) user_data;
        if (canceled || err) {
                update_window_title (MODEST_MSG_VIEW_WINDOW (parent_window));
+               modest_ui_actions_on_close_window (NULL, MODEST_WINDOW (parent_window));
                goto frees;
        }
 
@@ -2183,7 +2184,7 @@ view_msg_cb (ModestMailOperation *mail_op,
                if (self) {
                        priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (self);
                        /* First we check if the parent is a folder window */
-                       if (priv->msg_uid && !modest_hildon2_window_mgr_get_folder_window (MODEST_HILDON2_WINDOW_MGR (modest_runtime_get_window_mgr ()))) {
+                       if (priv->msg_uid && !modest_window_mgr_get_folder_window (MODEST_WINDOW_MGR (modest_runtime_get_window_mgr ()))) {
                                gboolean is_merge;
                                TnyAccount *account = NULL;
                                GtkWidget *header_window = NULL;
@@ -3217,7 +3218,7 @@ modest_msg_view_window_save_attachments (ModestMsgViewWindow *window,
                /* In Hildon 2.2 save and delete operate over all the attachments as there's no
                 * selection available */
                mime_parts = modest_msg_view_get_attachments (MODEST_MSG_VIEW (priv->msg_view));
-               if (mime_parts && !modest_maemo_utils_select_attachments (GTK_WINDOW (window), mime_parts, FALSE)) {
+               if (mime_parts && !modest_toolkit_utils_select_attachments (GTK_WINDOW (window), mime_parts, FALSE)) {
                        g_object_unref (mime_parts);
                        return;
                }
@@ -3372,7 +3373,7 @@ modest_msg_view_window_remove_attachments (ModestMsgViewWindow *window, gboolean
        g_object_unref (tmp);
        g_object_unref (iter);
 
-       if (!modest_maemo_utils_select_attachments (GTK_WINDOW (window), mime_parts, TRUE) ||
+       if (!modest_toolkit_utils_select_attachments (GTK_WINDOW (window), mime_parts, TRUE) ||
            tny_list_get_length (mime_parts) == 0) {
                g_object_unref (mime_parts);
                return;