static gchar *compose_quote_fmt (Compose *compose,
MsgInfo *msginfo,
const gchar *fmt,
- const gchar *qmark);
+ const gchar *qmark,
+ const gchar *seltext);
static void compose_reply_set_entry (Compose *compose,
MsgInfo *msginfo,
static void compose_generic_reply(MsgInfo *msginfo, gboolean quote,
gboolean to_all,
gboolean ignore_replyto,
- gboolean followup_and_reply_to);
+ gboolean followup_and_reply_to,
+ const gchar *seltext);
void compose_headerentry_changed_cb (GtkWidget *entry,
ComposeHeaderEntry *headerentry);
msginfo->subject);
gtk_editable_set_editable(GTK_EDITABLE(c->subject_entry), FALSE);
- compose_quote_fmt(c, msginfo, "%M", NULL);
+ compose_quote_fmt(c, msginfo, "%M", NULL, NULL);
gtk_editable_set_editable(GTK_EDITABLE(c->text), FALSE);
ifactory = gtk_item_factory_from_widget(c->popupmenu);
*/
void compose_reply(MsgInfo *msginfo, gboolean quote, gboolean to_all,
- gboolean ignore_replyto)
+ gboolean ignore_replyto, const gchar *seltext)
{
- compose_generic_reply(msginfo, quote, to_all, ignore_replyto, FALSE);
+ compose_generic_reply(msginfo, quote, to_all, ignore_replyto, FALSE,
+ seltext);
}
void compose_followup_and_reply_to(MsgInfo *msginfo, gboolean quote,
gboolean to_all,
- gboolean ignore_replyto)
+ gboolean ignore_replyto,
+ const gchar *seltext)
{
- compose_generic_reply(msginfo, quote, to_all, ignore_replyto, TRUE);
+ compose_generic_reply(msginfo, quote, to_all, ignore_replyto, TRUE,
+ seltext);
}
static void compose_generic_reply(MsgInfo *msginfo, gboolean quote,
gboolean to_all,
gboolean ignore_replyto,
- gboolean followup_and_reply_to)
+ gboolean followup_and_reply_to,
+ const gchar *seltext)
{
Compose *compose;
PrefsAccount *account;
quote_str = compose_quote_fmt(compose, msginfo,
prefs_common.quotefmt,
- qmark);
+ qmark, seltext);
}
if (prefs_common.auto_sig)
gtk_stext_thaw(text);
gtk_widget_grab_focus(compose->text);
- if (prefs_common.auto_exteditor)
+ if (prefs_common.auto_exteditor)
compose_exec_ext_editor(compose);
}
}
Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo,
- gboolean as_attach)
+ gboolean as_attach, const gchar *seltext)
{
Compose *compose;
/* PrefsAccount *account; */
qmark = "> ";
quote_str = compose_quote_fmt(compose, msginfo,
- prefs_common.fw_quotefmt, qmark);
+ prefs_common.fw_quotefmt, qmark,
+ seltext);
compose_attach_parts(compose, msginfo);
}
}
static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
- const gchar *fmt, const gchar *qmark)
+ const gchar *fmt, const gchar *qmark,
+ const gchar *seltext)
{
GtkSText *text = GTK_STEXT(compose->text);
gchar *quote_str = NULL;
gint len;
if (qmark != NULL) {
- quote_fmt_init(msginfo, NULL);
+ quote_fmt_init(msginfo, NULL, NULL);
quote_fmt_scan_string(qmark);
quote_fmt_parse();
}
if (fmt && *fmt != '\0') {
- quote_fmt_init(msginfo, quote_str);
+ quote_fmt_init(msginfo, quote_str, seltext);
quote_fmt_scan_string(fmt);
quote_fmt_parse();
FolderItem *dest;
gchar * path;
- dest = foldersel_folder_sel(NULL, NULL);
+ dest = foldersel_folder_sel(NULL, FOLDER_SEL_COPY, NULL);
if (!dest) return;
path = folder_item_get_identifier(dest);
memset(&dummyinfo, 0, sizeof(MsgInfo));
parsed_str = compose_quote_fmt(compose, &dummyinfo,
- tmpl->value, NULL);
+ tmpl->value, NULL, NULL);
} else {
if (prefs_common.quotemark && *prefs_common.quotemark)
qmark = prefs_common.quotemark;
qmark = "> ";
parsed_str = compose_quote_fmt(compose, compose->replyinfo,
- tmpl->value, qmark);
+ tmpl->value, qmark, NULL);
}
if (parsed_str && prefs_common.auto_sig)