* Replaced the "+" toolbar icon with the "New message" icon
authorSergio Villar Senin <svillar@igalia.com>
Mon, 28 Jan 2008 09:58:23 +0000 (09:58 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Mon, 28 Jan 2008 09:58:23 +0000 (09:58 +0000)
* Replaced behaviour of "+" icon, now it only creates new messages

pmo-trunk-r4094

src/maemo/modest-icon-names.h
src/maemo/modest-main-window-ui-dimming.h
src/maemo/modest-main-window-ui.h
src/modest-ui-actions.c
src/modest-ui-dimming-rules.c

index a6ff248..3f4a7a8 100644 (file)
@@ -78,7 +78,7 @@
 
 /* toolbar */
 #define  MODEST_TOOLBAR_ICON_MAIL_SEND         "qgn_list_messagin_sent"
 
 /* toolbar */
 #define  MODEST_TOOLBAR_ICON_MAIL_SEND         "qgn_list_messagin_sent"
-#define  MODEST_TOOLBAR_ICON_NEW_MAIL          "qgn_toolb_messagin_new"
+#define  MODEST_TOOLBAR_ICON_NEW_MAIL          "qgn_list_messagin_editor"
 #define  MODEST_TOOLBAR_ICON_SEND_RECEIVE      "qgn_toolb_messagin_sendreceive"
 #define  MODEST_TOOLBAR_ICON_REPLY             "qgn_toolb_messagin_reply"
 #define  MODEST_TOOLBAR_ICON_REPLY_ALL         "qgn_toolb_messagin_replytoall"
 #define  MODEST_TOOLBAR_ICON_SEND_RECEIVE      "qgn_toolb_messagin_sendreceive"
 #define  MODEST_TOOLBAR_ICON_REPLY             "qgn_toolb_messagin_reply"
 #define  MODEST_TOOLBAR_ICON_REPLY_ALL         "qgn_toolb_messagin_replytoall"
index ad3f67b..ab3e2d6 100644 (file)
@@ -115,7 +115,7 @@ static const ModestDimmingEntry modest_main_window_menu_dimming_entries [] = {
 static const ModestDimmingEntry modest_main_window_toolbar_dimming_entries [] = {
 
        /* Toolbar */
 static const ModestDimmingEntry modest_main_window_toolbar_dimming_entries [] = {
 
        /* Toolbar */
-       { "/ToolBar/ToolbarMessageNew", G_CALLBACK(modest_ui_dimming_rules_on_new_msg_or_folder) },
+       { "/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 },
        { "/ToolBar/ToolbarMessageReply", G_CALLBACK(modest_ui_dimming_rules_on_reply_msg) },
        { "/ToolBar/ToolbarDeleteMessage", G_CALLBACK(modest_ui_dimming_rules_on_delete) },
        { "/ToolBar/ToolbarToggleView", NULL },
index 17a7f31..7e8cc74 100644 (file)
@@ -112,7 +112,7 @@ static const GtkActionEntry modest_action_entries [] = {
         * but we need to specificy them differently, they have icons for example
         */
        /* Headers Toolbar */
         * but we need to specificy them differently, they have icons for example
         */
        /* Headers Toolbar */
-       { "ToolbarMessageNew",        MODEST_STOCK_NEW_MAIL,     N_("qgn_toolb_messagin_new"), NULL, NULL,  G_CALLBACK (modest_ui_actions_on_new_msg_or_folder) },
+       { "ToolbarMessageNew",        MODEST_STOCK_NEW_MAIL,     N_("qgn_toolb_messagin_new"), NULL, NULL,  G_CALLBACK (modest_ui_actions_on_new_msg) },
        { "ToolbarMessageReply",      MODEST_STOCK_REPLY,     N_("mcen_me_inbox_reply"),      "<CTRL>R", NULL,  G_CALLBACK (modest_ui_actions_on_reply) },
        { "ToolbarMessageReplyAll",   MODEST_STOCK_REPLY_ALL,     N_("mcen_me_inbox_replytoall"),         NULL, NULL,  G_CALLBACK (modest_ui_actions_on_reply_all) },
        { "ToolbarMessageForward",    MODEST_STOCK_FORWARD,     N_("mcen_me_inbox_forward"),      NULL, NULL,  G_CALLBACK (modest_ui_actions_on_forward) },
        { "ToolbarMessageReply",      MODEST_STOCK_REPLY,     N_("mcen_me_inbox_reply"),      "<CTRL>R", NULL,  G_CALLBACK (modest_ui_actions_on_reply) },
        { "ToolbarMessageReplyAll",   MODEST_STOCK_REPLY_ALL,     N_("mcen_me_inbox_replytoall"),         NULL, NULL,  G_CALLBACK (modest_ui_actions_on_reply_all) },
        { "ToolbarMessageForward",    MODEST_STOCK_FORWARD,     N_("mcen_me_inbox_forward"),      NULL, NULL,  G_CALLBACK (modest_ui_actions_on_forward) },
index 664e742..816e9be 100644 (file)
@@ -598,8 +598,6 @@ modest_ui_actions_on_delete_message_or_folder (GtkAction *action, ModestWindow *
        modest_ui_actions_on_delete_message (action, win);
 }
 
        modest_ui_actions_on_delete_message (action, win);
 }
 
-
-
 void
 modest_ui_actions_on_quit (GtkAction *action, ModestWindow *win)
 {      
 void
 modest_ui_actions_on_quit (GtkAction *action, ModestWindow *win)
 {      
@@ -814,25 +812,6 @@ modest_ui_actions_on_new_msg (GtkAction *action, ModestWindow *win)
        modest_ui_actions_compose_msg(win, NULL, NULL, NULL, NULL, NULL, NULL);
 }
 
        modest_ui_actions_compose_msg(win, NULL, NULL, NULL, NULL, NULL, NULL);
 }
 
-void
-modest_ui_actions_on_new_msg_or_folder (GtkAction *action, ModestWindow *win)
-{
-       g_return_if_fail (MODEST_IS_WINDOW (win));
-
-       /* Check first if the folder view has the focus */
-       if (MODEST_IS_MAIN_WINDOW (win)) {
-               GtkWidget *w;
-               w = modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (win),
-                                                        MODEST_MAIN_WINDOW_WIDGET_TYPE_FOLDER_VIEW);
-               if (gtk_widget_is_focus (w)) {
-                       modest_ui_actions_on_new_folder (action, MODEST_MAIN_WINDOW(win));
-                       return;
-               }
-       }
-
-       modest_ui_actions_on_new_msg (action, win);
-}
-
 
 gboolean 
 modest_ui_actions_msg_retrieval_check (ModestMailOperation *mail_op,
 
 gboolean 
 modest_ui_actions_msg_retrieval_check (ModestMailOperation *mail_op,
index 3bf7ae1..4050548 100644 (file)
@@ -320,30 +320,6 @@ modest_ui_dimming_rules_define_dimming_state (ModestWindow *window)
 }
 
 gboolean 
 }
 
 gboolean 
-modest_ui_dimming_rules_on_new_msg_or_folder (ModestWindow *win, 
-                                             gpointer user_data)
-{
-       GtkWidget *folder_view;
-
-       g_return_val_if_fail (MODEST_IS_MAIN_WINDOW (win), FALSE);
-
-       /* Check first if the folder view has the focus */
-       folder_view = modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (win),
-                                                          MODEST_MAIN_WINDOW_WIDGET_TYPE_FOLDER_VIEW);
-
-       /* Check that the widget exists */
-       if (folder_view) {
-               if (gtk_widget_is_focus (folder_view)) {
-                       return modest_ui_dimming_rules_on_new_folder (win, user_data);
-               } else {
-                       return modest_ui_dimming_rules_on_new_msg (win, user_data);
-               }
-       } else {
-               return FALSE;
-       }
-}
-
-gboolean 
 modest_ui_dimming_rules_on_new_msg (ModestWindow *win, gpointer user_data)
 {
        ModestDimmingRule *rule = NULL;
 modest_ui_dimming_rules_on_new_msg (ModestWindow *win, gpointer user_data)
 {
        ModestDimmingRule *rule = NULL;