The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Default character set in glyph selection

These changes was commited to the Birdfont repository Sat, 09 May 2015 12:23:05 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Sat, 09 May 2015 12:23:05 +0000]

Updated Files

libbirdfont/GlyphSelection.vala
libbirdfont/OverviewTools.vala
--- a/libbirdfont/GlyphSelection.vala +++ b/libbirdfont/GlyphSelection.vala @@ -20,7 +20,17 @@ 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);
--- a/libbirdfont/OverviewTools.vala +++ b/libbirdfont/OverviewTools.vala @@ -101,11 +101,11 @@ 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 @@ 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);