|
 |
61119a4 |
diff -uNrp a/nemo-preview/configure.ac b/nemo-preview/configure.ac
|
|
 |
61119a4 |
--- a/nemo-preview/configure.ac
|
|
 |
61119a4 |
+++ b/nemo-preview/configure.ac
|
|
 |
61119a4 |
@@ -72,7 +72,7 @@ PKG_CHECK_MODULES(NEMO_PREVIEW,
|
|
 |
61119a4 |
evince-document-3.0
|
|
 |
61119a4 |
evince-view-3.0
|
|
 |
61119a4 |
gtksourceview-3.0
|
|
 |
61119a4 |
- webkitgtk-3.0)
|
|
 |
61119a4 |
+ webkit2gtk-4.0)
|
|
 |
61119a4 |
|
|
 |
61119a4 |
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
|
|
 |
61119a4 |
AC_SUBST(GLIB_MKENUMS)
|
|
 |
61119a4 |
diff -uNrp a/nemo-preview/src/js/viewers/html.js b/nemo-preview/src/js/viewers/html.js
|
|
 |
61119a4 |
--- a/nemo-preview/src/js/viewers/html.js
|
|
 |
61119a4 |
+++ b/nemo-preview/src/js/viewers/html.js
|
|
 |
61119a4 |
@@ -28,7 +28,7 @@
|
|
 |
61119a4 |
const GtkClutter = imports.gi.GtkClutter;
|
|
 |
61119a4 |
const Gtk = imports.gi.Gtk;
|
|
 |
61119a4 |
const GLib = imports.gi.GLib;
|
|
 |
61119a4 |
-const WebKit = imports.gi.WebKit;
|
|
 |
61119a4 |
+const WebKit = imports.gi.WebKit2;
|
|
 |
61119a4 |
const NemoPreview = imports.gi.NemoPreview;
|
|
 |
61119a4 |
|
|
 |
61119a4 |
const MimeHandler = imports.ui.mimeHandler;
|
|
 |
61119a4 |
@@ -49,18 +49,16 @@ HTMLRenderer.prototype = {
|
|
 |
61119a4 |
this._file = file;
|
|
 |
61119a4 |
this._callback = callback;
|
|
 |
61119a4 |
|
|
 |
61119a4 |
- this._webView = WebKit.WebView.new();
|
|
 |
61119a4 |
- this._scrolledWin = Gtk.ScrolledWindow.new (null, null);
|
|
 |
61119a4 |
- this._scrolledWin.add(this._webView);
|
|
 |
61119a4 |
- this._scrolledWin.show_all();
|
|
 |
61119a4 |
+ this._webView = new WebKit.WebView();
|
|
 |
61119a4 |
+ this._webView.show_all();
|
|
 |
61119a4 |
|
|
 |
61119a4 |
/* disable the default context menu of the web view */
|
|
 |
61119a4 |
- let settings = this._webView.settings;
|
|
 |
61119a4 |
- settings.enable_default_context_menu = false;
|
|
 |
61119a4 |
+ this._webView.connect ("context-menu",
|
|
 |
61119a4 |
+ function() {return true;});
|
|
 |
61119a4 |
|
|
 |
61119a4 |
this._webView.load_uri(file.get_uri());
|
|
 |
61119a4 |
|
|
 |
61119a4 |
- this._actor = new GtkClutter.Actor({ contents: this._scrolledWin });
|
|
 |
61119a4 |
+ this._actor = new GtkClutter.Actor({ contents: this._webView });
|
|
 |
61119a4 |
this._actor.set_reactive(true);
|
|
 |
61119a4 |
|
|
 |
61119a4 |
this._callback();
|
|
 |
61119a4 |
@@ -94,7 +92,7 @@ HTMLRenderer.prototype = {
|
|
 |
61119a4 |
|
|
 |
61119a4 |
return this._toolbarActor;
|
|
 |
61119a4 |
}
|
|
 |
61119a4 |
-}
|
|
 |
61119a4 |
+};
|
|
 |
61119a4 |
|
|
 |
61119a4 |
let handler = new MimeHandler.MimeHandler();
|
|
 |
61119a4 |
let renderer = new HTMLRenderer();
|