Commit 63c825f
new keybindings
Changed files (5)
modifiedsrc/KeyBindings.valamodifiedsrc/MenuTab.valamodifiedsrc/OpenFontFormatWriter.valamodifiedsrc/Preview.valamodifiedsrc/Toolbox.vala
Diff
@@ -116,7 +116,7 @@ class ShowPreview : ShortCut { } public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return ','; } + public override uint get_default_key () { return 'p'; } public override unowned string get_description () { return "Preview"; } } @@ -185,9 +185,7 @@ foreach (Font font in recent_fonts) { c.append ("<div class=\"one_line\">"); c.append (fn); c.append ("</div>");- - print (@"path_to_uri ((!) Supplement.get_thumbnail_directory ().get_path ()) $(path_to_uri ((!) Supplement.get_thumbnail_directory ().get_path ()))\n");- + c.append ("<img src=\""); c.append (path_to_uri ((!) Supplement.get_thumbnail_directory ().get_path ())); c.append ("/");@@ -634,10 +634,6 @@ class LocaTable : Table { int i = 0; foreach (uint32 o in glyf_table.location_offsets) { - if (i != 0 && (o - prev) == 0) { - warning (@"gid $i is empty in loca table"); - } - if (i != 0 && (o - prev) % 4 != 0) { warning (@"glyph length is not a multiple of four in gid $i"); } @@ -35,33 +35,35 @@ class Preview : FontDisplay { bool b = false; public override void selected_canvas () {- WebView w = MainWindow.get_webview (); string uri = get_uri (); ExportTool.export_all ();- + w.open (uri);- w.reload_bypass_cache ();- + w.reload_bypass_cache (); + // this is a hack forces webkit to reload the font and ignore cached data // it's only required on windows platform and in wine + //+ // it would be nice to get remove it. if (Supplement.win32) {- TimeoutSource idle = new TimeoutSource (0);- idle.set_callback(() => {+ TimeoutSource t1 = new TimeoutSource (300);+ t1.set_callback (() => { File layout_dir = FontDisplay.find_layout_dir (); File layout_uri = layout_dir.get_child (get_html_file ());- w.load_html_string ("", path_to_uri ((!) layout_uri.get_path ()));+ w.load_html_string ("<html><body>Loading ...</body></html>", uri); return false; });- idle.attach (null);+ t1.attach (null); - TimeoutSource idle2 = new TimeoutSource (500);- idle2.set_callback(() => {+ TimeoutSource t2 = new TimeoutSource (1000);+ t2.set_callback (() => { w.load_uri (get_uri ());+ w.reload_bypass_cache (); return false; });- idle2.attach (null);+ t2.attach (null); } } @@ -352,7 +352,7 @@ class Toolbox : DrawingArea { }); view_tools.add_tool (zoom_bg); - Tool zoom_prev = new Tool ("prev", "previous view", 'p', CTRL);+ Tool zoom_prev = new Tool ("prev", "previous view", 'j', CTRL); zoom_prev.select_action.connect((self) => { zoom_tool.previous_view (); });