Clone in a terminal:
Commit a2a6b0e
Johan Mattsson - 2012-08-31T15:15:06+00:00
a2a6b0e8219a18b10c855e4256460c572410bab5johan.mattsson.m@gmail.com

document viewer cache settings

Changed files (4)

Diff

diff --git a/src/MainWindow.vala b/src/MainWindow.valaindex 0301105..5fc3e5c 100644--- a/src/MainWindow.vala+++ b/src/MainWindow.vala@@ -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);
diff --git a/src/OverView.vala b/src/OverView.valaindex b5df38c..35a9eca 100644--- a/src/OverView.vala+++ b/src/OverView.vala@@ -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 ()) {diff --git a/src/Preview.vala b/src/Preview.valaindex fa3d9db..1d9dfa0 100644--- a/src/Preview.vala+++ b/src/Preview.vala@@ -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 () {diff --git a/win32/wscript b/win32/wscriptindex 0d0a44e..c34e0cd 100644--- a/win32/wscript+++ b/win32/wscript@@ -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/")

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112