From cf9c1a366b1424ee55e621302c5cba02803832a8 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Thu, 16 Aug 2012 10:46:42 +0200 Subject: Port save as to WebKit2 Use webkit_web_view_save() API for HTML pages that saves the web page into a MHTML file. For any other MIME types supported by the web view, save the main resource data to a file. https://bugzilla.gnome.org/show_bug.cgi?id=679368 --- src/window-commands.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/window-commands.c') diff --git a/src/window-commands.c b/src/window-commands.c index c1e1d78c6..0a6c464cf 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -302,8 +302,12 @@ get_suggested_filename (EphyWebView *view) if ((g_ascii_strncasecmp (mimetype, "text/html", 9)) == 0) { - /* Web Title will be used as suggested filename*/ + /* Web Title will be used as suggested filename */ +#ifdef HAVE_WEBKIT2 + suggested_filename = g_strconcat (ephy_web_view_get_title (view), ".mhtml", NULL); +#else suggested_filename = g_strconcat (ephy_web_view_get_title (view), ".html", NULL); +#endif } else { -- cgit v1.2.3