static void toolbar_reply_to_all_cb (GtkWidget *widget,
gpointer data);
+static void toolbar_reply_to_list_cb (GtkWidget *widget,
+ gpointer data);
+
static void toolbar_reply_to_sender_cb (GtkWidget *widget,
gpointer data);
(GtkMenuShell *menu_shell,
gpointer data);
+static void toolbar_reply_to_list_popup_cb (GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer data);
+
+static void toolbar_reply_to_list_popup_closed_cb
+ (GtkMenuShell *menu_shell,
+ gpointer data);
+
static void toolbar_reply_to_sender_popup_cb(GtkWidget *widget,
GdkEventButton *event,
gpointer data);
{N_("/Reply to all with _quote"), "<shift>A", reply_cb, COMPOSE_REPLY_TO_ALL_WITH_QUOTE, NULL},
{N_("/_Reply to all without quote"), "a", reply_cb, COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE, NULL}
};
+static GtkItemFactoryEntry replylist_popup_entries[] =
+{
+ {N_("/Reply to list with _quote"), "<shift>A", reply_cb, COMPOSE_REPLY_TO_LIST_WITH_QUOTE, NULL},
+ {N_("/_Reply to list without quote"), "a", reply_cb, COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE, NULL}
+};
static GtkItemFactoryEntry replysender_popup_entries[] =
{
{N_("/Reply to sender with _quote"), NULL, reply_cb, COMPOSE_REPLY_TO_SENDER_WITH_QUOTE, NULL},
NULL);
}
+static void toolbar_reply_to_list_cb(GtkWidget *widget,
+ gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+
+ reply_cb(mainwin,
+ prefs_common.reply_with_quote ? COMPOSE_REPLY_TO_LIST_WITH_QUOTE
+ : COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE,
+ NULL);
+}
static void toolbar_reply_to_sender_cb(GtkWidget *widget,
gpointer data)
manage_window_focus_in(mainwin->window, NULL, NULL);
}
+static void toolbar_reply_to_list_popup_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
+{
+ MainWindow *mainwindow = (MainWindow *) data;
+
+ if (!event) return;
+
+ if (event->button == 3) {
+ gtk_button_set_relief(GTK_BUTTON(widget), GTK_RELIEF_NORMAL);
+ gtk_menu_popup(GTK_MENU(mainwindow->toolbar->replylist_popup), NULL, NULL,
+ menu_button_position, widget,
+ event->button, event->time);
+ }
+}
+
+static void toolbar_reply_to_list_popup_closed_cb(GtkMenuShell *menu_shell, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+
+ gtk_button_set_relief(GTK_BUTTON(mainwin->toolbar->replylist_btn), GTK_RELIEF_NONE);
+ manage_window_focus_in(mainwin->window, NULL, NULL);
+}
+
static void toolbar_reply_to_sender_popup_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
{
MainWindow *mainwindow = (MainWindow *) data;
{ A_REPLY_MESSAGE, toolbar_reply_cb },
{ A_REPLY_SENDER, toolbar_reply_to_sender_cb },
{ A_REPLY_ALL, toolbar_reply_to_all_cb },
+ { A_REPLY_ML, toolbar_reply_to_list_cb },
{ A_FORWARD, toolbar_forward_cb },
{ A_DELETE, toolbar_delete_cb },
{ A_EXECUTE, toolbar_exec_cb },
M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
SET_WIDGET_COND(toolbar->replyall_btn,
M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
+ SET_WIDGET_COND(toolbar->replylist_btn,
+ M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
SET_WIDGET_COND(toolbar->replysender_btn,
M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
SET_WIDGET_COND(toolbar->fwd_btn, M_HAVE_ACCOUNT|M_TARGET_EXIST);
mainwin->toolbar->compose_news_btn = NULL;
mainwin->toolbar->reply_btn = NULL;
mainwin->toolbar->replyall_btn = NULL;
+ mainwin->toolbar->replylist_btn = NULL;
mainwin->toolbar->replysender_btn = NULL;
mainwin->toolbar->fwd_btn = NULL;
mainwin->toolbar->delete_btn = NULL;
guint n_menu_entries;
GtkWidget *reply_popup;
GtkWidget *replyall_popup;
+ GtkWidget *replylist_popup;
GtkWidget *replysender_popup;
GtkWidget *fwd_popup;
GTK_SIGNAL_FUNC(toolbar_reply_to_all_popup_closed_cb), mainwin);
mainwin->toolbar->replyall_popup = replyall_popup;
break;
+ case A_REPLY_ML:
+ mainwin->toolbar->replylist_btn = item;
+ gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips),
+ mainwin->toolbar->replylist_btn,
+ _("Reply to Mailing-list"), NULL);
+ gtk_signal_connect(GTK_OBJECT(mainwin->toolbar->replylist_btn),
+ "button_press_event",
+ GTK_SIGNAL_FUNC(toolbar_reply_to_list_popup_cb),
+ mainwin);
+ n_menu_entries = sizeof(replylist_popup_entries) /
+ sizeof(replylist_popup_entries[0]);
+ replylist_popup = popupmenu_create(mainwin->window,
+ replylist_popup_entries, n_menu_entries,
+ "<ReplyMlPopup>", mainwin);
+ gtk_signal_connect(GTK_OBJECT(replylist_popup), "selection_done",
+ GTK_SIGNAL_FUNC(toolbar_reply_to_list_popup_closed_cb), mainwin);
+ mainwin->toolbar->replylist_popup = replylist_popup;
+ break;
case A_FORWARD:
mainwin->toolbar->fwd_btn = item;
gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips),
{ "A_REPLY_MESSAGE", N_("Reply to Message") },
{ "A_REPLY_SENDER", N_("Reply to Sender") },
{ "A_REPLY_ALL", N_("Reply to All") },
+ { "A_REPLY_ML", N_("Reply to Mailing-list") },
{ "A_FORWARD", N_("Forward Message") },
{ "A_DELETE", N_("Delete Message") },
{ "A_EXECUTE", N_("Execute") },
gint i = 0;
if (source == TOOLBAR_MAIN) {
- gint main_items[12] = { A_RECEIVE_ALL, A_RECEIVE_CUR, A_SEND_QUEUED,
+ gint main_items[13] = { A_RECEIVE_ALL, A_RECEIVE_CUR, A_SEND_QUEUED,
A_COMPOSE_EMAIL, A_REPLY_MESSAGE, A_REPLY_SENDER,
- A_REPLY_ALL, A_FORWARD, A_DELETE,
- A_EXECUTE, A_GOTO_NEXT, A_SYL_ACTIONS };
+ A_REPLY_ALL, A_REPLY_ML, A_FORWARD,
+ A_DELETE, A_EXECUTE, A_GOTO_NEXT,
+ A_SYL_ACTIONS };
for (i = 0; i < sizeof(main_items)/sizeof(main_items[0]); i++)
items = g_list_append(items, toolbar_text[main_items[i]].descr);