* update toolbars/menus for Maemo:
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 6 Feb 2007 14:11:22 +0000 (14:11 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 6 Feb 2007 14:11:22 +0000 (14:11 +0000)
  - make modest-main-window-ui frontend-specific, they are very different
  - implement maemo-style menus

pmo-trunk-r791

src/gtk/Makefile.am
src/gtk/modest-main-window-ui.h [new file with mode: 0644]
src/maemo/Makefile.am
src/maemo/modest-main-window-ui.h [new file with mode: 0644]
src/maemo/modest-main-window.c
src/maemo/ui/modest-ui.xml
src/widgets/Makefile.am
src/widgets/modest-main-window-ui.h [deleted file]

index 50edf4e..1348e0e 100644 (file)
@@ -32,6 +32,7 @@ libmodest_ui_la_SOURCES=              \
        modest-edit-msg-window.c      \
        modest-icon-names.h           \
        modest-main-window.c          \
+       modest-main-window-ui.h       \
        modest-store-widget.c         \
        modest-store-widget.h         \
        modest-transport-widget.c     \
diff --git a/src/gtk/modest-main-window-ui.h b/src/gtk/modest-main-window-ui.h
new file mode 100644 (file)
index 0000000..de1e4cb
--- /dev/null
@@ -0,0 +1,98 @@
+/* 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_MAIN_WINDOW_UI_PRIV_H__
+#define __MODEST_MAIN_WINDOW_UI_PRIV_H__
+
+#include <glib/gi18n.h>
+#include "modest-icon-names.h"
+#include "modest-ui-actions.h"
+
+G_BEGIN_DECLS
+
+
+/* Action entries */
+static const GtkActionEntry modest_action_entries [] = {
+
+       /* Toplevel menus */
+       { "File", NULL, N_("_File") },
+       { "Edit", NULL, N_("_Edit") },
+       { "Actions", NULL, N_("_Actions") },
+       { "Options", NULL, N_("_Options") },
+       { "Help", NULL, N_("_Help") },
+
+       /* FILE */
+       { "FileNew",    GTK_STOCK_NEW,     N_("_New"),     "<CTRL>N", N_("Compose new message"),  G_CALLBACK (_modest_ui_actions_on_new_msg) },
+       { "FileOpen",   GTK_STOCK_OPEN,    N_("_Open"),    "<CTRL>O", N_("Open a message"),       NULL },
+       { "FileSave",   GTK_STOCK_SAVE,    N_("_Save"),    "<CTRL>S", N_("Save a message"),       NULL },
+       { "FileSaveAs", GTK_STOCK_SAVE_AS, N_("Save _As"), NULL,      N_("Save a message as"),    NULL },
+       { "FileQuit",   GTK_STOCK_QUIT,    N_("_Quit"),    "<CTRL>Q", N_("Exit the application"), G_CALLBACK (_modest_ui_actions_on_quit) },
+
+       /* EDIT */
+       { "EditUndo",        GTK_STOCK_UNDO,   N_("_Undo"), "<CTRL>Z",        N_("Undo last action"),  NULL },
+       { "EditRedo",        GTK_STOCK_REDO,   N_("_Redo"), "<shift><CTRL>Z", N_("Redo previous action"),  NULL },
+       { "EditCut",         GTK_STOCK_CUT,    N_("Cut"),   "<CTRL>X",        N_("_Cut"), NULL   },
+       { "EditCopy",        GTK_STOCK_COPY,   N_("Copy"),  "<CTRL>C",        N_("Copy"), NULL },
+       { "EditPaste",       GTK_STOCK_PASTE,  N_("Paste"), "<CTRL>V",        N_("Paste"), NULL },
+       { "EditDelete",      GTK_STOCK_DELETE, N_("_Delete"),      "<CTRL>Q",         N_("Delete"), NULL },
+       { "EditSelectAll",   NULL,             N_("Select all"),   "<CTRL>A",         N_("Select all"), NULL },
+       { "EditDeselectAll", NULL,             N_("Deselect all"), "<Shift><CTRL>A",  N_("Deselect all"), NULL },
+
+       /* VIEW */
+       { "ToggleView",        GTK_STOCK_CDROM,   N_("_Toggle view"), NULL,        N_("Toggle the list view"),  G_CALLBACK(_modest_ui_actions_toggle_view) },
+       
+       /* ACTIONS */
+       { "ActionsNew",         MODEST_STOCK_NEW_MAIL, N_("_New Message"),   NULL, N_("Compose a new message"), G_CALLBACK (_modest_ui_actions_on_new_msg) },
+       { "ActionsReply",       MODEST_STOCK_REPLY, N_("_Reply"),         NULL, N_("Reply to a message"), G_CALLBACK (_modest_ui_actions_on_reply) },
+       { "ActionsReplyAll",    MODEST_STOCK_REPLY_ALL, N_("Reply to all"),   NULL, N_("Reply to all"), G_CALLBACK (_modest_ui_actions_on_reply_all) },
+       { "ActionsForward",     MODEST_STOCK_FORWARD, N_("_Forward"),       NULL, N_("Forward a message"), G_CALLBACK (_modest_ui_actions_on_forward) },
+       { "ActionsBounce",      NULL, N_("_Bounce"),        NULL, N_("Bounce a message"),          NULL },
+       { "ActionsSendReceive", MODEST_STOCK_SEND_RECEIVE, N_("Send/Receive"),   NULL, N_("Send and receive messages"), NULL },
+       { "ActionsDelete",      MODEST_STOCK_DELETE, N_("Delete message"), NULL, N_("Delete messages"), G_CALLBACK (_modest_ui_actions_on_delete) },
+       { "ActionsFolderNew",   NULL, N_("New Folder"),   NULL, N_("Create a new folder"), G_CALLBACK (_modest_ui_actions_on_new_folder) },
+       { "ActionsFolderDelete",   NULL, N_("Delete Folder"),   NULL, N_("Delete the folder"), G_CALLBACK (_modest_ui_actions_on_delete_folder) },
+       { "ActionsFolderRename",   NULL, N_("Rename Folder"),   NULL, N_("Rename the folder"), G_CALLBACK (_modest_ui_actions_on_rename_folder) },
+       { "ActionsFolderMoveToTrash",   NULL, N_("Move Folder to Trash"),   NULL, N_("Move folder to Trash"), G_CALLBACK (_modest_ui_actions_on_move_to_trash_folder) },
+
+
+       /* GOTO */
+       { "GotoPrevious", MODEST_STOCK_PREV, N_("Previous"), NULL, N_("Go to previous message"), NULL },
+       { "GotoNext",     MODEST_STOCK_NEXT, N_("Next"),     NULL, N_("Go to next message"), G_CALLBACK (_modest_ui_actions_on_next) },
+
+       /* OPTIONS */
+       { "OptionsAccounts",  NULL, N_("_Accounts"), NULL, N_("Manage accounts"), G_CALLBACK (_modest_ui_actions_on_accounts) },
+       { "OptionsContacts",  NULL, N_("_Contacts"), NULL, N_("Manage contacts"), NULL },
+
+       /* HELP */
+       { "HelpAbout", GTK_STOCK_ABOUT, N_("About"), NULL, N_("About Modest"), G_CALLBACK (_modest_ui_actions_on_about) },
+};
+
+
+G_END_DECLS
+#endif /* __MODEST_MAIN_WINDOW_UI_PRIV_H__ */
index 8517111..d9dc019 100644 (file)
@@ -47,6 +47,7 @@ libmodest_ui_la_SOURCES=              \
        modest-edit-msg-window.c      \
        modest-icon-names.h           \
        modest-main-window.c          \
+       modest-main-window-ui.h       \
        modest-store-widget.c         \
        modest-store-widget.h         \
        modest-transport-widget.c     \
diff --git a/src/maemo/modest-main-window-ui.h b/src/maemo/modest-main-window-ui.h
new file mode 100644 (file)
index 0000000..fd3c7c6
--- /dev/null
@@ -0,0 +1,126 @@
+/* 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_MAIN_WINDOW_UI_PRIV_H__
+#define __MODEST_MAIN_WINDOW_UI_PRIV_H__
+
+#include <glib/gi18n.h>
+#include "modest-icon-names.h"
+#include "modest-ui-actions.h"
+
+G_BEGIN_DECLS
+
+
+/* Action entries */
+static const GtkActionEntry modest_action_entries [] = {
+
+       /* Toplevel menus */
+       { "Message", NULL, N_("Message") },
+       { "Edit",    NULL, N_("Edit") },
+       { "View",    NULL, N_("View") },
+       { "Folders", NULL, N_("Folders") },
+       { "Accounts",NULL, N_("Accounts") },
+       { "Tools",   NULL, N_("Tools") },
+       { "Close",   NULL, N_("Close") },
+
+       /* Message */
+       { "MessageNew",         NULL,  N_("_New message"),      "<CTRL>N", NULL,   G_CALLBACK (_modest_ui_actions_on_new_msg) },
+       { "MessageOpen",        NULL,  N_("_Open"),             "<CTRL>O", NULL,   NULL },
+       { "MessageCancelSending",  NULL,  N_("Cancel sending"), NULL,      NULL,   NULL },
+       { "MessageSend",        NULL,  N_("Send"),              NULL,      NULL,   NULL },
+       { "MessageReply",       NULL,  N_("_Reply"),            NULL,      NULL,   G_CALLBACK (_modest_ui_actions_on_reply) },
+       { "MessageReplyAll",    NULL,  N_("Reply to all"),      NULL,      NULL,   G_CALLBACK (_modest_ui_actions_on_reply_all) },
+       { "MessageForward",     NULL,  N_("_Forward"),          NULL,      NULL,   G_CALLBACK (_modest_ui_actions_on_forward) },
+       { "MessageDelete",      NULL,  N_("Delete message"),    NULL,      NULL,   G_CALLBACK (_modest_ui_actions_on_delete) },
+       { "MessageSendReceive", NULL,  N_("Send and receive"),  NULL,      NULL,   NULL },
+       { "MessageContents",    NULL,  N_("Retrieve contents"), NULL,      NULL,   NULL },
+       { "MessageDetails",     NULL,  N_("Details..."),        NULL,      NULL,   NULL },
+       
+
+       /* Edit */
+       { "EditUndo",        NULL,      N_("_Undo"),        "<CTRL>Z",    NULL, NULL },
+       { "EditCut",         NULL,      N_("Cut"),          "<CTRL>X",    NULL, NULL },
+       { "EditCopy",        NULL,      N_("Copy"),         "<CTRL>C",    NULL, NULL },
+       { "EditPaste",       NULL,      N_("Paste"),        "<CTRL>V",    NULL, NULL },
+       { "EditDelete",      NULL,      N_("_Delete"),       NULL,        NULL, NULL },
+       { "EditSelect",      NULL,      N_("Select..."),     NULL,        NULL, NULL },   /* submenu */
+       { "EditMoveTo",      NULL,      N_("Move to..."),    NULL,        NULL, NULL },
+
+       
+       /* View */
+       { "ViewSort",            NULL,        N_("Sort..."),     NULL,      NULL,  NULL },
+       { "ViewFolders",         NULL,        N_("Folders"),     NULL,     NULL,  NULL },
+       { "ViewFullscreen",      NULL,        N_("Fullscreen"),  NULL,     NULL,  NULL },
+       { "ViewDetails",         NULL,        N_("Details"),     NULL,     NULL,  NULL },
+       { "ViewThumbnails",      NULL,        N_("Thumbnails"),  NULL,     NULL,  NULL },
+       { "ViewShowToolbar",     NULL,        N_("Show toolbar"), NULL,   NULL,  NULL },    /* submenu */
+
+               
+       /* Folders */
+       { "FoldersNew",          NULL,       N_("New folder"),       NULL, NULL, G_CALLBACK (_modest_ui_actions_on_new_folder) },
+       { "FoldersManage",       NULL,       N_("Manage..."),        NULL, NULL, NULL },
+       { "FoldersDetails",      NULL,       N_("Details..."),       NULL, NULL, NULL },
+       { "FoldersDelete",       NULL,       N_("Delete"),           NULL, NULL, G_CALLBACK (_modest_ui_actions_on_delete_folder) },
+       { "FoldersRename",       NULL,       N_("Rename"),           NULL, NULL, G_CALLBACK (_modest_ui_actions_on_rename_folder) },
+       { "FoldersMoveToTrash",  NULL,       N_("Move to trash"),    NULL, NULL, G_CALLBACK (_modest_ui_actions_on_move_to_trash_folder) },
+
+       
+       /* Accounts */
+       { "AccountsNew",          NULL,    N_("_New account..."),             NULL, NULL,  NULL },
+       { "AccountsManage",        NULL,    N_("Manage..."),                  NULL, NULL,  G_CALLBACK (_modest_ui_actions_on_accounts) },
+       { "AccountsConfigureSMTP", NULL,    N_("Configure SMTP servers..."),  NULL, NULL,  NULL },
+       
+       /* Tools */
+       { "ToolsSettings",        NULL,      N_("Settings..."),               NULL, NULL,  NULL },
+       { "ToolsContacts",        NULL,      N_("Contact..."),                NULL, NULL,  NULL },
+       { "ToolsFontSettings",    NULL,      N_("Font settings..."),          NULL, NULL,  NULL },
+       { "ToolsSearchMessages",  NULL,      N_("Search messages..."),        NULL, NULL,  NULL },
+       { "ToolsHelp",            NULL,      N_("Help"),                      NULL, NULL,  NULL },
+
+       /* Close */
+       { "CloseWindow",          NULL,     N_("Close window"),               NULL, NULL,  NULL },
+       { "CloseAllWindows",      NULL,     N_("Close all windows"),          NULL, NULL,  G_CALLBACK (_modest_ui_actions_on_quit) },
+
+
+       /* Toolbar items; they is some overlap with the menu items,
+        * but we need to specificy them differently, they have icons for example
+        */
+       /* Headers Toolbar */
+       { "ToolbarMessageNew",        MODEST_STOCK_NEW_MAIL,     N_("Compose a new message"), NULL, NULL,  G_CALLBACK (_modest_ui_actions_on_new_msg) },
+       { "ToolbarMessageReply",      MODEST_STOCK_REPLY,     N_("Reply a message"),       NULL, NULL,  G_CALLBACK (_modest_ui_actions_on_reply) },
+       { "ToolbarMessageReplyAll",   MODEST_STOCK_REPLY_ALL,     N_("Reply to all"),          NULL, NULL,  G_CALLBACK (_modest_ui_actions_on_reply_all) },
+       { "ToolbarMessageForward",    MODEST_STOCK_FORWARD,     N_("Forward a message"),     NULL, NULL,  G_CALLBACK (_modest_ui_actions_on_forward) },
+       { "ToolbarSendReceive",       MODEST_STOCK_SEND_RECEIVE,   N_("Send & receive"),        NULL, NULL,  G_CALLBACK (_modest_ui_actions_on_forward) },
+       { "ToolbarToggleView",        GTK_STOCK_CDROM,      N_("Toggle view"),           NULL, NULL,  G_CALLBACK (_modest_ui_actions_toggle_view) },
+       { "ToolbarDeleteMessage",     GTK_STOCK_DELETE,     N_("Delete message"),        NULL, NULL,  G_CALLBACK (_modest_ui_actions_on_delete) },
+};
+
+
+G_END_DECLS
+#endif /* __MODEST_MAIN_WINDOW_UI_PRIV_H__ */
index ccd48ea..2bc9de2 100644 (file)
@@ -281,13 +281,14 @@ get_toolbar (ModestMainWindow *self)
        gtk_tool_item_set_homogeneous (progress_item, FALSE);
        gtk_tool_item_set_expand(progress_item, TRUE);
        
-       stop_icon = gtk_image_new_from_icon_name("qgn_toolb_gene_stop", GTK_ICON_SIZE_BUTTON);
+       gtk_toolbar_insert (GTK_TOOLBAR(toolbar), progress_item,
+                           gtk_toolbar_get_n_items(GTK_TOOLBAR(toolbar)));
 
+       stop_icon = gtk_image_new_from_icon_name("qgn_toolb_gene_stop", GTK_ICON_SIZE_BUTTON);
        gtk_toolbar_insert (GTK_TOOLBAR(toolbar), gtk_tool_button_new(stop_icon, NULL),
                            gtk_toolbar_get_n_items(GTK_TOOLBAR(toolbar)));
 
-       gtk_toolbar_insert (GTK_TOOLBAR(toolbar), progress_item,
-                           gtk_toolbar_get_n_items(GTK_TOOLBAR(toolbar)));
+
        gtk_widget_show_all (toolbar);
        return toolbar;
 }
