* src/modest-ui-actions.[ch]:
[modest] / src / widgets / modest-msg-edit-window-ui.h
1 /* Copyright (c) 2006, Nokia Corporation
2  * All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  *   notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  *   notice, this list of conditions and the following disclaimer in the
12  *   documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Nokia Corporation nor the names of its
14  *   contributors may be used to endorse or promote products derived from
15  *   this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
18  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
20  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
21  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28  */
29
30 #ifndef __MODEST_MSG_EDIT_WINDOW_UI_H__
31 #define __MODEST_MSG_EDIT_WINDOW_UI_H__
32
33 #include <glib/gi18n.h>
34 #include <gtk/gtk.h>
35 #include "modest-icon-names.h"
36 #include "modest-ui-actions.h"
37
38 G_BEGIN_DECLS
39
40 static const GtkActionEntry modest_msg_edit_action_entries [] = {
41
42         /* Toplevel menus */
43         { "View", NULL, N_("mcen_me_inbox_view") },
44         { "Edit", NULL, N_("mcen_me_inbox_edit") },
45         { "Format", NULL, N_("mcen_me_editor_format") },
46         { "Alignment", NULL, N_("mcen_me_editor_align") },
47         { "Attachments", NULL, N_("mcen_me_viewer_attachments") },
48         { "Zoom", NULL, N_("mcen_me_viewer_zoom") },
49         { "MessagePriority", NULL, N_("mcen_me_editor_message_priority") },
50         { "FileFormat", NULL, N_("mcen_me_editor_file_format") },
51         { "Tools", NULL, N_("mcen_me_inbox_tools") },
52         { "ShowToolbar", NULL, N_("mcen_me_inbox_toolbar") },
53
54         /* ACTIONS */
55         { "ActionsSend", NULL, N_("mcen_me_editor_send"),  NULL, NULL,  G_CALLBACK (modest_ui_actions_on_send) },
56 /*      { "ActionsFontColor", GTK_STOCK_SELECT_COLOR, N_("Color"), NULL, N_("Change text color"), G_CALLBACK (modest_ui_actions_on_select_editor_color)}, */
57 /*      { "BackgroundColor", GTK_STOCK_SELECT_COLOR, N_("Background color"), NULL, N_("Change background color"), G_CALLBACK (modest_ui_actions_on_select_editor_background_color)}, */
58         { "InsertImage", NULL, N_("mcen_me_editor_attach_inlineimage"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_insert_image)},
59         { "Undo", NULL, N_("mcen_me_inbox_undo"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_undo)},
60         { "Cut", NULL, N_("mcen_me_inbox_cut"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_cut)},
61         { "Copy", NULL, N_("mcen_me_inbox_copy"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_copy)},
62         { "Paste", NULL, N_("mcen_me_inbox_paste"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_paste)},
63         { "SelectAll", NULL, N_("mcen_me_viewer_selectall"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_select_all)},
64         { "SelectFont", NULL, N_("mcen_me_editor_font"), NULL, NULL, G_CALLBACK (modest_ui_actions_msg_edit_on_select_font)},
65
66         /* KEY ACCELERATOR ACTIONS */
67         { "ZoomPlus", NULL, N_("Zoom +"), "F7", NULL, G_CALLBACK (modest_ui_actions_on_zoom_plus) },
68         { "ZoomMinus", NULL, N_("Zoom -"), "F8", NULL, G_CALLBACK (modest_ui_actions_on_zoom_minus) },
69         { "ToggleFullscreen", NULL, N_("Toggle fullscreen"), "F6", NULL, G_CALLBACK (modest_ui_actions_on_change_fullscreen) },
70
71         /* TOOLBAR ACTIONS */
72         { "ToolbarSend", MODEST_STOCK_MAIL_SEND, N_("qgn_toolb_messagin_send"),  NULL, NULL,  G_CALLBACK (modest_ui_actions_on_send) },
73
74 };
75
76 static const GtkToggleActionEntry modest_msg_edit_toggle_action_entries [] = {
77
78         /* VIEW */
79         { "ViewCcField",   NULL,    N_("mcen_me_editor_showcc"),  NULL, NULL,  G_CALLBACK (modest_ui_actions_on_toggle_show_cc), TRUE  },
80         { "ViewBccField",  NULL,    N_("mcen_me_editor_showbcc"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_toggle_show_bcc), TRUE },
81
82         /* Fullscreen toggle */
83         { "ViewToggleFullscreen", NULL, N_("mcen_me_inbox_fullscreen"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_toggle_fullscreen), FALSE},
84         /* Toolbar visibility */
85         { "ViewShowToolbarNormalScreen", NULL, N_("mcen_me_inbox_normalview"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_toggle_toolbar), TRUE },
86         { "ViewShowToolbarFullScreen", NULL, N_("mcen_me_inbox_optimizedview"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_toggle_toolbar), TRUE },
87
88         /* Rich text editor functions */
89         { "ActionsBulletedList", NULL, N_("mcen_me_editor_bullets"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_toggle_bullets), FALSE },
90
91         /* Toolbar buttons */
92         { "ActionsBold", GTK_STOCK_BOLD, NULL, NULL, NULL, G_CALLBACK (modest_ui_actions_on_toggle_bold), FALSE },
93         { "ActionsItalics", GTK_STOCK_ITALIC, NULL, NULL, NULL, G_CALLBACK (modest_ui_actions_on_toggle_italics), FALSE },
94
95 };
96
97 static const GtkRadioActionEntry modest_msg_edit_alignment_radio_action_entries [] = {
98         { "AlignmentLeft", NULL, N_("mcen_me_editor_align_left"), NULL, NULL, GTK_JUSTIFY_LEFT },
99         { "AlignmentCenter", NULL, N_("mcen_me_editor_align_centred"), NULL, NULL, GTK_JUSTIFY_CENTER },
100         { "AlignmentRight", NULL, N_("mcen_me_editor_align_right"), NULL, NULL, GTK_JUSTIFY_RIGHT },
101 };
102
103 static const GtkRadioActionEntry modest_msg_edit_zoom_action_entries [] = {
104         { "Zoom50", NULL, N_("mcen_me_viewer_50"), NULL, NULL, 50 },
105         { "Zoom100", NULL, N_("mcen_me_viewer_100"), NULL, NULL, 100 },
106         { "Zoom150", NULL, N_("mcen_me_viewer_150"), NULL, NULL, 150 },
107         { "Zoom200", NULL, N_("mcen_me_viewer_200"), NULL, NULL, 200 }
108 };
109
110 static const GtkRadioActionEntry modest_msg_edit_priority_action_entries [] = {
111         { "MessagePriorityHigh", NULL, N_("mcen_me_editor_priority_high"), NULL, NULL, TNY_HEADER_FLAG_HIGH_PRIORITY },
112         { "MessagePriorityNormal", NULL, N_("mcen_me_editor_priority_normal"), NULL, NULL, TNY_HEADER_FLAG_NORMAL_PRIORITY },
113         { "MessagePriorityLow", NULL, N_("mcen_me_editor_priority_low"), NULL, NULL, TNY_HEADER_FLAG_LOW_PRIORITY },
114 };
115
116 static const GtkRadioActionEntry modest_msg_edit_file_format_action_entries [] = {
117         { "FileFormatPlainText", NULL, N_("mcen_me_editor_plain_text"), NULL, NULL, MODEST_FILE_FORMAT_PLAIN_TEXT },
118         { "FileFormatFormattedText", NULL, N_("mcen_me_editor_formatted_text"), NULL, NULL, MODEST_FILE_FORMAT_FORMATTED_TEXT },
119 };
120
121 G_END_DECLS
122 #endif /* __MODEST_MSG_EDIT_WINDOW_UI_H__ */