The Birdfont Source Code


All Repositories / birdfont.git / blobdiff – RSS feed

Merge ../birdfont-2.x

Changes made to birdfont/GtkWindow.vala

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
--- birdfont/GtkWindow.vala +++ birdfont/GtkWindow.vala @@ -91,13 +91,11 @@ glyph_canvas_area = new GlyphCanvasArea (MainWindow.glyph_canvas); html_canvas = new WebView (); - WebKit.set_cache_model (CacheModel.DOCUMENT_VIEWER); html_canvas.get_settings ().enable_default_context_menu = false; html_box = new ScrolledWindow (null, null); html_box.set_policy (PolicyType.NEVER, PolicyType.AUTOMATIC); html_box.add (html_canvas); - html_canvas.set_editable (true); MainWindow.get_tab_bar ().signal_tab_selected.connect ((f, tab) => { string uri = ""; @@ -109,8 +107,13 @@ if (fd.get_name () == "Preview") { uri = Preview.get_uri (); html = Preview.get_html_with_absolute_paths (); - - html_canvas.load_html_string (html, uri); + + try { + html_canvas.load_html (html, uri); + } catch (Error e) { + warning (e.message); + warning ("Failed to load html into canvas."); + } // show the webview when loading has finished html_box.set_visible (true);