Commit c3304e5
remove some javascript callbacks
Changed files (5)
modifiedlayout/supplement.jsmodifiedsrc/ExportTool.valamodifiedsrc/KeyBindings.valamodifiedsrc/MenuTab.valamodifiedsrc/Preview.vala
Diff
@@ -4,26 +4,6 @@ function call (command) { } function update_export_settings () {-- var mess = 'export_svg:';- - var cb = document.getElementById('svg');- - if(cb.checked) {- mess += 'true';- } else {- mess += 'false';- }- call (mess);- - mess = 'export_ttf:'; - if(document.getElementById('ttf').checked) {- mess += 'true';- } else {- mess += 'false';- }- call (mess);- mess = 'export_name:'; mess += document.getElementById('fontname').value; call (mess);@@ -209,13 +209,16 @@ os.put_string ( @font-face { font-family: '"""); os.put_string (@"$(name)"); os.put_string ("""TTF'; src: url('"""); os.put_string (@"$(name).ttf"); os.put_string ("""') format('truetype');- } """);+ } + """); os.put_string (""" @font-face { font-family: '"""); os.put_string (@"$(name)"); os.put_string ("""EOT'; src: url('"""); os.put_string (@"$(name).eot"); os.put_string ("""');- } """);+ } + + """); os.put_string (""" h1 {@@ -446,7 +449,7 @@ os.put_string ( return false; } - status (@"Wrote $file_name");+ status (@"Wrote font files"); return true; } @@ -99,7 +99,8 @@ class BindingList { new NewFile (), new Load (), new ShowKerningContext (),- new ShowPreview ()+ new ShowPreview (),+ new ExportFonts () }; nc = default_bindings;@@ -26,18 +26,6 @@ class MenuTab : FontDisplay { public MenuTab () { // html callbacks:- add_html_callback ("export_svg", (val) => {- Font f = Supplement.get_current_font ();- f.set_svg_export (bool.parse (val));- f.touch ();- });- - add_html_callback ("export_ttf", (val) => {- Font f = Supplement.get_current_font ();- f.set_ttf_export (bool.parse (val));- f.touch ();- });- add_html_callback ("export_name", (val) => { Font f = Supplement.get_current_font (); f.set_name (val);@@ -53,7 +41,6 @@ class MenuTab : FontDisplay { }); add_html_callback ("load", (val) => {- print (@"Load: $val\n"); load_font (val); }); @@ -37,15 +37,16 @@ class Preview : FontDisplay { string uri = get_uri (); File new_dest; - ExportTool.export_svg_font ();+ // ExportTool.export_svg_font (); windows requires all fonts to be available+ ExportTool.export_all (); w.open (uri); w.reload_bypass_cache (); - // this is a hack forces webkit to reload the font and ignore cached data+ // this 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.+ // it would be nice to remove it. if (Supplement.win32) { TimeoutSource t1 = new TimeoutSource (300); t1.set_callback (() => {