Added new command "Reply to author".
[claws.git] / src / mainwindow.c
index bbc87f042fe6d0ed0ad58d3dec3b82cc973fd1b0..2884c3a94f2713c3a208de61af9368ca35b41a5b 100644 (file)
@@ -468,6 +468,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_Message/Compose _new message"),  "<alt>N",       compose_cb, 0, NULL},
        {N_("/_Message/_Reply"),                "<alt>R",       reply_cb, COMPOSE_REPLY, NULL},
        {N_("/_Message/Reply to a_ll"),         "<shift><alt>R", reply_cb, COMPOSE_REPLY_TO_ALL, NULL},
+       {N_("/_Message/Reply to author"),       NULL, reply_cb, COMPOSE_REPLY_TO_AUTHOR, NULL},
        {N_("/_Message/_Forward"),              "<control>F",   reply_cb, COMPOSE_FORWARD, NULL},
        {N_("/_Message/Forward as an a_ttachment"),
                                                "<shift><control>F", reply_cb, COMPOSE_FORWARD_AS_ATTACH, NULL},
@@ -804,6 +805,10 @@ void main_window_reflect_prefs_all(void)
                        gtk_widget_set_sensitive(mainwin->get_btn,    FALSE);
                        gtk_widget_set_sensitive(mainwin->getall_btn, FALSE);
                }
+               if (prefs_common.immediate_exec)
+                       gtk_widget_hide(mainwin->exec_btn);
+               else
+                       gtk_widget_show(mainwin->exec_btn);
 
                summary_change_display_item(mainwin->summaryview);
                summary_redisplay_msg(mainwin->summaryview);
@@ -1059,6 +1064,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin, gint selection)
        menu_set_sensitive(ifactory, "/File/Save as...", sens);
        menu_set_sensitive(ifactory, "/Message/Reply", sens);
        menu_set_sensitive(ifactory, "/Message/Reply to all", sens);
+       menu_set_sensitive(ifactory, "/Message/Reply to author", sens);
        menu_set_sensitive(ifactory, "/Message/Forward", sens);
        menu_set_sensitive(ifactory, "/Message/Forward as an attachment", sens);
        menu_set_sensitive(ifactory, "/Message/Open in new window", sens);
@@ -1339,8 +1345,10 @@ static void main_window_toolbar_create(MainWindow *mainwin,
        GtkWidget *replyall_btn;
        GtkWidget *fwd_btn;
        GtkWidget *send_btn;
+       /*
        GtkWidget *prefs_btn;
        GtkWidget *account_btn;
+       */
        GtkWidget *next_btn;
        GtkWidget *delete_btn;
        GtkWidget *exec_btn;
@@ -1445,6 +1453,7 @@ static void main_window_toolbar_create(MainWindow *mainwin,
                                           toolbar_next_unread_cb,
                                           mainwin);
 
+       /*
        gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
 
        CREATE_TOOLBAR_ICON(stock_preferences_xpm);
@@ -1466,6 +1475,7 @@ static void main_window_toolbar_create(MainWindow *mainwin,
        gtk_signal_connect(GTK_OBJECT(account_btn), "button_press_event",
                           GTK_SIGNAL_FUNC(toolbar_account_button_pressed),
                           mainwin);
+       */
 
        mainwin->toolbar      = toolbar;
        mainwin->get_btn      = get_btn;
@@ -1475,8 +1485,10 @@ static void main_window_toolbar_create(MainWindow *mainwin,
        mainwin->replyall_btn = replyall_btn;
        mainwin->fwd_btn      = fwd_btn;
        mainwin->send_btn     = send_btn;
+       /*
        mainwin->prefs_btn    = prefs_btn;
        mainwin->account_btn  = account_btn;
+       */
        mainwin->next_btn     = next_btn;
        mainwin->delete_btn   = delete_btn;
        mainwin->exec_btn     = exec_btn;
@@ -1843,19 +1855,26 @@ static void reply_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
 
        switch (action) {
        case COMPOSE_REPLY:
-               compose_reply(msginfo, prefs_common.reply_with_quote, FALSE);
+               compose_reply(msginfo, prefs_common.reply_with_quote,
+                             FALSE, FALSE);
                break;
        case COMPOSE_REPLY_TO_ALL:
-               compose_reply(msginfo, prefs_common.reply_with_quote, TRUE);
+               compose_reply(msginfo, prefs_common.reply_with_quote,
+                             TRUE, FALSE);
+               break;
+       case COMPOSE_REPLY_TO_AUTHOR:
+               compose_reply(msginfo, prefs_common.reply_with_quote,
+                             FALSE, TRUE);
                break;
        case COMPOSE_FORWARD:
-               compose_forward(msginfo, FALSE);
+               compose_forward(NULL, msginfo, FALSE);
                break;
        case COMPOSE_FORWARD_AS_ATTACH:
-               compose_forward(msginfo, TRUE);
+               compose_forward(NULL, msginfo, TRUE);
                break;
        default:
-               compose_reply(msginfo, prefs_common.reply_with_quote, FALSE);
+               compose_reply(msginfo, prefs_common.reply_with_quote,
+                             FALSE, FALSE);
        }
 
        summary_set_marks_selected(mainwin->summaryview);