TextView *textview);
static void add_uri_to_addrbook_cb (GtkAction *action,
TextView *textview);
+static void reply_to_uri_cb (GtkAction *action,
+ TextView *textview);
static void mail_to_uri_cb (GtkAction *action,
TextView *textview);
static void copy_mail_to_uri_cb (GtkAction *action,
{
{"TextviewPopupMail", NULL, "TextviewPopupMail" },
{"TextviewPopupMail/Compose", NULL, N_("Compose _new message"), NULL, NULL, G_CALLBACK(mail_to_uri_cb) },
+ {"TextviewPopupMail/ReplyTo", NULL, N_("_Reply to this address"), NULL, NULL, G_CALLBACK(reply_to_uri_cb) },
{"TextviewPopupMail/AddAB", NULL, N_("Add to _Address book"), NULL, NULL, G_CALLBACK(add_uri_to_addrbook_cb) },
{"TextviewPopupMail/Copy", NULL, N_("Copy this add_ress"), NULL, NULL, G_CALLBACK(copy_mail_to_uri_cb) },
};
"/Menus/TextviewPopupLink", "Copy", "TextviewPopupLink/Copy", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(textview->ui_manager,
"/Menus/TextviewPopupMail", "Compose", "TextviewPopupMail/Compose", GTK_UI_MANAGER_MENUITEM)
+ MENUITEM_ADDUI_MANAGER(textview->ui_manager,
+ "/Menus/TextviewPopupMail", "ReplyTo", "TextviewPopupMail/ReplyTo", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(textview->ui_manager,
"/Menus/TextviewPopupMail", "AddAB", "TextviewPopupMail/AddAB", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(textview->ui_manager,
else
pixbuf = gdk_pixbuf_new_from_file(filename, &error);
}
+ if (textview->stop_loading) {
+ return;
+ }
if (error != NULL) {
g_warning("%s\n", error->message);
g_error_free(error);
uri->start = gtk_text_iter_get_offset(&iter);
gtk_text_buffer_insert_pixbuf(buffer, &iter, pixbuf);
-
+ if (textview->stop_loading) {
+ g_free(uri);
+ return;
+ }
uri->end = uri->start + 1;
uri->filename = procmime_get_part_file_name(mimeinfo);
textview->uri_list =
&start_iter, &iter);
} else {
gtk_text_buffer_insert_pixbuf(buffer, &iter, pixbuf);
+ if (textview->stop_loading) {
+ return;
+ }
gtk_text_buffer_insert(buffer, &iter, " ", 1);
}
argv = strsplit_with_quote(buf, " ", 0);
close(1);
close(pfd[0]);
- dup(pfd[1]);
+ rc = dup(pfd[1]);
rc = execvp(argv[0], argv);
close(pfd[1]);
g_print(_("The command to view attachment "
}
return TRUE;
} else if (qlink && bevent->button == 1) {
- textview_toggle_quote(textview, NULL, uri, FALSE);
+ if (prefs_common.hide_quoted)
+ textview_toggle_quote(textview, NULL, uri, FALSE);
return TRUE;
} else if (!g_ascii_strncasecmp(uri->uri, "mailto:", 7)) {
if (bevent->button == 3) {
} else {
PrefsAccount *account = NULL;
FolderItem *folder_item = NULL;
+ Compose *compose;
+
if (textview->messageview && textview->messageview->msginfo &&
textview->messageview->msginfo->folder) {
if (!account)
account = account_find_from_item(folder_item);
}
- compose_new_with_folderitem(account, folder_item, uri->uri + 7);
+ compose = compose_new_with_folderitem(account,
+ folder_item, uri->uri + 7);
+ compose_check_for_email_account(compose);
}
return TRUE;
} else if (g_ascii_strncasecmp(uri->uri, "file:", 5)) {
g_free(fromname);
}
+static void reply_to_uri_cb (GtkAction *action, TextView *textview)
+{
+ ClickableText *uri = g_object_get_data(G_OBJECT(textview->mail_popup_menu),
+ "menu_button");
+ if (!textview->messageview || !uri)
+ return;
+
+ compose_reply_to_address (textview->messageview,
+ textview->messageview->msginfo, uri->uri+7);
+}
+
static void mail_to_uri_cb (GtkAction *action, TextView *textview)
{
PrefsAccount *account = NULL;
+ Compose *compose;
ClickableText *uri = g_object_get_data(G_OBJECT(textview->mail_popup_menu),
"menu_button");
if (uri == NULL)
if (folder_item->prefs && folder_item->prefs->enable_default_account)
account = account_find_from_id(folder_item->prefs->default_account);
- compose_new_with_folderitem(account, folder_item, uri->uri+7);
+ compose = compose_new_with_folderitem(account, folder_item, uri->uri+7);
} else {
- compose_new(account, uri->uri + 7, NULL);
+ compose = compose_new(account, uri->uri + 7, NULL);
}
+ compose_check_for_email_account(compose);
}
static void copy_mail_to_uri_cb (GtkAction *action, TextView *textview)