* Fixes NB#92784, replace the View menu by the Accounts menu
authorSergio Villar Senin <svillar@igalia.com>
Tue, 18 Nov 2008 11:25:43 +0000 (11:25 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Tue, 18 Nov 2008 11:25:43 +0000 (11:25 +0000)
pmo-trunk-r6331

src/hildon2/modest-main-window-ui.h
src/hildon2/modest-main-window.c
src/hildon2/ui/modest-main-window-ui.xml

index 5873917..3e6fb77 100644 (file)
@@ -44,7 +44,7 @@ static const GtkActionEntry modest_action_entries [] = {
        /* Toplevel menus */
        { "Email",       NULL, N_("mcen_me_inbox_email"),        NULL, NULL, G_CALLBACK (modest_ui_actions_on_email_menu_activated) },
        { "Edit",        NULL, N_("mcen_me_inbox_edit"),         NULL, NULL, G_CALLBACK (modest_ui_actions_on_edit_menu_activated) },
-       { "View",        NULL, N_("mcen_me_inbox_view"),         NULL, NULL, G_CALLBACK (modest_ui_actions_on_view_menu_activated) },
+       { "Accounts",        NULL, N_("mcen_me_inbox_accounts"),         NULL, NULL, NULL },
        { "Tools",       NULL, N_("mcen_me_inbox_tools"),        NULL, NULL, G_CALLBACK (modest_ui_actions_on_tools_menu_activated) },
        { "Attachments", NULL, N_("mcen_me_viewer_attachments"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_attachment_menu_activated) },
        { "Close",       NULL, N_("mcen_me_inbox_close") },
@@ -81,15 +81,12 @@ static const GtkActionEntry modest_action_entries [] = {
        { "EditMoveTo",      NULL,      N_("mcen_me_inbox_moveto"),    NULL,      NULL, G_CALLBACK (modest_ui_actions_on_move_to) },
        
        /* View */
-       { "ViewSort",            NULL,        N_("mcen_me_inbox_sort"),     NULL,      NULL,  G_CALLBACK (modest_ui_actions_on_sort) },
-       { "ViewShowToolbar", NULL, N_("mcen_me_inbox_toolbar") }, /* submenu */
-       { "ViewPreviousMessage", NULL,    N_("mcen_me_viewer_previousmessage"),         NULL, NULL, G_CALLBACK (modest_ui_actions_on_prev) },
-       { "ViewNextMessage", NULL, N_("mcen_me_viewer_nextmessage"),      NULL, NULL, G_CALLBACK (modest_ui_actions_on_next) },
+
 
        /* Attachments */
        { "SaveAttachment", NULL, N_("mcen_me_viewer_save_attachments"), NULL, NULL, G_CALLBACK (modest_ui_actions_save_attachments) },
        { "RemoveAttachment", NULL, N_("mcen_me_inbox_remove_attachments"), NULL, NULL, G_CALLBACK (modest_ui_actions_remove_attachments) },
-       
+
        /* Tools */
        { "ToolsSettings",        NULL,      N_("mcen_me_inbox_options"),                     NULL, NULL, G_CALLBACK (modest_ui_actions_on_settings) },
        { "ToolsAccounts",        NULL,      N_("mcen_me_inbox_accounts"),                NULL, NULL,  G_CALLBACK(modest_ui_actions_on_accounts) },
index 964e456..c77853f 100644 (file)
@@ -706,7 +706,7 @@ update_menus (ModestMainWindow* self)
                        priv->merge_ids = g_byte_array_append (priv->merge_ids, &merge_id, 1);
                        gtk_ui_manager_add_ui (parent_priv->ui_manager,
                                               merge_id,
-                                              "/MenuBar/ViewMenu/ViewMenuAdditions",
+                                              "/MenuBar/AccountsMenu/AccountsMenuAdditions",
                                               item_name,
                                               account_name,
                                               GTK_UI_MANAGER_MENUITEM,
@@ -793,10 +793,10 @@ update_menus (ModestMainWindow* self)
 
                /* Get the item of the view menu */
                item_name = g_strconcat (account_name, "Menu", NULL);
-               path = g_strconcat ("/MenuBar/ViewMenu/ViewMenuAdditions/", item_name, NULL);
+               path = g_strconcat ("/MenuBar/AccountsMenu/AccountsMenuAdditions/", item_name, NULL);
                item = gtk_ui_manager_get_widget (parent_priv->ui_manager, path);
                g_free(path);
-               
+
                if (item) {
                        GtkWidget *child = gtk_bin_get_child (GTK_BIN (item));
                        if (GTK_IS_LABEL (child)) {
@@ -809,7 +809,7 @@ update_menus (ModestMainWindow* self)
                                gtk_label_set_ellipsize (GTK_LABEL (child),  PANGO_ELLIPSIZE_END);
                        }
                }
-                       
+
                /* Get the item of the tools menu */
                path = g_strconcat("/MenuBar/ToolsMenu/ToolsSendReceiveMainMenu/ToolsMenuAdditions/", item_name, NULL);
                item = gtk_ui_manager_get_widget (parent_priv->ui_manager, path);
@@ -2072,19 +2072,19 @@ modest_main_window_notify_send_receive_completed (ModestMainWindow *self)
        GtkAction *action = NULL;
        GtkWidget *widget = NULL;
        ModestMainWindowPrivate *priv = NULL;
-               
+
        g_return_if_fail (MODEST_IS_MAIN_WINDOW (self));
        priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
 
        priv->send_receive_in_progress  = FALSE;
 
-        action = modest_window_get_action (MODEST_WINDOW(self), "/MenuBar/ToolsMenu/ToolsSendReceiveMainMenu/ToolsSendReceiveAllMenu");        
+        action = modest_window_get_action (MODEST_WINDOW(self), "/MenuBar/ToolsMenu/ToolsSendReceiveMainMenu/ToolsSendReceiveAllMenu");
        gtk_action_set_sensitive (action, TRUE);
 /*         action = modest_window_get_action (MODEST_WINDOW(self), "/MenuBar/ToolsMenu/ToolsSendReceiveMainMenu/ToolsSendReceiveCancelSendingMenu");    */
 /*     gtk_action_set_sensitive (action, TRUE); */
-        widget = modest_window_get_action_widget (MODEST_WINDOW(self), "/MenuBar/ToolsMenu/ToolsSendReceiveMainMenu/ToolsMenuAdditions");      
+        widget = modest_window_get_action_widget (MODEST_WINDOW(self), "/MenuBar/ToolsMenu/ToolsSendReceiveMainMenu/ToolsMenuAdditions");
        gtk_widget_set_sensitive (widget, TRUE);
-} 
+}
 
 
 static void
index 60084a9..5ee5aec 100644 (file)
@@ -51,7 +51,7 @@
       <separator/>
       <menuitem name="EmailDetailsMenu" action="EmailDetails"/>
     </menu>
-    
+
     <menu name="EditMenu" action="Edit">
 <!--       <menuitem name="EditCutMenu" action="EditCut"/> -->
 <!--       <menuitem name="EditCopyMenu" action="EditCopy"/> -->
       <menuitem name="EditMarkAsUnreadMenu" action="EditMarkAsUnread"/>
       <separator/>
       <menuitem name="EditMoveToMenu" action="EditMoveTo"/>
-    </menu> 
+    </menu>
 
-    <menu name="ViewMenu" action="View">
-      <menuitem name="ViewSortMenu" action="ViewSort"/>
-      <separator/>
-      <menuitem name="ViewToggleFoldersMenu" action="ToggleFolders"/>
-      <separator/>
-      <placeholder name="ViewMenuAdditions" />
+    <menu name="AccountsMenu" action="Accounts">
+      <placeholder name="AccountsMenuAdditions" />
    </menu>
-    
+
     <menu name="ToolsMenu" action="Tools">
-      <menuitem name="ToolsSettingsMenu" action="ToolsSettings"/>   
+      <menuitem name="ToolsSettingsMenu" action="ToolsSettings"/>
       <menuitem name="ToolsAccountsMenu" action="ToolsAccounts"/>
       <menuitem name="ToolsSMTPServersMenu" action="ToolsSMTPServers"/>
       <separator/>