index 1f77bf0..83fa0b9 100644 (file)
 <ui>
 
   <menubar name="MenuBar">
-    <menu name="FileMenu" action="File">
-      <menuitem name="FileNewMenu" action="FileNew"/>
-      <menuitem name="FileOpenMenu" action="FileOpen"/>
+    
+    <menu name="MessageMenu" action="Message">
+      <menuitem name="MessageNewMenu"  action="MessageNew"/>
+      <menuitem name="MessageOpenMenu" action="MessageOpen"/>
       <separator/>
-      <menuitem name="FileSaveMenu" action="FileSave"/>
-      <menuitem name="FileSaveAsMenu" action="FileSaveAs"/>
+      <menuitem name="MessageCancelSendingMenu"  action="MessageCancelSending"/>
+      <menuitem name="MessageSendMenu" action="MessageSend"/>
       <separator/>
-      <menuitem name="FileQuitMenu" action="FileQuit"/>
+      <menuitem name="MessageDeleteMenu" action="MessageDelete"/>
+      <separator/>
+      <menuitem name="MessageSendReceiveMenu"  action="MessageSendReceive"/>
+      <menuitem name="MessageContentsMenu"     action="MessageContents"/>
+      <menuitem name="MessageDetailsMenu"      action="MessageDetails"/>
     </menu>
