Commit 3ae41cb
fix windows webkit issues
Changed files (6)
modifiedsrc/FontDisplay.valamodifiedsrc/Icons.valamodifiedsrc/MainWindow.valamodifiedsrc/MenuTab.valamodifiedsrc/OpenFontFormatWriter.valamodifiedsrc/Preview.vala
Diff
@@ -49,7 +49,7 @@ public abstract class FontDisplay : GLib.Object { } public virtual string get_html_file () {- return "";+ return "index.html"; } public virtual string get_html () {@@ -70,7 +70,7 @@ class Icons { f = find_file ("/usr/share/supplement/icons/", name); if (likely (f.query_exists ())) return f;- + return f; } @@ -82,6 +82,7 @@ public class MainWindow : Gtk.Window { tabs.signal_tab_selected.connect ((f, tab) => { bool n; File layout_dir; + File layout_uri; string uri; FontDisplay fd = tab.get_display (); @@ -96,9 +97,12 @@ public class MainWindow : Gtk.Window { uri = fd.get_uri (); if (uri == "") { - uri = @"file://$((!) layout_dir.get_path ())/$(fd.get_html_file ())"; + layout_uri = layout_dir.get_child (fd.get_html_file ()); + uri = @"file://$((!) layout_uri.get_path ())"; } + print (@"base uri: $uri\n"); + if (fd.get_html () == "") { html_canvas.load_uri (uri); } else { @@ -106,10 +106,6 @@ class MenuTab : FontDisplay { return true; } - public override string get_html_file () {- return "";- }- public override string get_html () { Font f = Supplement.get_current_font (); StringBuilder c = new StringBuilder ();@@ -709,7 +709,6 @@ class GlyfTable : Table { double total_width = 0; int non_zero_glyphs = 0; - Mutex read_lock; int64 next_index = -1; public GlyfTable (LocaTable l) { @@ -717,7 +716,6 @@ class GlyfTable : Table { loca_table = l; location_offsets = new List<uint32> (); glyphs = new List<Glyph> (); - read_lock = new Mutex (); } public int get_gid (string name) { @@ -34,7 +34,8 @@ class Preview : FontDisplay { public override void selected_canvas () { ExportTool.export_all ();- MainWindow.get_webview ().load_uri (get_uri ());+ string uri = get_uri ();+ MainWindow.get_webview ().load_uri (uri); } public override string get_uri () {