Clone in a terminal:
Commit 0e052ee
Johan Mattsson - 2014-07-30T21:16:43+00:00
0e052ee320e7024548f859796d26ea68bb07bcb0johan.mattsson.m@gmail.com

Merge branch 'master' of gitorious.org:birdfont/birdfont

Changed files (2)

Diff

diff --git a/configure b/configureindex 3aa9abb..f197457 100755--- a/configure+++ b/configure@@ -46,24 +46,33 @@ def test_library_version (lib): 	process.communicate()[0] 	return process.returncode == 0 -def configure ():+def configure (gtk): 	global gee 	 	if not test_program_version ("valac", 0, 16, 0): 		print (FAIL + "valac is too old." + ENDC) 		exit (1) -	libs = [-			'cairo', -			'gdk-pixbuf-2.0',-			'gio-2.0', -			'glib-2.0', -			'gtk+-2.0',-			'libxml-2.0', -			'webkit-1.0', -			'libsoup-2.4',-			'libnotify'-			]+	if gtk:+		libs = [+				'cairo', +				'gdk-pixbuf-2.0',+				'gio-2.0', +				'glib-2.0', +				'gtk+-2.0',+				'libxml-2.0', +				'webkit-1.0', +				'libsoup-2.4',+				'libnotify'+				]+	else:+		libs = [+				'gdk-pixbuf-2.0',+				'gio-2.0', +				'glib-2.0', +				'libxml-2.0', +				]+	  	for lib in libs: 		if not test_library_version (lib):@@ -89,6 +98,7 @@ parser = OptionParser() parser.add_option("-p", "--prefix", dest="prefix", help="install prefix", metavar="PREFIX") parser.add_option("-d", "--dest", dest="dest", help="install to this directory", metavar="DEST") parser.add_option("-c", "--cc", dest="cc", help="C compiler", metavar="CC")+parser.add_option("-g", "--gtk", dest="gtk", help="Build Gtk version, default is True", metavar="GTK")  (options, args) = parser.parse_args() @@ -98,7 +108,11 @@ if not options.dest: 	options.dest = "" if not options.cc: 	options.cc = "gcc"+if not options.gtk:+	options.gtk = True+if options.gtk == "False":+	options.gtk = False 	-configure ()+configure (options.gtk) configfile.write_config (options.prefix) configfile.write_compile_parameters (options.prefix, options.dest, options.cc, gee)diff --git a/libbirdfont/Preview.vala b/libbirdfont/Preview.valaindex cdbe769..39ea323 100644--- a/libbirdfont/Preview.vala+++ b/libbirdfont/Preview.vala@@ -99,7 +99,7 @@ public class Preview : FontDisplay { 	public static string get_html_with_absolute_paths () {				 		// hack: force webkit to ignore cache in preview	 		StringBuilder sb = new StringBuilder ();-		DataInputStream dis ;+		DataInputStream dis; 		string? line; 			 		uint rid = Random.next_int ();@@ -109,8 +109,6 @@ public class Preview : FontDisplay { 		File f_ttf; 		File f_eot; 		File f_svg;-		File r_ttf;-		File r_svg;  		try { 			dis = new DataInputStream (get_file ().read ());@@ -129,36 +127,16 @@ public class Preview : FontDisplay { 				warning ("SVG file does not exist."); 			} 			-			r_ttf = preview_directory.get_child (@"$(font.get_full_name ())$rid.ttf");-			r_svg = preview_directory.get_child (@"$(font.get_full_name ())$rid.svg");-			-			try {-				if (BirdFont.win32) {-					f_ttf.copy (r_ttf, FileCopyFlags.NONE);-				}-			} catch (Error e) {-				warning (e.message);-				sb.append (@"Error: $(e.message)<br>\n");-				warning ("Failed to copy ttf file.");-			}--			try {-				f_svg.copy (r_svg, FileCopyFlags.NONE);-			} catch (Error e) {-				warning (e.message);-				warning ("Failed to copy svg file.");-			} 			while ((line = dis.read_line (null)) != null) { 				line = ((!) line).replace (@"$(font.get_full_name ()).ttf", @"$(TabContent.path_to_uri ((!) f_ttf.get_path ()))?$rid"); 				line = ((!) line).replace (@"$(font.get_full_name ()).eot", @"$(TabContent.path_to_uri ((!) f_eot.get_path ()))?$rid"); 				line = ((!) line).replace (@"$(font.get_full_name ()).svg", @"$(TabContent.path_to_uri ((!) f_svg.get_path ()))?$rid"); 				sb.append ((!) line); 			}+ 		} catch (Error e) { 			warning (e.message); 			warning ("Failed to load html into canvas.");-			sb.append (@"Error: $(e.message)<br>\n");-			sb.append (@"($((!) get_file ().get_path ()))<br>\n"); 		} 		return sb.str; 	}

Contact

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