-
+    
     <menu name="EditMenu" action="Edit">
       <menuitem name="EditUndoMenu" action="EditUndo"/>
-      <menuitem name="EditRedoMenu" action="EditRedo"/>
       <separator/>
       <menuitem name="EditCutMenu" action="EditCut"/>
       <menuitem name="EditCopyMenu" action="EditCopy"/>
       <menuitem name="EditPasteMenu" action="EditPaste"/>
-      <menuitem name="EditDeleteMenu" action="EditDelete"/>
       <separator/>
-      <menuitem name="EditSelectAllMenu" action="EditSelectAll"/>
-      <menuitem name="EditDeselectAllMenu" action="EditDeselectAll"/>
-    </menu>
+      <menuitem name="EditSelectMenu" action="EditSelect"/>
+      <menuitem name="EditMoveToMenu" action="EditMoveTo"/>
+    </menu> 
 
-    <menu name="ActionsMenu" action="Actions">
-      <menuitem name="ActionsNewMenu" action="ActionsNew"/>
-      <menuitem name="ActionsReplyMenu" action="ActionsReply"/>
-      <menuitem name="ActionsForwardMenu" action="ActionsForward"/>
-      <menuitem name="ActionsBounceMenu" action="ActionsBounce"/>
+    <menu name="ViewMenu" action="View">
+      <menuitem name="ViewSortMenu" action="ViewSort"/>
       <separator/>
