[epiphany/gnome-3-26] Revert "web-view: Save as MHTML by default"
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-26] Revert "web-view: Save as MHTML by default"
- Date: Mon, 25 Sep 2017 02:29:07 +0000 (UTC)
commit 1ae88fb0db008556394f2ef2812832299f7c2a11
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sun Sep 24 21:25:18 2017 -0500
Revert "web-view: Save as MHTML by default"
This reverts commit 77626e20a6e4c312761e7f75184e26ae17a65552.
Broke saving of plaintext files
https://bugzilla.gnome.org/show_bug.cgi?id=785298
embed/ephy-web-view.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 4301591..f8a47d8 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -3240,7 +3240,6 @@ ephy_web_view_save_main_resource_cb (GFile *file,
(GAsyncReadyCallback)web_resource_get_data_cb,
output_stream);
}
-
/**
* ephy_web_view_save:
* @view: an #EphyWebView
@@ -3258,16 +3257,15 @@ ephy_web_view_save (EphyWebView *view, const char *uri)
file = g_file_new_for_uri (uri);
- if (g_str_has_suffix (uri, ".html")) {
+ if (g_str_has_suffix (uri, ".mhtml"))
+ webkit_web_view_save_to_file (WEBKIT_WEB_VIEW (view), file, WEBKIT_SAVE_MODE_MHTML,
+ NULL, NULL, NULL);
+ else
g_file_replace_async (file, NULL, FALSE,
G_FILE_CREATE_REPLACE_DESTINATION | G_FILE_CREATE_PRIVATE,
G_PRIORITY_DEFAULT, NULL,
(GAsyncReadyCallback)ephy_web_view_save_main_resource_cb,
view);
- } else {
- webkit_web_view_save_to_file (WEBKIT_WEB_VIEW (view), file, WEBKIT_SAVE_MODE_MHTML,
- NULL, NULL, NULL);
- }
g_object_unref (file);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]