* Several fixes for the GNOME version
authorSergio Villar Senin <svillar@igalia.com>
Thu, 24 Apr 2008 12:52:59 +0000 (12:52 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Thu, 24 Apr 2008 12:52:59 +0000 (12:52 +0000)
pmo-trunk-r4457

src/gnome/modest-account-settings-dialog.c
src/gnome/modest-main-window.c
src/gnome/modest-msg-edit-window.c
src/gnome/ui/modest-main-window-ui.xml
src/modest-dimming-rules-group.c
src/widgets/modest-progress-bar.h

index c234fff..4717b1b 100644 (file)
@@ -1615,7 +1615,7 @@ modest_account_settings_dialog_check_allow_changes (ModestAccountSettingsDialog
                return;
 
        incoming_settings = modest_account_settings_get_store_settings (self->settings);
-       server_account_name = modest_server_account_settings_get_account_name (incomming_settings);
+       server_account_name = modest_server_account_settings_get_account_name (incoming_settings);
 
        username_known = modest_account_mgr_get_server_account_username_has_succeeded (self->account_manager, 
                                                                                       server_account_name);
index 1174933..e38e983 100644 (file)
@@ -124,6 +124,32 @@ struct _ModestMainWindowPrivate {
 /* globals */
 static GtkWindowClass *parent_class = NULL;
 
+static const GtkActionEntry modest_folder_view_action_entries [] = {
+
+       /* Folder View CSM actions */
+       { "FolderViewCSMNewFolder", NULL, N_("mcen_ti_new_folder"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_new_folder) },
+       { "FolderViewCSMRenameFolder", NULL, N_("mcen_me_user_renamefolder"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_rename_folder) },
+       { "FolderViewCSMPasteMsgs", NULL, N_("mcen_me_inbox_paste"), NULL, NULL,  G_CALLBACK (modest_ui_actions_on_paste)},
+       { "FolderViewCSMDeleteFolder", NULL, N_("mcen_me_inbox_delete"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_delete_folder) },
+       { "FolderViewCSMSearchMessages", NULL, N_("mcen_me_inbox_search"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_search_messages) },
+       { "FolderViewCSMHelp", NULL, N_("mcen_me_inbox_help"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_help) },
+};
+
+static const GtkActionEntry modest_header_view_action_entries [] = {
+
+       /* Header View CSM actions */
+       { "HeaderViewCSMOpen",          NULL,  N_("mcen_me_inbox_open"),        NULL,       NULL, G_CALLBACK (modest_ui_actions_on_open) },
+       { "HeaderViewCSMReply",         NULL,  N_("mcen_me_inbox_reply"),       NULL,      NULL, G_CALLBACK (modest_ui_actions_on_reply) },
+       { "HeaderViewCSMReplyAll",      NULL,  N_("mcen_me_inbox_replytoall"),  NULL,      NULL, G_CALLBACK (modest_ui_actions_on_reply_all) },
+       { "HeaderViewCSMForward",       NULL,  N_("mcen_me_inbox_forward"),     NULL,      NULL, G_CALLBACK (modest_ui_actions_on_forward) },
+       { "HeaderViewCSMCut",           NULL,  N_("mcen_me_inbox_cut"),         "<CTRL>X", NULL, G_CALLBACK (modest_ui_actions_on_cut) },
+       { "HeaderViewCSMCopy",          NULL,  N_("mcen_me_inbox_copy"),        "<CTRL>C", NULL, G_CALLBACK (modest_ui_actions_on_copy) },
+       { "HeaderViewCSMPaste",         NULL,  N_("mcen_me_inbox_paste"),       "<CTRL>V", NULL, G_CALLBACK (modest_ui_actions_on_paste) },
+       { "HeaderViewCSMDelete",        NULL,  N_("mcen_me_inbox_delete"),      NULL,      NULL, G_CALLBACK (modest_ui_actions_on_delete_message) },
+       { "HeaderViewCSMCancelSending", NULL,  N_("mcen_me_outbox_cancelsend"), NULL,      NULL, G_CALLBACK (modest_ui_actions_cancel_send) },
+       { "HeaderViewCSMHelp",          NULL,  N_("mcen_me_inbox_help"),        NULL,      NULL, G_CALLBACK (modest_ui_actions_on_help) },
+};
+
 static const GtkToggleActionEntry modest_main_window_toggle_action_entries [] = {
        { "ToggleFolders",     MODEST_STOCK_SPLIT_VIEW, N_("mcen_me_inbox_hidefolders"), "<CTRL>t", NULL, G_CALLBACK (modest_ui_actions_toggle_folders_view), TRUE },
 };
@@ -181,11 +207,6 @@ create_main_bar (GtkWidget *progress_bar)
         status_bar = gtk_statusbar_new ();
         gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (status_bar), FALSE);
 
-        /* Progress bar */
-        gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar), 1.0);
-        gtk_progress_bar_set_ellipsize (GTK_PROGRESS_BAR (progress_bar),
-                                        PANGO_ELLIPSIZE_END);
-
         /* Pack */
         gtk_box_pack_start (GTK_BOX (main_bar), status_bar, TRUE, TRUE, 0);
         gtk_box_pack_start (GTK_BOX (main_bar), progress_bar, FALSE, FALSE, 0);
