Clone in a terminal:
Commit b55eb4e
Johan Mattsson - 2014-03-31T18:34:05+00:00
b55eb4e11a9a11c9e32e2236dd1d7d9fdc6e5f08johan.mattsson.m@gmail.com

Run remaining idle events before exiting and a new icon for the freehand tool

Changed files (2)

Diff

diff --git a/icons/track.png b/icons/track.pngindex 65c9098..3963fe9 100644Binary files a/icons/track.png and b/icons/track.png differdiff --git a/libbirdfont/MenuTab.vala b/libbirdfont/MenuTab.valaindex 17e133f..394fe9e 100644--- a/libbirdfont/MenuTab.vala+++ b/libbirdfont/MenuTab.vala@@ -1,5 +1,5 @@ /*-    Copyright (C) 2012 Johan Mattsson+    Copyright (C) 2012, 2014 Johan Mattsson      This library is free software; you can redistribute it and/or modify      it under the terms of the GNU Lesser General Public License as @@ -273,11 +273,13 @@ public class MenuTab : FontDisplay { 		} 		 		dialog.signal_discard.connect (() => {+			ensure_main_loop_is_empty (); 			MainWindow.native_window.quit (); 		});  		dialog.signal_save.connect (() => { 			MenuTab.save ();+			ensure_main_loop_is_empty (); 			MainWindow.native_window.quit (); 		}); 		@@ -287,7 +289,7 @@ public class MenuTab : FontDisplay { 			MainWindow.native_window.set_save_dialog (dialog); 		} 	} -		+	 	public static void show_description () { 		MainWindow.get_tab_bar ().add_unique_tab (new DescriptionTab ()); 	}@@ -379,5 +381,23 @@ public class MenuTab : FontDisplay { 		 		MainWindow.get_tab_bar ().add_unique_tab (new KerningList ()); 	}+	+	private static void ensure_main_loop_is_empty () {+		unowned MainContext context;+		bool acquired;++		context = MainContext.default ();+		acquired = context.acquire ();+		+		if (unlikely (!acquired)) {+			warning ("Failed to acquire main loop.\n");+			return;+		}++		while (context.pending ()) {+			context.iteration (true);+		}+		context.release ();+	} } }

Contact

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