-      <menuitem name="ActionsFolderNewMenu" action="ActionsFolderNew"/>
-      <menuitem name="ActionsFolderDeleteMenu" action="ActionsFolderDelete"/>
-      <menuitem name="ActionsFolderRenameMenu" action="ActionsFolderRename"/>
-      <menuitem name="ActionsFolderMoveToTrashMenu" action="ActionsFolderMoveToTrash"/>
-    </menu>
+      <menuitem name="ViewFoldersMenu" action="ViewFolders"/>
+      <menuitem name="ViewFullscreenMenu" action="ViewFullscreen"/>
+      <separator/>
+      <menuitem name="ViewThumbnailsMenu" action="ViewThumbnails"/>
+      <menuitem name="ViewDetailsMenu" action="ViewDetails"/>
+      <separator/>
+      <menuitem name="ViewShowToolbarMenu" action="ViewShowToolbar"/>
+   </menu>
 
-    <menu name="OptionsMenu" action="Options">
-      <menuitem name="OptionsAccountsMenu" action="OptionsAccounts"/>
-      <menuitem name="OptionsContactsMenu" action="OptionsContacts"/>
+    <menu name="FoldersMenu" action="Folders">
+      <menuitem name="FoldersNewMenu"    action="FoldersNew"/>
+      <menuitem name="FoldersManageMenu" action="FoldersManage"/>
+      <separator/>
+      <menuitem name="FoldersDetailsMenu" action="FoldersDetails"/>
+      <separator/>
     </menu>