@@ -489,6 +510,17 @@ modest_main_window_new (void)
                                      modest_action_entries,
                                      G_N_ELEMENTS (modest_action_entries),
                                      obj);
+
+       gtk_action_group_add_actions (action_group,
+                                     modest_header_view_action_entries,
+                                     G_N_ELEMENTS (modest_header_view_action_entries),
+                                     self);
+
+       gtk_action_group_add_actions (action_group,
+                                     modest_folder_view_action_entries,
+                                     G_N_ELEMENTS (modest_folder_view_action_entries),
+                                     self);
+
        gtk_action_group_add_toggle_actions (action_group,
                                             modest_toggle_action_entries,
                                             G_N_ELEMENTS (modest_toggle_action_entries),
index 0f3a7d2..19b2dce 100644 (file)
@@ -1049,14 +1049,16 @@ modest_msg_edit_window_offer_attach_file           (ModestMsgEditWindow *window)
 
        for (uri_node = uris; uri_node != NULL; uri_node = g_slist_next (uri_node)) {
                const gchar *uri = (const gchar *) uri_node->data;
-               modest_msg_edit_window_attach_file_one (window, uri);
+               modest_msg_edit_window_attach_file_one (window, uri, MODEST_MAX_ATTACHMENT_SIZE);
        }
        g_slist_foreach (uris, (GFunc) g_free, NULL);
        g_slist_free (uris);
 }
 
