Clone in a terminal:
Commit 85dd509
Johan Mattsson - 2015-05-09T12:23:05+00:00
85dd509039708912e87fa59d25fe2abb21c3dc33johan.mattsson.m@gmail.com

Default character set in glyph selection

Changed files (2)

Diff

diff --git a/libbirdfont/GlyphSelection.vala b/libbirdfont/GlyphSelection.valaindex 3f2c074..19ecf9c 100644--- a/libbirdfont/GlyphSelection.vala+++ b/libbirdfont/GlyphSelection.vala@@ -20,7 +20,17 @@ public class GlyphSelection : OverView {  	public GlyphSelection () { 		base (null, false);-		display_all_available_glyphs ();+		+		if (BirdFont.get_current_font ().length () > 0) {+			display_all_available_glyphs ();+		} else {+			GlyphRange gr = new GlyphRange ();+			DefaultCharacterSet.use_default_range (gr);+			set_glyph_range (gr);+		}++		OverviewTools.update_overview_characterset (this);+		FontDisplay.dirty_scrollbar = true;	 		 		open_glyph_signal.connect ((gc) => { 			selected_glyph (gc);diff --git a/libbirdfont/OverviewTools.vala b/libbirdfont/OverviewTools.valaindex 4dc0cf3..64aa7ea 100644--- a/libbirdfont/OverviewTools.vala+++ b/libbirdfont/OverviewTools.vala@@ -101,11 +101,11 @@ public class OverviewTools : ToolCollection  { 		all_glyphs.select_action (all_glyphs); 	} 	-	public static void update_overview_characterset () {+	public static void update_overview_characterset (OverView? tab = null) { 		GlyphRange gr; 		uint size; 		OverView overview;-		+ 		// All characters 		size = BirdFont.get_current_font ().length (); 		all_glyphs.number = get_display_value (size);@@ -122,7 +122,7 @@ public class OverviewTools : ToolCollection  { 		size = gr.get_length (); 		unicode.number = get_display_value (size); 		-		overview = MainWindow.get_overview ();+		overview = (tab == null) ? MainWindow.get_overview () : (!) tab; 		 		// set selected item 		all_glyphs.set_selected (false);

Contact

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