From: Sergio Villar Senin Date: Tue, 18 Nov 2008 14:33:08 +0000 (+0000) Subject: * Fixes NB#92688, migrate editor menus to 1.5 specs X-Git-Tag: git_migration_finished~1018 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=4b690d574fc0ee33ee4204fc9dd07af280aaae4e * Fixes NB#92688, migrate editor menus to 1.5 specs * Fixes NB#92692, migrate editor menus to 1.5 specs pmo-trunk-r6332 --- diff --git a/src/hildon2/modest-main-window-ui-dimming.h b/src/hildon2/modest-main-window-ui-dimming.h index 478914d..262a9ca 100644 --- a/src/hildon2/modest-main-window-ui-dimming.h +++ b/src/hildon2/modest-main-window-ui-dimming.h @@ -42,7 +42,6 @@ static const ModestDimmingEntry modest_main_window_menu_dimming_entries [] = { /* Email Menu */ { "/MenuBar/EmailMenu/EmailNewMainMenu", NULL }, - { "/MenuBar/EmailMenu/EmailNewMainMenu/EmailNewMessageMenu", G_CALLBACK(modest_ui_dimming_rules_on_new_msg) }, { "/MenuBar/EmailMenu/EmailNewMainMenu/EmailNewFolderMenu", G_CALLBACK(modest_ui_dimming_rules_on_new_folder) }, { "/MenuBar/EmailMenu/EmailOpenMenu", G_CALLBACK(modest_ui_dimming_rules_on_open_msg) }, { "/MenuBar/EmailMenu/EmailReplyMenu", G_CALLBACK(modest_ui_dimming_rules_on_reply_msg) }, @@ -61,15 +60,6 @@ static const ModestDimmingEntry modest_main_window_menu_dimming_entries [] = { { "/MenuBar/EditMenu/EditMarkAsUnreadMenu", G_CALLBACK(modest_ui_dimming_rules_on_mark_as_unread_msg) }, { "/MenuBar/EditMenu/EditMoveToMenu", G_CALLBACK(modest_ui_dimming_rules_on_move_to) }, - /* View Menu */ - { "/MenuBar/ViewMenu", NULL }, - { "/MenuBar/ViewMenu/ViewSortMenu", G_CALLBACK(modest_ui_dimming_rules_on_sort) }, - { "/MenuBar/ViewMenu/ViewToggleFoldersMenu", NULL }, - { "/MenuBar/ViewMenu/ViewToggleFullscreenMenu", NULL }, - { "/MenuBar/ViewMenu/ViewShowToolbarMainMenu", NULL }, - { "/MenuBar/ViewMenu/ViewShowToolbarMainMenu/ViewShowToolbarNormalScreenMenu", NULL }, - { "/MenuBar/ViewMenu/ViewShowToolbarMainMenu/ViewShowToolbarFullScreenMenu", NULL }, - /* Tools Menu */ { "/MenuBar/ToolsMenu", NULL }, { "/MenuBar/ToolsMenu/ToolsSettingsMenu", NULL }, diff --git a/src/hildon2/modest-main-window-ui.h b/src/hildon2/modest-main-window-ui.h index 3e6fb77..782d047 100644 --- a/src/hildon2/modest-main-window-ui.h +++ b/src/hildon2/modest-main-window-ui.h @@ -44,6 +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) }, @@ -79,9 +80,10 @@ static const GtkActionEntry modest_action_entries [] = { { "EditMarkAsRead", NULL, N_("mcen_me_inbox_mark_as_read"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_mark_as_read) }, { "EditMarkAsUnread", NULL, N_("mcen_me_inbox_mark_as_unread"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_mark_as_unread) }, { "EditMoveTo", NULL, N_("mcen_me_inbox_moveto"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_move_to) }, - - /* View */ + /* View */ + { "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) }, @@ -121,11 +123,5 @@ static const GtkActionEntry modest_action_entries [] = { { "ToolbarCancel", GTK_STOCK_STOP, "", NULL, NULL, NULL }, }; -static const GtkToggleActionEntry modest_toggle_action_entries [] = { - { "ViewToggleFullscreen", GTK_STOCK_FULLSCREEN, N_("mcen_me_inbox_fullscreen"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_toggle_fullscreen), FALSE }, - { "ViewShowToolbarNormalScreen", NULL, N_("mcen_me_inbox_normalview"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_toggle_toolbar), TRUE }, - { "ViewShowToolbarFullScreen", NULL, N_("mcen_me_inbox_fullscreen"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_toggle_toolbar), TRUE }, -}; - G_END_DECLS #endif /* __MODEST_MAIN_WINDOW_UI_PRIV_H__ */ diff --git a/src/hildon2/modest-main-window.c b/src/hildon2/modest-main-window.c index c77853f..2d0c8a4 100644 --- a/src/hildon2/modest-main-window.c +++ b/src/hildon2/modest-main-window.c @@ -77,10 +77,6 @@ static void modest_main_window_class_init (ModestMainWindowClass *klass); static void modest_main_window_init (ModestMainWindow *obj); static void modest_main_window_finalize (GObject *obj); -static gboolean modest_main_window_window_state_event (GtkWidget *widget, - GdkEventWindowState *event, - gpointer userdata); - static void connect_signals (ModestMainWindow *self); static void modest_main_window_disconnect_signals (ModestWindow *self); @@ -166,7 +162,7 @@ static void on_folder_selection_changed (ModestFolderView *folder_view, TnyFolderStore *folder_store, gboolean selected, ModestMainWindow *main_window); - + static void set_at_least_one_account_visible(ModestMainWindow *self); static void on_updating_msg_list (ModestHeaderView *header_view, @@ -203,7 +199,7 @@ struct _ModestMainWindowPrivate { GtkWidget *refresh_toolitem; ModestToolBarModes current_toolbar_mode; - /* Merge ids used to add/remove accounts to the ViewMenu*/ + /* Merge ids used to add/remove accounts to the Accounts Menu*/ GByteArray *merge_ids; GtkActionGroup *view_additions_group; @@ -552,7 +548,7 @@ tap_and_hold_query_cb (GtkWidget *widget, GdkEvent *event) static void update_menus (ModestMainWindow* self) -{ +{ GSList *account_names, *iter, *accounts; ModestMainWindowPrivate *priv; ModestWindowPrivate *parent_priv; @@ -644,10 +640,10 @@ update_menus (ModestMainWindow* self) /* Create a new action group */ default_account = modest_account_mgr_get_default_account (mgr); active_account_name = modest_window_get_active_account (MODEST_WINDOW (self)); - + if (!active_account_name) modest_window_set_active_account (MODEST_WINDOW (self), default_account); - + priv->view_additions_group = gtk_action_group_new (MODEST_MAIN_WINDOW_ACTION_GROUP_ADDITIONS); radio_group = NULL; for (i = 0; i < num_accounts; i++) { @@ -660,7 +656,7 @@ update_menus (ModestMainWindow* self) continue; } account_name = modest_account_settings_get_account_name (settings); - + if (default_account && account_name && !(strcmp (default_account, account_name) == 0)) { display_name = g_strdup_printf (_("mcen_me_toolbar_sendreceive_default"), @@ -670,8 +666,8 @@ update_menus (ModestMainWindow* self) modest_account_settings_get_display_name (settings)); } - - + + /* Create action and add it to the action group. The action name must be the account name, this way we could know in the handlers the account to show */ @@ -1004,12 +1000,8 @@ connect_signals (ModestMainWindow *self) modest_signal_mgr_connect (priv->sighandlers,G_OBJECT(priv->header_view), "tap-and-hold", G_CALLBACK(_header_view_csm_menu_activated), self); - + /* window */ - priv->sighandlers = - modest_signal_mgr_connect (priv->sighandlers,G_OBJECT (self), "window-state-event", - G_CALLBACK (modest_main_window_window_state_event), - NULL); /* we don't register this in sighandlers, as it should be run after disconnecting all signals, * in destroy stage */ g_signal_connect (G_OBJECT (self), "destroy", G_CALLBACK (on_window_destroy), NULL); @@ -1213,11 +1205,6 @@ modest_main_window_new (void) self); gtk_action_group_add_toggle_actions (action_group, - modest_toggle_action_entries, - G_N_ELEMENTS (modest_toggle_action_entries), - self); - - gtk_action_group_add_toggle_actions (action_group, modest_main_window_toggle_action_entries, G_N_ELEMENTS (modest_main_window_toggle_action_entries), self); @@ -1505,37 +1492,6 @@ toolbar_resize (ModestMainWindow *self) } - - -static gboolean -modest_main_window_window_state_event (GtkWidget *widget, GdkEventWindowState *event, gpointer userdata) -{ - if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) { - ModestWindowPrivate *parent_priv; - ModestWindowMgr *mgr; - gboolean is_fullscreen; - GtkAction *fs_toggle_action; - gboolean active; - - mgr = modest_runtime_get_window_mgr (); - - is_fullscreen = modest_window_mgr_get_fullscreen_mode (mgr); - - parent_priv = MODEST_WINDOW_GET_PRIVATE (widget); - - fs_toggle_action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/ViewMenu/ViewToggleFullscreenMenu"); - active = (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (fs_toggle_action)))?1:0; - if (is_fullscreen != active) { - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (fs_toggle_action), is_fullscreen); - } - - toolbar_resize (MODEST_MAIN_WINDOW (widget)); - } - - return FALSE; - -} - static void modest_main_window_show_toolbar (ModestWindow *self, gboolean show_toolbar) diff --git a/src/hildon2/modest-msg-edit-window-ui-dimming.h b/src/hildon2/modest-msg-edit-window-ui-dimming.h index 6144a7b..09435b9 100644 --- a/src/hildon2/modest-msg-edit-window-ui-dimming.h +++ b/src/hildon2/modest-msg-edit-window-ui-dimming.h @@ -17,13 +17,10 @@ static const ModestDimmingEntry modest_msg_edit_window_menu_dimming_entries [] = { "/MenuBar/FormatMenu/AlignmentRightMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) }, { "/MenuBar/FormatMenu/AlignmentCenterMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) }, { "/MenuBar/FormatMenu/InsertImageMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) }, - { "/MenuBar/EditMenu/SelectAllMenu", G_CALLBACK (modest_ui_dimming_rules_on_select_all) }, - { "/MenuBar/EditMenu/UndoMenu", G_CALLBACK (modest_ui_dimming_rules_on_undo) }, - { "/MenuBar/EditMenu/RedoMenu", G_CALLBACK (modest_ui_dimming_rules_on_redo) }, - { "/MenuBar/EditMenu/PasteMenu", G_CALLBACK (modest_ui_dimming_rules_on_editor_paste) }, - { "/MenuBar/AttachmentsMenu/RemoveAttachmentsMenu", G_CALLBACK (modest_ui_dimming_rules_on_editor_remove_attachment) }, + { "/MenuBar/EditMenu/UndoMenu", G_CALLBACK (modest_ui_dimming_rules_on_undo) }, + { "/MenuBar/EditMenu/RedoMenu", G_CALLBACK (modest_ui_dimming_rules_on_redo) }, + { "/MenuBar/AttachmentsMenu/RemoveAttachmentsMenu", G_CALLBACK (modest_ui_dimming_rules_on_editor_remove_attachment) }, { "/MenuBar/AttachmentsMenu/InsertImageMenu", G_CALLBACK (modest_ui_dimming_rules_on_set_style) }, - { "/MenuBar/EmailMenu/SendMenu", G_CALLBACK (modest_ui_dimming_rules_on_send) }, { "/MenuBar/EmailMenu/SaveToDraftsMenu", G_CALLBACK (modest_ui_dimming_rules_on_save_to_drafts) }, }; @@ -37,14 +34,5 @@ static const ModestDimmingEntry modest_msg_edit_window_toolbar_dimming_entries [ { "/ToolBar/ActionsItalics", G_CALLBACK(modest_ui_dimming_rules_on_set_style) }, }; -/* Clipboard Dimming rules entries */ -static const ModestDimmingEntry modest_msg_edit_window_clipboard_dimming_entries [] = { - - /* Toolbar */ - { "/MenuBar/EditMenu/CutMenu", G_CALLBACK(modest_ui_dimming_rules_on_cut) }, - { "/MenuBar/EditMenu/CopyMenu", G_CALLBACK(modest_ui_dimming_rules_on_copy) }, - { "/MenuBar/EditMenu/PasteMenu", G_CALLBACK(modest_ui_dimming_rules_on_editor_paste) }, -}; - G_END_DECLS #endif /* __MODEST_MSG_VIEW_WINDOW_UI_PRIV_H__ */ diff --git a/src/hildon2/modest-msg-edit-window.c b/src/hildon2/modest-msg-edit-window.c index 9efc9c9..1a7816b 100644 --- a/src/hildon2/modest-msg-edit-window.c +++ b/src/hildon2/modest-msg-edit-window.c @@ -119,9 +119,7 @@ static void modest_msg_edit_window_size_change (GtkCheckMenuItem *menu_item, static void modest_msg_edit_window_font_change (GtkCheckMenuItem *menu_item, gpointer userdata); static void modest_msg_edit_window_setup_toolbar (ModestMsgEditWindow *window); -static gboolean modest_msg_edit_window_window_state_event (GtkWidget *widget, - GdkEventWindowState *event, - gpointer userdata); + static void modest_msg_edit_window_open_addressbook (ModestMsgEditWindow *window, ModestRecptEditor *editor); static void modest_msg_edit_window_add_attachment_clicked (GtkButton *button, @@ -342,22 +340,6 @@ restore_settings (ModestMsgEditWindow *self) ModestWindowPrivate *parent_priv = MODEST_WINDOW_GET_PRIVATE (self); conf = modest_runtime_get_conf (); - action = gtk_ui_manager_get_action (parent_priv->ui_manager, - "/MenuBar/ViewMenu/ShowToolbarMenu/ViewShowToolbarNormalScreenMenu"); - modest_utils_toggle_action_set_active_block_notify (GTK_TOGGLE_ACTION (action), - modest_conf_get_bool (conf, MODEST_CONF_EDIT_WINDOW_SHOW_TOOLBAR, NULL)); - action = gtk_ui_manager_get_action (parent_priv->ui_manager, - "/MenuBar/ViewMenu/ShowToolbarMenu/ViewShowToolbarFullScreenMenu"); - modest_utils_toggle_action_set_active_block_notify (GTK_TOGGLE_ACTION (action), - modest_conf_get_bool (conf, MODEST_CONF_EDIT_WINDOW_SHOW_TOOLBAR_FULLSCREEN, NULL)); - - /* set initial state of cc and bcc */ - action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/ViewMenu/ViewCcFieldMenu"); - modest_utils_toggle_action_set_active_block_notify (GTK_TOGGLE_ACTION (action), - modest_conf_get_bool(modest_runtime_get_conf(), MODEST_CONF_SHOW_CC, NULL)); - action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/ViewMenu/ViewBccFieldMenu"); - modest_utils_toggle_action_set_active_block_notify (GTK_TOGGLE_ACTION (action), - modest_conf_get_bool(modest_runtime_get_conf(), MODEST_CONF_SHOW_BCC, NULL)); /* Dim at start clipboard actions */ action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/EditMenu/CutMenu"); @@ -367,8 +349,7 @@ restore_settings (ModestMsgEditWindow *self) action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/AttachmentsMenu/RemoveAttachmentsMenu"); gtk_action_set_sensitive (action, FALSE); - modest_widget_memory_restore (conf, - G_OBJECT(self), MODEST_CONF_EDIT_WINDOW_KEY); + modest_widget_memory_restore (conf, G_OBJECT(self), MODEST_CONF_EDIT_WINDOW_KEY); } @@ -664,9 +645,6 @@ connect_signals (ModestMsgEditWindow *obj) G_CALLBACK (body_changed), obj); g_signal_connect (G_OBJECT (priv->text_buffer), "modified-changed", G_CALLBACK (body_changed), obj); - g_signal_connect (G_OBJECT (obj), "window-state-event", - G_CALLBACK (modest_msg_edit_window_window_state_event), - NULL); g_signal_connect (G_OBJECT (priv->text_buffer), "end-user-action", G_CALLBACK (text_buffer_end_user_action), obj); g_signal_connect (G_OBJECT (priv->text_buffer), "mark-set", @@ -1538,10 +1516,6 @@ modest_msg_edit_window_new (TnyMsg *msg, const gchar *account_name, gboolean pre modest_dimming_rules_group_add_widget_rule (toolbar_rules_group, priv->font_face_toolitem, G_CALLBACK (modest_ui_dimming_rules_on_set_style), MODEST_WINDOW (obj)); - modest_dimming_rules_group_add_rules (clipboard_rules_group, - modest_msg_edit_window_clipboard_dimming_entries, - G_N_ELEMENTS (modest_msg_edit_window_clipboard_dimming_entries), - MODEST_WINDOW (obj)); /* Insert dimming rules group for this window */ modest_ui_dimming_manager_insert_rules_group (parent_priv->ui_dimming_manager, menu_rules_group); modest_ui_dimming_manager_insert_rules_group (parent_priv->ui_dimming_manager, toolbar_rules_group); @@ -1925,11 +1899,11 @@ text_buffer_refresh_attributes (WPTextBuffer *buffer, ModestMsgEditWindow *windo priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (window); if (wp_text_buffer_is_rich_text (WP_TEXT_BUFFER (priv->text_buffer))) { - action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/FormatMenu/FileFormatMenu/FileFormatFormattedTextMenu"); + action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/FormatMenu/FileFormatFormattedTextMenu"); if (!gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) modest_utils_toggle_action_set_active_block_notify (GTK_TOGGLE_ACTION (action), TRUE); } else { - action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/FormatMenu/FileFormatMenu/FileFormatPlainTextMenu"); + action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/FormatMenu/FileFormatPlainTextMenu"); if (!gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) modest_utils_toggle_action_set_active_block_notify (GTK_TOGGLE_ACTION (action), TRUE); } @@ -2602,31 +2576,6 @@ modest_msg_edit_window_font_change (GtkCheckMenuItem *menu_item, } } -static gboolean -modest_msg_edit_window_window_state_event (GtkWidget *widget, GdkEventWindowState *event, gpointer userdata) -{ - if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) { - ModestWindowPrivate *parent_priv; - ModestWindowMgr *mgr; - gboolean is_fullscreen; - GtkAction *fs_toggle_action; - gboolean active; - - mgr = modest_runtime_get_window_mgr (); - is_fullscreen = (modest_window_mgr_get_fullscreen_mode (mgr))?1:0; - - parent_priv = MODEST_WINDOW_GET_PRIVATE (widget); - - fs_toggle_action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/ViewMenu/ViewToggleFullscreenMenu"); - active = (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (fs_toggle_action)))?1:0; - if (is_fullscreen != active) - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (fs_toggle_action), is_fullscreen); - } - - return FALSE; - -} - void modest_msg_edit_window_show_cc (ModestMsgEditWindow *window, gboolean show) @@ -2727,9 +2676,7 @@ modest_msg_edit_window_show_toolbar (ModestWindow *self, gboolean show_toolbar) { ModestWindowPrivate *parent_priv; - const gchar *action_name; - GtkAction *action; - + g_return_if_fail (MODEST_IS_MSG_EDIT_WINDOW (self)); parent_priv = MODEST_WINDOW_GET_PRIVATE(self); @@ -2740,21 +2687,6 @@ modest_msg_edit_window_show_toolbar (ModestWindow *self, gtk_widget_show (GTK_WIDGET (parent_priv->toolbar)); else gtk_widget_hide (GTK_WIDGET (parent_priv->toolbar)); - - /* Update also the actions (to update the toggles in the - menus), we have to do it manually because some other window - of the same time could have changed it (remember that the - toolbar fullscreen mode is shared by all the windows of the - same type */ - if (modest_window_mgr_get_fullscreen_mode (modest_runtime_get_window_mgr ())) - action_name = "/MenuBar/ViewMenu/ShowToolbarMenu/ViewShowToolbarFullScreenMenu"; - else - action_name = "/MenuBar/ViewMenu/ShowToolbarMenu/ViewShowToolbarNormalScreenMenu"; - - action = gtk_ui_manager_get_action (parent_priv->ui_manager, action_name); - modest_utils_toggle_action_set_active_block_notify (GTK_TOGGLE_ACTION (action), - show_toolbar); - } void @@ -2830,7 +2762,7 @@ modest_msg_edit_window_set_file_format (ModestMsgEditWindow *window, if (response == GTK_RESPONSE_OK) { wp_text_buffer_enable_rich_text (WP_TEXT_BUFFER (priv->text_buffer), FALSE); } else { - GtkToggleAction *action = GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/FormatMenu/FileFormatMenu/FileFormatFormattedTextMenu")); + GtkToggleAction *action = GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/FormatMenu/FileFormatFormattedTextMenu")); modest_utils_toggle_action_set_active_block_notify (action, TRUE); } } diff --git a/src/hildon2/ui/modest-msg-edit-window-ui.xml b/src/hildon2/ui/modest-msg-edit-window-ui.xml index 5432d4a..842ed9e 100644 --- a/src/hildon2/ui/modest-msg-edit-window-ui.xml +++ b/src/hildon2/ui/modest-msg-edit-window-ui.xml @@ -33,24 +33,14 @@ - - - - - - - - - - @@ -60,21 +50,17 @@ - - - - - + + - @@ -88,8 +74,6 @@ - - diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index ae37a1b..8ca7157 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -203,11 +203,11 @@ remote_folder_has_leave_on_server (TnyFolderStore *folder) gboolean modest_ui_actions_run_account_setup_wizard (ModestWindow *win) { - gboolean result = FALSE; + gboolean result = FALSE; GtkWindow *wizard; gint dialog_response; - /* there is no such wizard yet */ + /* there is no such wizard yet */ wizard = GTK_WINDOW (modest_platform_get_account_settings_wizard ()); modest_window_mgr_set_modal (modest_runtime_get_window_mgr(), GTK_WINDOW (wizard), (GtkWindow *) win); @@ -217,7 +217,7 @@ modest_ui_actions_run_account_setup_wizard (ModestWindow *win) if (!win) win = modest_window_mgr_get_main_window (modest_runtime_get_window_mgr(), TRUE); /* create if not existent */ - + gtk_window_set_transient_for (GTK_WINDOW (wizard), GTK_WINDOW (win)); /* make sure the mainwindow is visible. We need to present the @@ -231,7 +231,7 @@ modest_ui_actions_run_account_setup_wizard (ModestWindow *win) gtk_window_present (GTK_WINDOW (win)); gtk_window_present (GTK_WINDOW (wizard)); #endif - + dialog_response = gtk_dialog_run (GTK_DIALOG (wizard)); gtk_widget_destroy (GTK_WIDGET (wizard)); if (gtk_events_pending ()) diff --git a/src/widgets/modest-msg-edit-window-ui.h b/src/widgets/modest-msg-edit-window-ui.h index e292a6c..0035813 100644 --- a/src/widgets/modest-msg-edit-window-ui.h +++ b/src/widgets/modest-msg-edit-window-ui.h @@ -56,19 +56,17 @@ static const GtkActionEntry modest_msg_edit_action_entries [] = { { "ActionsSaveToDrafts", NULL, N_("mcen_me_editor_save_as_draft"), "S", NULL, G_CALLBACK (modest_ui_actions_on_save_to_drafts) }, { "ActionsDelete", NULL, N_("mcen_me_inbox_delete"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_delete_message) }, { "ActionsSend", NULL, N_("mcen_me_editor_send"), "KP_Enter", NULL, G_CALLBACK (modest_ui_actions_on_send) }, -/* { "ActionsFontColor", GTK_STOCK_SELECT_COLOR, N_("Color"), NULL, N_("Change text color"), G_CALLBACK (modest_ui_actions_on_select_editor_color)}, */ -/* { "BackgroundColor", GTK_STOCK_SELECT_COLOR, N_("Background color"), NULL, N_("Change background color"), G_CALLBACK (modest_ui_actions_on_select_editor_background_color)}, */ { "InsertImage", NULL, N_("mcen_me_editor_attach_inlineimage"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_insert_image)}, +#ifndef MODEST_TOOLKIT_HILDON2 { "AttachFile", NULL, N_("mcen_me_editor_attachfile"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_attach_file)}, +#endif { "RemoveAttachments", NULL, N_("mcen_me_inbox_remove_attachments"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_remove_attachments) }, { "Undo", NULL, N_("mcen_me_inbox_undo"), "Z", NULL, G_CALLBACK (modest_ui_actions_on_undo)}, { "Redo", NULL, N_("mcen_me_inbox_redo"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_redo)}, - { "Cut", NULL, N_("mcen_me_inbox_cut"), "X", NULL, G_CALLBACK (modest_ui_actions_on_cut)}, - { "Copy", NULL, N_("mcen_me_inbox_copy"), "C", NULL, G_CALLBACK (modest_ui_actions_on_copy)}, - { "Paste", NULL, N_("mcen_me_inbox_paste"), "V", NULL, G_CALLBACK (modest_ui_actions_on_paste)}, - { "SelectAll", NULL, N_("mcen_me_viewer_selectall"), "A", NULL, G_CALLBACK (modest_ui_actions_on_select_all)}, { "SelectFont", NULL, N_("mcen_me_editor_font"), NULL, NULL, G_CALLBACK (modest_ui_actions_msg_edit_on_select_font)}, +#ifndef MODEST_TOOLKIT_HILDON2 { "SelectContacts", NULL, N_("mcen_me_editor_selectrecipients"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_select_contacts)}, +#endif { "CheckNames", NULL, N_("mcen_me_editor_checknames"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_check_names)}, { "CloseWindow", NULL, N_("mcen_me_inbox_close_window"), "W", NULL, G_CALLBACK (modest_ui_actions_on_close_window)}, { "CloseAllWindows", NULL, N_("mcen_me_inbox_close_windows"), "Q", NULL, G_CALLBACK (modest_ui_actions_on_quit) },