From: Sergio Villar Senin Date: Tue, 18 Nov 2008 11:25:43 +0000 (+0000) Subject: * Fixes NB#92784, replace the View menu by the Accounts menu X-Git-Tag: git_migration_finished~1019 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=a797b605b468c7a98adfa1a8d5d8aca4b37dbd45 * Fixes NB#92784, replace the View menu by the Accounts menu pmo-trunk-r6331 --- diff --git a/src/hildon2/modest-main-window-ui.h b/src/hildon2/modest-main-window-ui.h index 5873917..3e6fb77 100644 --- a/src/hildon2/modest-main-window-ui.h +++ b/src/hildon2/modest-main-window-ui.h @@ -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) }, diff --git a/src/hildon2/modest-main-window.c b/src/hildon2/modest-main-window.c index 964e456..c77853f 100644 --- a/src/hildon2/modest-main-window.c +++ b/src/hildon2/modest-main-window.c @@ -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 diff --git a/src/hildon2/ui/modest-main-window-ui.xml b/src/hildon2/ui/modest-main-window-ui.xml index 60084a9..5ee5aec 100644 --- a/src/hildon2/ui/modest-main-window-ui.xml +++ b/src/hildon2/ui/modest-main-window-ui.xml @@ -51,7 +51,7 @@ - + @@ -62,18 +62,14 @@ - + - - - - - - + + - + - +