15e8c7b390a2472dd09f9e9eb69cbcd0901ec8a7
[modest] / src / hildon2 / modest-main-window-ui-dimming.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
31 #ifndef __MODEST_MAIN_WINDOW_UI_DIMMING_PRIV_H__
32 #define __MODEST_MAIN_WINDOW_UI_DIMMING_PRIV_H__
33
34 #include "modest-dimming-rules-group.h"
35 #include "modest-ui-dimming-rules.h"
36
37 G_BEGIN_DECLS
38
39
40 /* Menu Dimming rules entries */
41 static const ModestDimmingEntry modest_main_window_menu_dimming_entries [] = {
42
43         /* Email Menu */
44         { "/MenuBar/EmailMenu/EmailNewFolderMenu", G_CALLBACK(modest_ui_dimming_rules_on_new_folder) },
45         { "/MenuBar/EmailMenu/EmailReplyAllMenu", G_CALLBACK(modest_ui_dimming_rules_on_reply_msg) },
46         { "/MenuBar/EmailMenu/EmailForwardMenu",  G_CALLBACK(modest_ui_dimming_rules_on_reply_msg) },
47         { "/MenuBar/EmailMenu/EmailContentsMenu", G_CALLBACK(modest_ui_dimming_rules_on_contents_msg) },
48         { "/MenuBar/EmailMenu/EmailPurgeAttachmentsMenu", G_CALLBACK(modest_ui_dimming_rules_on_remove_attachments) },
49         { "/MenuBar/EmailMenu/EmailRenameMenu",  G_CALLBACK(modest_ui_dimming_rules_on_rename_folder) },
50         { "/MenuBar/EmailMenu/EmailDetailsMenu", G_CALLBACK(modest_ui_dimming_rules_on_details) },
51
52         /* Edit Menu */
53         { "/MenuBar/EditMenu", NULL },
54         { "/MenuBar/EditMenu/EditSelectAllMenu", G_CALLBACK(modest_ui_dimming_rules_on_select_all)},
55         { "/MenuBar/EditMenu/EditMarkAsReadMenu", G_CALLBACK(modest_ui_dimming_rules_on_mark_as_read_msg) },
56         { "/MenuBar/EditMenu/EditMarkAsUnreadMenu", G_CALLBACK(modest_ui_dimming_rules_on_mark_as_unread_msg) },
57         { "/MenuBar/EditMenu/EditMoveToMenu", G_CALLBACK(modest_ui_dimming_rules_on_move_to) },
58
59         /* Tools Menu */
60         { "/MenuBar/ToolsMenu", NULL },
61         { "/MenuBar/ToolsMenu/ToolsSettingsMenu", NULL },
62         { "/MenuBar/ToolsMenu/ToolsAccountsMenu", NULL },
63         { "/MenuBar/ToolsMenu/ToolsSMTPServersMenu", G_CALLBACK(modest_ui_dimming_rules_on_tools_smtp_servers) },
64         { "/MenuBar/ToolsMenu/ToolsSendReceiveMainMenu", NULL },
65         { "/MenuBar/ToolsMenu/ToolsSendReceiveMainMenu/ToolsSendReceiveAllMenu", G_CALLBACK(modest_ui_dimming_rules_on_send_receive_all) },
66         { "/MenuBar/ToolsMenu/ToolsSendReceiveMainMenu/ToolsSendReceiveCancelSendingMenu", G_CALLBACK(modest_ui_dimming_rules_on_cancel_sending) },
67         { "/MenuBar/ToolsMenu/ToolsContactsMenu", NULL },
68         { "/MenuBar/ToolsMenu/ToolsHelpMenu", NULL },
69
70         /* Close Menu */
71         { "/MenuBar/CloseMenu", NULL },
72         { "/MenuBar/ToolsMenu/CloseWindowMenu", NULL },
73         { "/MenuBar/ToolsMenu/CloseAllWindowsMenu", NULL },
74
75         /* Contextual Menus (Header View) */
76         { "/HeaderViewCSM/HeaderViewCSMOpen", G_CALLBACK(modest_ui_dimming_rules_on_open_msg) },
77         { "/HeaderViewCSM/HeaderViewCSMReply", G_CALLBACK(modest_ui_dimming_rules_on_reply_msg) },
78         { "/HeaderViewCSM/HeaderViewCSMReplyAll", G_CALLBACK(modest_ui_dimming_rules_on_reply_msg) },
79         { "/HeaderViewCSM/HeaderViewCSMForward", G_CALLBACK(modest_ui_dimming_rules_on_reply_msg) },
80         { "/HeaderViewCSM/HeaderViewCSMDelete", G_CALLBACK(modest_ui_dimming_rules_on_delete_msg) },
81         { "/HeaderViewCSM/HeaderViewCSMCancelSending", G_CALLBACK(modest_ui_dimming_rules_on_cancel_sending) },
82         { "/HeaderViewCSM/HeaderViewCSMHelp", NULL },
83
84         /* Contextual Menus (Folder View) */
85         { "/FolderViewCSM/FolderViewCSMNewFolder", G_CALLBACK(modest_ui_dimming_rules_on_new_folder) },
86         { "/FolderViewCSM/FolderViewCSMRenameFolder", G_CALLBACK(modest_ui_dimming_rules_on_rename_folder) },
87         { "/FolderViewCSM/FolderViewCSMPasteMsgs", G_CALLBACK(modest_ui_dimming_rules_on_paste) },
88         { "/FolderViewCSM/FolderViewCSMDeleteFolder", G_CALLBACK(modest_ui_dimming_rules_on_delete_folder) },
89         { "/FolderViewCSM/FolderViewCSMSearchMessages", NULL },
90         { "/FolderViewCSM/FolderViewCSMHelp", NULL },
91
92         /* Contextual Menus (Toolbar) */
93         { "/ToolbarReplyCSM/ToolbarMessageForward", NULL },
94         { "/ToolbarReplyCSM/ToolbarMessageReplyAll", NULL },
95         { "/ToolbarReplyCSM/ToolbarMessageReply", NULL },
96         
97 };
98
99 /* Toolbar Dimming rules entries */
100 static const ModestDimmingEntry modest_main_window_toolbar_dimming_entries [] = {
101
102         /* Toolbar */
103         { "/ToolBar/ToolbarMessageNew", G_CALLBACK(modest_ui_dimming_rules_on_new_msg) },
104         { "/ToolBar/ToolbarMessageReply", G_CALLBACK(modest_ui_dimming_rules_on_reply_msg) },
105         { "/ToolBar/ToolbarDeleteMessage", G_CALLBACK(modest_ui_dimming_rules_on_delete) },
106         { "/ToolBar/ToolbarToggleView", NULL },
107         { "/ToolBar/ToolbarSort", G_CALLBACK(modest_ui_dimming_rules_on_sort) },
108         { "/ToolBar/ToolbarSendReceive", G_CALLBACK(modest_ui_dimming_rules_on_send_receive) },
109         { "/ToolBar/ToolbarCancel", NULL },
110 };
111
112 G_END_DECLS
113 #endif /* __MODEST_MAIN_WINDOW_UI_PRIV_H__ */