Commit a2a6b0e
document viewer cache settings
Changed files (4)
modifiedsrc/MainWindow.valamodifiedsrc/OverView.valamodifiedsrc/Preview.valamodifiedwin32/wscript
Diff
@@ -68,7 +68,9 @@ public class MainWindow : Gtk.Window { set_size_and_position (); html_canvas = new WebView (); - + WebKit.set_cache_model (CacheModel.DOCUMENT_VIEWER); + html_canvas.get_settings ().enable_default_context_menu = false; + html_canvas.title_changed.connect ((p, s) => { FontDisplay fd = get_current_display (); fd.process_property (s); @@ -90,7 +92,7 @@ public class MainWindow : Gtk.Window { glyph_canvas.set_current_glyph (fd); n = fd.is_html_canvas (); - if (n) { + if (n) { layout_dir = FontDisplay.find_layout_dir (); html_box.set_visible (n); glyph_canvas.set_visible (!n); @@ -104,9 +106,11 @@ public class MainWindow : Gtk.Window { if (fd.get_html () == "") { html_canvas.load_uri (uri); + print (@"URI: $uri\n"); + //html_canvas.reload_bypass_cache (); } else { html_canvas.load_html_string (fd.get_html (), uri); - } + } } else { html_box.set_visible (false); glyph_canvas.set_visible (true); @@ -104,15 +104,7 @@ class OverView : FontDisplay { scroll_bottom (); } else { scroll_to (absolute);- }- -/*- if (-0.1 < delta < 0.1) {- scroll_adjustment (pixels);- } else {- scroll_to (absolute);- }-*/ + } redraw_area (0, 0, allocation.width, allocation.height); });@@ -1043,11 +1035,11 @@ class OverView : FontDisplay { } if (unlikely (!done)) {- print (@"No glyph.. \"$c\"\n");- selected = 0;+ MainWindow.get_toolbox ().select_tool_by_name ("custom_character_set");+ warning (@"No glyph \"$c\"\n");+ return; } - //scroll_rows (-1); adjust_scroll (); if (at_bottom ()) {@@ -33,11 +33,13 @@ class Preview : FontDisplay { } public override void selected_canvas () {- ExportTool.export_all ();+ WebView w = MainWindow.get_webview (); string uri = get_uri ();++ ExportTool.export_all (); - MainWindow.get_webview ().load_uri (uri);- MainWindow.get_webview ().reload ();+ w.open (uri);+ w.reload_bypass_cache (); } public override string get_uri () {@@ -138,8 +138,7 @@ RequestExecutionLevel admin ;-------------------------------- -; Pages-+Page components Page directory Page instfiles @@ -169,9 +168,12 @@ Section "Birdfont (required)" SectionEnd -; Optional section (can be disabled by the user) Section "Start Menu Shortcuts"- CreateDirectory "$SMPROGRAMS\Birdfont" ++ CreateDirectory "$SMPROGRAMS\Birdfont"+ CreateShortCut "$SMPROGRAMS\Birdfont\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0+ CreateShortCut "$SMPROGRAMS\Birdfont\Birdfont.lnk" "$INSTDIR\birdfont.exe" "" "$INSTDIR\birdfont.exe" 0+ SectionEnd ;--------------------------------@@ -183,15 +185,18 @@ Section "Uninstall" ; Remove registry keys DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Birdfont" DeleteRegKey HKLM SOFTWARE\NSIS_Birdfont+ """) remove_files ('.', f) f.write("""- ; Remove shortcuts, if any++ Delete $INSTDIR\uninstall.exe+ RMDir "$INSTDIR\Birdfont"+ Delete "$SMPROGRAMS\Birdfont\*.*" - ; Remove directories used RMDir "$SMPROGRAMS\Birdfont" SectionEnd@@ -250,7 +255,7 @@ def copy_runtime_dependencies (bld): MINGW = "/usr/i686-w64-mingw32/sys-root/mingw" MINGW_BIN = MINGW + "/bin" - bld(rule="cp birdfont.exe supplement/")+ bld(rule="mv birdfont.exe supplement/", depends_on='mingw link') bld(rule="cp ../README supplement/") bld(rule="cp ../COPYING supplement/") bld(rule="cp ../NEWS supplement/")