-
-    <menu name="HelpMenu" action="Help">
-      <menuitem name="HelpAboutMenu" action="HelpAbout"/>
+    
+    <menu name="AccountsMenu" action="Accounts">
+      <menuitem name="AccountsNewMenu"    action="AccountsNew"/>
+      <separator/>
+      <menuitem name="AccountsManageMenu" action="AccountsManage"/>
+      <menuitem name="AccountsConfigureSMTPMenu" action="AccountsConfigureSMTP"/>
+    </menu>
+    
+    <menu name="ToolsMenu" action="Tools">
+      <menuitem name="ToolsSettingsMenu" action="ToolsSettings"/>
+      <separator/>
+      <menuitem name="ToolsContactsMenu" action="ToolsContacts"/>
+      <menuitem name="ToolsFontSettingsMenu" action="ToolsFontSettings"/>
+      <separator/>
+      <menuitem name="ToolsSearchMessagesMenu" action="ToolsSearchMessages"/>
+      <separator/>
+      <menuitem name="ToolsHelpMenu" action="ToolsHelp"/>
+    </menu>
+    
+    <menu name="CloseMenu" action="Close">
+      <menuitem name="CloseWindowMenu"     action="CloseWindow"/>
+      <menuitem name="CloseAllWindowsMenu" action="CloseAllWindows"/>
     </menu>
   </menubar>
 
   <toolbar name="ToolBar">
