* Review dimming rules to detect when modest is sedning mails.
[modest] / src / maemo / modest-main-window-ui-dimming.h
index 24f5cc1..60a338f 100644 (file)
@@ -1,3 +1,33 @@
+/* Copyright (c) 2006, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ *   contributors may be used to endorse or promote products derived from
+ *   this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
 #ifndef __MODEST_MAIN_WINDOW_UI_DIMMING_PRIV_H__
 #define __MODEST_MAIN_WINDOW_UI_DIMMING_PRIV_H__
 
@@ -12,7 +42,7 @@ static const ModestDimmingEntry modest_main_window_menu_dimming_entries [] = {
 
        /* Email Menu */
        { "/MenuBar/EmailMenu/EmailNewMainMenu", NULL },
-       { "/MenuBar/EmailMenu/EmailNewMainMenu/EmailNewMessageMenu", 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) },
@@ -20,6 +50,7 @@ static const ModestDimmingEntry modest_main_window_menu_dimming_entries [] = {
        { "/MenuBar/EmailMenu/EmailForwardMenu",  G_CALLBACK(modest_ui_dimming_rules_on_reply_msg) },
        { "/MenuBar/EmailMenu/EmailContentsMenu", G_CALLBACK(modest_ui_dimming_rules_on_contents_msg) },
        { "/MenuBar/EmailMenu/EmailPurgeAttachmentsMenu", G_CALLBACK(modest_ui_dimming_rules_on_remove_attachments) },
+       { "/MenuBar/EmailMenu/EmailRenameMenu",  G_CALLBACK(modest_ui_dimming_rules_on_rename_folder) },
        { "/MenuBar/EmailMenu/EmailDeleteMenu",  G_CALLBACK(modest_ui_dimming_rules_on_delete) },
        { "/MenuBar/EmailMenu/EmailDetailsMenu", G_CALLBACK(modest_ui_dimming_rules_on_details) },
 
@@ -27,7 +58,7 @@ static const ModestDimmingEntry modest_main_window_menu_dimming_entries [] = {
        { "/MenuBar/EditMenu", NULL },
        { "/MenuBar/EditMenu/EditCutMenu", G_CALLBACK(modest_ui_dimming_rules_on_cut) },
        { "/MenuBar/EditMenu/EditCopyMenu", G_CALLBACK(modest_ui_dimming_rules_on_copy) },
-       { "/MenuBar/EditMenu/EditPasteMenu", G_CALLBACK(modest_ui_dimming_rules_on_paste_msgs) },
+       { "/MenuBar/EditMenu/EditPasteMenu", G_CALLBACK(modest_ui_dimming_rules_on_paste) },
        { "/MenuBar/EditMenu/EditSelectAllMenu", G_CALLBACK(modest_ui_dimming_rules_on_select_all)},
        { "/MenuBar/EditMenu/EditMarkAsReadMenu", G_CALLBACK(modest_ui_dimming_rules_on_mark_as_read_msg) },
        { "/MenuBar/EditMenu/EditMarkAsUnreadMenu", G_CALLBACK(modest_ui_dimming_rules_on_mark_as_unread_msg) },
@@ -66,15 +97,15 @@ static const ModestDimmingEntry modest_main_window_menu_dimming_entries [] = {
        { "/HeaderViewCSM/HeaderViewCSMForward", G_CALLBACK(modest_ui_dimming_rules_on_reply_msg) },
        { "/HeaderViewCSM/HeaderViewCSMCut", NULL },
        { "/HeaderViewCSM/HeaderViewCSMCopy", NULL },
-       { "/HeaderViewCSM/HeaderViewCSMPaste", G_CALLBACK(modest_ui_dimming_rules_on_paste_msgs) },
+       { "/HeaderViewCSM/HeaderViewCSMPaste", G_CALLBACK(modest_ui_dimming_rules_on_paste) },
        { "/HeaderViewCSM/HeaderViewCSMDelete", G_CALLBACK(modest_ui_dimming_rules_on_delete_msg) },
-       { "/HeaderViewCSM/HeaderViewCSMCancelSending", G_CALLBACK(modest_ui_dimming_rules_on_cancel_sending) },
+       { "/HeaderViewCSM/HeaderViewCSMCancelSending", G_CALLBACK(modest_ui_dimming_rules_on_csm_cancel_sending) },
        { "/HeaderViewCSM/HeaderViewCSMHelp", NULL },
 
        /* Contextual Menus (Folder View) */
-       { "/FolderViewCSM/FolderViewCSMNewFolder", G_CALLBACK(modest_ui_dimming_rules_on_csm_new_folder) },
+       { "/FolderViewCSM/FolderViewCSMNewFolder", G_CALLBACK(modest_ui_dimming_rules_on_new_folder) },
        { "/FolderViewCSM/FolderViewCSMRenameFolder", G_CALLBACK(modest_ui_dimming_rules_on_rename_folder) },
-       { "/FolderViewCSM/FolderViewCSMPasteMsgs", G_CALLBACK(modest_ui_dimming_rules_on_paste_msgs) },
+       { "/FolderViewCSM/FolderViewCSMPasteMsgs", G_CALLBACK(modest_ui_dimming_rules_on_paste) },
        { "/FolderViewCSM/FolderViewCSMDeleteFolder", G_CALLBACK(modest_ui_dimming_rules_on_delete_folder) },
        { "/FolderViewCSM/FolderViewCSMSearchMessages", NULL },
        { "/FolderViewCSM/FolderViewCSMHelp", NULL },
@@ -90,7 +121,7 @@ static const ModestDimmingEntry modest_main_window_menu_dimming_entries [] = {
 static const ModestDimmingEntry modest_main_window_toolbar_dimming_entries [] = {
 
        /* Toolbar */
-       { "/ToolBar/ToolbarMessageNew", NULL },
+       { "/ToolBar/ToolbarMessageNew", G_CALLBACK(modest_ui_dimming_rules_on_new_msg) },
        { "/ToolBar/ToolbarMessageReply", G_CALLBACK(modest_ui_dimming_rules_on_reply_msg) },
        { "/ToolBar/ToolbarDeleteMessage", G_CALLBACK(modest_ui_dimming_rules_on_delete) },
        { "/ToolBar/ToolbarToggleView", NULL },