~ubuntu-branches/debian/stretch/gnome-sushi/stretch

« back to all changes in this revision

Viewing changes to src/js/viewers/html.js

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2015-05-31 15:56:19 UTC
  • mfrom: (0.1.15)
  • Revision ID: package-import@ubuntu.com-20150531155619-n4w9gw76c0etojtn
Tags: 3.16.0-1
* New upstream release.
* Update Build-Depends for the switch to WebKit2 and switch Depends on
  gir1.2-webkit-3.0 to gir1.2-webkit2-4.0.
* Bump Build-Depends on libgtk-3-dev to (>= 3.13.2) as per configure.ac.
* Bump Standards-Version to 3.9.6.
* Bump debhelper compatibility level to 9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
const GtkClutter = imports.gi.GtkClutter;
27
27
const Gtk = imports.gi.Gtk;
28
28
const GLib = imports.gi.GLib;
29
 
const WebKit = imports.gi.WebKit;
 
29
const WebKit = imports.gi.WebKit2;
30
30
const Sushi = imports.gi.Sushi;
31
31
 
32
32
const MimeHandler = imports.ui.mimeHandler;
47
47
        this._file = file;
48
48
        this._callback = callback;
49
49
 
50
 
        this._webView = WebKit.WebView.new();
51
 
        this._scrolledWin = Gtk.ScrolledWindow.new (null, null);
52
 
        this._scrolledWin.add(this._webView);
53
 
        this._scrolledWin.show_all();
 
50
        this._webView = new WebKit.WebView();
 
51
        this._webView.show_all();
54
52
 
55
53
        /* disable the default context menu of the web view */
56
 
        let settings = this._webView.settings;
57
 
        settings.enable_default_context_menu = false;
 
54
        this._webView.connect ("context-menu",
 
55
                               function() {return true;});
58
56
 
59
57
        this._webView.load_uri(file.get_uri());
60
58
 
61
 
        this._actor = new GtkClutter.Actor({ contents: this._scrolledWin });
 
59
        this._actor = new GtkClutter.Actor({ contents: this._webView });
62
60
        this._actor.set_reactive(true);
63
61
 
64
62
        this._callback();
92
90
 
93
91
        return this._toolbarActor;
94
92
    }
95
 
}
 
93
};
96
94
 
97
95
let handler = new MimeHandler.MimeHandler();
98
96
let renderer = new HTMLRenderer();