-    <toolitem action="ActionsNew"/>
+    <toolitem action="ToolbarMessageNew"/> 
     <separator/>
-    <toolitem action="ActionsReply"/>
-    <toolitem action="ActionsReplyAll"/>
-    <toolitem action="ActionsForward"/>
+    <toolitem action="ToolbarMessageReply"/> 
+    <toolitem action="ToolbarMessageReplyAll"/>
+    <toolitem action="ToolbarMessageForward"/> 
     <separator/>
-<!--    <toolitem action="GotoPrevious"/>
-    <toolitem action="GotoNext"/> -->
+    <toolitem action="ToolbarSendReceive"/>
+    <toolitem  action="ToolbarToggleView"/>
     <separator/>
-    <toolitem action="ActionsSendReceive"/>
-    <toolitem name="ToggleView" action="ToggleView"/>
+    <toolitem action="ToolbarDeleteMessage"/>
     <separator/>
-    <toolitem action="ActionsDelete"/>
-      <separator/>
-</toolbar>
+  </toolbar>
 
   <popup name="HeaderViewContextMenu">
-    <menuitem action="ActionsReply"/>
-    <menuitem action="ActionsForward"/>
+    <menuitem action="MessageReply"/>
+    <menuitem action="MessageForward"/>
   </popup>