-void                    
-modest_msg_edit_window_attach_file_one           (ModestMsgEditWindow *window, const gchar *uri)
+GnomeVFSFileSize
+modest_msg_edit_window_attach_file_one (ModestMsgEditWindow *window, 
+                                       const gchar *uri,
+                                       GnomeVFSFileSize allowed_size)
 {
        GnomeVFSHandle *handle = NULL;
        ModestMsgEditWindowPrivate *priv;
index 62368ad..234430d 100644 (file)
 <!--     <toolitem name="ToggleView" action="ToggleView"/> -->
   </toolbar>
 
-  <popup name="HeaderViewContextMenu">
-    <menuitem action="ActionsReply"/>
-    <menuitem action="ActionsForward"/>
+  <popup name="HeaderViewCSM">
+    <menuitem action="HeaderViewCSMReply"/>
+    <menuitem action="HeaderViewCSMReplyAll"/>
+    <menuitem action="HeaderViewCSMForward"/>
+    <menuitem action="HeaderViewCSMCancelSending"/>
+    <separator/>
+    <menuitem action="HeaderViewCSMDelete"/>
+    <menuitem action="HeaderViewCSMHelp"/>
   </popup>
 
-  <popup name="FolderViewContextMenu">
-    <menuitem action="ActionsFolderNew"/>
-    <menuitem action="ActionsFolderDelete"/>
-    <menuitem action="ActionsFolderRename"/>
-    <menuitem action="ActionsFolderMoveToTrash"/>
+  <popup name="FolderViewCSM">
+    <menuitem action="FolderViewCSMNewFolder"/>
+    <menuitem action="FolderViewCSMRenameFolder"/>
+    <menuitem action="FolderViewCSMDeleteFolder"/>
+    <separator/>
+    <separator/>
+    <separator/>
+    <menuitem action="FolderViewCSMSearchMessages"/>
+    <menuitem action="FolderViewCSMHelp"/>
   </popup>
 
 </ui>
index a7459e3..9f74837 100644 (file)
@@ -37,7 +37,9 @@ static void modest_dimming_rules_group_class_init (ModestDimmingRulesGroupClass
 static void modest_dimming_rules_group_init       (ModestDimmingRulesGroup *obj);
 static void modest_dimming_rules_group_finalize   (GObject *obj);
 
+#ifdef MODEST_PLATFORM_MAEMO
 static void _insensitive_press_callback (GtkWidget *widget, gpointer user_data);
+#endif
 
 static void _add_rule (ModestDimmingRulesGroup *self,
                       ModestDimmingRule *rule,
@@ -62,9 +64,6 @@ static GObjectClass *parent_class = NULL;
 
 static void _execute_dimming_rule (gpointer key, gpointer value, gpointer user_data);
 static void _execute_widget_dimming_rule (gpointer data, gpointer user_data);
-static void _insensitive_press_callback (GtkWidget *widget, gpointer user_data);
-
-
 
 GType
 modest_dimming_rules_group_get_type (void)
@@ -189,11 +188,12 @@ _add_rule (ModestDimmingRulesGroup *self,
        priv->window = MODEST_WINDOW (window);
 
        widget = modest_dimming_rule_get_widget (rule);
+#ifdef MODEST_PLATFORM_MAEMO
        /* Connect insensitive-presss handler to show notifications */
        g_signal_connect (G_OBJECT (widget), "insensitive-press", 
                          G_CALLBACK (_insensitive_press_callback), 
                          rule);
-
+#endif
        /* Register new dimming rule */         
        modest_dimming_rule_set_group (rule, self);
        action_path = modest_dimming_rule_get_action_path (rule);
@@ -327,6 +327,7 @@ _execute_widget_dimming_rule (gpointer data, gpointer user_data)
        modest_dimming_rule_process (MODEST_DIMMING_RULE(data));
 }
 
+#ifdef MODEST_PLATFORM_MAEMO
 static void
 _insensitive_press_callback (GtkWidget *widget, gpointer user_data)
 {
@@ -357,3 +358,4 @@ _insensitive_press_callback (GtkWidget *widget, gpointer user_data)
        if (notification != NULL)
                g_free(notification);
 }
+#endif
index fb124d8..0bf5ad6 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -80,176 +80,4 @@ modest_progress_bar_set_undetermined_progress (ModestProgressBar *self,
 
 
 G_END_DECLS
-
-#endif /* __MODEST_PROGRESS_BAR_H__ */
-
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __MODEST_PROGRESS_BAR_H__
-#define __MODEST_PROGRESS_BAR_H__
-
-#include <gtk/gtkvbox.h>
-#include "modest-progress-object.h"
-
-G_BEGIN_DECLS
-
-/* convenience macros */
-#define MODEST_TYPE_PROGRESS_BAR_WIDGET             (modest_progress_bar_get_type())
-#define MODEST_PROGRESS_BAR(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_PROGRESS_BAR_WIDGET,ModestProgressBar))
-#define MODEST_PROGRESS_BAR_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_PROGRESS_BAR_WIDGET,GtkContainer))
-#define MODEST_IS_PROGRESS_BAR_WIDGET(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_PROGRESS_BAR_WIDGET))
-#define MODEST_IS_PROGRESS_BAR_WIDGET_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_PROGRESS_BAR_WIDGET))
-#define MODEST_PROGRESS_BAR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_PROGRESS_BAR_WIDGET,ModestProgressBarClass))
-
-typedef struct _ModestProgressBar      ModestProgressBar;
-typedef struct _ModestProgressBarClass ModestProgressBarClass;
-
-struct _ModestProgressBar {
-        GtkVBox parent;
-       /* insert public members, if any */
-};
-
-struct _ModestProgressBarClass {
-       GtkVBoxClass parent_class;
-
-};
-
-typedef enum {
-       STATUS_RECEIVING,
-       STATUS_SENDING,
-       STATUS_OPENING
-} ModestProgressStatus;
-
-
-
-/* member functions */
-GType        modest_progress_bar_get_type    (void) G_GNUC_CONST;
-
-GtkWidget*   modest_progress_bar_new         (void);
-
-void modest_progress_bar_set_progress (ModestProgressBar *self,
-                                             const gchar *msg, 
-                                             gint done,
-                                             gint total);
-
-void
-modest_progress_bar_set_undetermined_progress (ModestProgressBar *self,
-                                              ModestMailOperation *mail_op);
-
-
-G_END_DECLS
-
-#endif /* __MODEST_PROGRESS_BAR_H__ */
-
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __MODEST_PROGRESS_BAR_H__
-#define __MODEST_PROGRESS_BAR_H__
-
-#include <gtk/gtkvbox.h>
-#include "modest-progress-object.h"
-
-G_BEGIN_DECLS
-
-/* convenience macros */
-#define MODEST_TYPE_PROGRESS_BAR_WIDGET             (modest_progress_bar_get_type())
-#define MODEST_PROGRESS_BAR(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_PROGRESS_BAR_WIDGET,ModestProgressBar))
-#define MODEST_PROGRESS_BAR_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_PROGRESS_BAR_WIDGET,GtkContainer))
-#define MODEST_IS_PROGRESS_BAR_WIDGET(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_PROGRESS_BAR_WIDGET))
-#define MODEST_IS_PROGRESS_BAR_WIDGET_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_PROGRESS_BAR_WIDGET))
-#define MODEST_PROGRESS_BAR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_PROGRESS_BAR_WIDGET,ModestProgressBarClass))
-
-typedef struct _ModestProgressBar      ModestProgressBar;
-typedef struct _ModestProgressBarClass ModestProgressBarClass;
-
-struct _ModestProgressBar {
-        GtkVBox parent;
-       /* insert public members, if any */
-};
-
-struct _ModestProgressBarClass {
-       GtkVBoxClass parent_class;
-
-};
-
-typedef enum {
-       STATUS_RECEIVING,
-       STATUS_SENDING,
-       STATUS_OPENING
-} ModestProgressStatus;
-
-
-
-/* member functions */
-GType        modest_progress_bar_get_type    (void) G_GNUC_CONST;
-
-GtkWidget*   modest_progress_bar_new         (void);
-
-void modest_progress_bar_set_progress (ModestProgressBar *self,
-                                             const gchar *msg, 
-                                             gint done,
-                                             gint total);
-
-void
-modest_progress_bar_set_undetermined_progress (ModestProgressBar *self,
-                                              ModestMailOperation *mail_op);
-
-
-G_END_DECLS
-
-#endif /* __MODEST_PROGRESS_BAR_H__ */
-
+#endif