-
+  
   <popup name="FolderViewContextMenu">
-    <menuitem action="ActionsFolderNew"/>
-    <menuitem action="ActionsFolderDelete"/>
-    <menuitem action="ActionsFolderRename"/>
-    <menuitem action="ActionsFolderMoveToTrash"/>
+    <menuitem action="FoldersNew"/>
+    <menuitem action="FoldersDelete"/>
+    <menuitem action="FoldersRename"/>
+    <menuitem action="FoldersMoveToTrash"/>
   </popup>
 
 </ui>
index 6214b2f..24ce3bc 100644 (file)
@@ -30,7 +30,6 @@ libmodest_widgets_la_SOURCES=       \
        modest-header-view-priv.h   \
        modest-header-view-render.c \
        modest-main-window.h        \
-       modest-main-window-ui.h     \
        modest-msg-view.c           \
        modest-msg-view.h           \
        modest-tny-stream-gtkhtml.c \
diff --git a/src/widgets/modest-main-window-ui.h b/src/widgets/modest-main-window-ui.h
deleted file mode 100644 (file)
index de1e4cb..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/* 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_MAIN_WINDOW_UI_PRIV_H__
-#define __MODEST_MAIN_WINDOW_UI_PRIV_H__
-
-#include <glib/gi18n.h>
-#include "modest-icon-names.h"
-#include "modest-ui-actions.h"
-
-G_BEGIN_DECLS
-
-
-/* Action entries */
-static const GtkActionEntry modest_action_entries [] = {
-
-       /* Toplevel menus */
-       { "File", NULL, N_("_File") },
-       { "Edit", NULL, N_("_Edit") },
-       { "Actions", NULL, N_("_Actions") },
-       { "Options", NULL, N_("_Options") },
-       { "Help", NULL, N_("_Help") },
-
-       /* FILE */
-       { "FileNew",    GTK_STOCK_NEW,     N_("_New"),     "<CTRL>N", N_("Compose new message"),  G_CALLBACK (_modest_ui_actions_on_new_msg) },
-       { "FileOpen",   GTK_STOCK_OPEN,    N_("_Open"),    "<CTRL>O", N_("Open a message"),       NULL },
-       { "FileSave",   GTK_STOCK_SAVE,    N_("_Save"),    "<CTRL>S", N_("Save a message"),       NULL },
-       { "FileSaveAs", GTK_STOCK_SAVE_AS, N_("Save _As"), NULL,      N_("Save a message as"),    NULL },
-       { "FileQuit",   GTK_STOCK_QUIT,    N_("_Quit"),    "<CTRL>Q", N_("Exit the application"), G_CALLBACK (_modest_ui_actions_on_quit) },
-
-       /* EDIT */
-       { "EditUndo",        GTK_STOCK_UNDO,   N_("_Undo"), "<CTRL>Z",        N_("Undo last action"),  NULL },
-       { "EditRedo",        GTK_STOCK_REDO,   N_("_Redo"), "<shift><CTRL>Z", N_("Redo previous action"),  NULL },
-       { "EditCut",         GTK_STOCK_CUT,    N_("Cut"),   "<CTRL>X",        N_("_Cut"), NULL   },
-       { "EditCopy",        GTK_STOCK_COPY,   N_("Copy"),  "<CTRL>C",        N_("Copy"), NULL },
-       { "EditPaste",       GTK_STOCK_PASTE,  N_("Paste"), "<CTRL>V",        N_("Paste"), NULL },
-       { "EditDelete",      GTK_STOCK_DELETE, N_("_Delete"),      "<CTRL>Q",         N_("Delete"), NULL },
-       { "EditSelectAll",   NULL,             N_("Select all"),   "<CTRL>A",         N_("Select all"), NULL },
-       { "EditDeselectAll", NULL,             N_("Deselect all"), "<Shift><CTRL>A",  N_("Deselect all"), NULL },
-
-       /* VIEW */
-       { "ToggleView",        GTK_STOCK_CDROM,   N_("_Toggle view"), NULL,        N_("Toggle the list view"),  G_CALLBACK(_modest_ui_actions_toggle_view) },
-       
-       /* ACTIONS */
-       { "ActionsNew",         MODEST_STOCK_NEW_MAIL, N_("_New Message"),   NULL, N_("Compose a new message"), G_CALLBACK (_modest_ui_actions_on_new_msg) },
-       { "ActionsReply",       MODEST_STOCK_REPLY, N_("_Reply"),         NULL, N_("Reply to a message"), G_CALLBACK (_modest_ui_actions_on_reply) },
-       { "ActionsReplyAll",    MODEST_STOCK_REPLY_ALL, N_("Reply to all"),   NULL, N_("Reply to all"), G_CALLBACK (_modest_ui_actions_on_reply_all) },
-       { "ActionsForward",     MODEST_STOCK_FORWARD, N_("_Forward"),       NULL, N_("Forward a message"), G_CALLBACK (_modest_ui_actions_on_forward) },
-       { "ActionsBounce",      NULL, N_("_Bounce"),        NULL, N_("Bounce a message"),          NULL },
-       { "ActionsSendReceive", MODEST_STOCK_SEND_RECEIVE, N_("Send/Receive"),   NULL, N_("Send and receive messages"), NULL },
-       { "ActionsDelete",      MODEST_STOCK_DELETE, N_("Delete message"), NULL, N_("Delete messages"), G_CALLBACK (_modest_ui_actions_on_delete) },
-       { "ActionsFolderNew",   NULL, N_("New Folder"),   NULL, N_("Create a new folder"), G_CALLBACK (_modest_ui_actions_on_new_folder) },
-       { "ActionsFolderDelete",   NULL, N_("Delete Folder"),   NULL, N_("Delete the folder"), G_CALLBACK (_modest_ui_actions_on_delete_folder) },
-       { "ActionsFolderRename",   NULL, N_("Rename Folder"),   NULL, N_("Rename the folder"), G_CALLBACK (_modest_ui_actions_on_rename_folder) },
-       { "ActionsFolderMoveToTrash",   NULL, N_("Move Folder to Trash"),   NULL, N_("Move folder to Trash"), G_CALLBACK (_modest_ui_actions_on_move_to_trash_folder) },
-
-
-       /* GOTO */
-       { "GotoPrevious", MODEST_STOCK_PREV, N_("Previous"), NULL, N_("Go to previous message"), NULL },
-       { "GotoNext",     MODEST_STOCK_NEXT, N_("Next"),     NULL, N_("Go to next message"), G_CALLBACK (_modest_ui_actions_on_next) },
-
-       /* OPTIONS */
-       { "OptionsAccounts",  NULL, N_("_Accounts"), NULL, N_("Manage accounts"), G_CALLBACK (_modest_ui_actions_on_accounts) },
-       { "OptionsContacts",  NULL, N_("_Contacts"), NULL, N_("Manage contacts"), NULL },
-
-       /* HELP */
-       { "HelpAbout", GTK_STOCK_ABOUT, N_("About"), NULL, N_("About Modest"), G_CALLBACK (_modest_ui_actions_on_about) },
-};
-
-
-G_END_DECLS
-#endif /* __MODEST_MAIN_WINDOW_UI_PRIV_H__ */