The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Add glyph count and full path to the font file in recent files tab

These changes was commited to the Birdfont repository Sat, 28 Mar 2015 18:51:27 +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, 28 Mar 2015 18:51:27 +0000]

Updated Files

libbirdfont/Font.vala
libbirdfont/RecentFiles.vala
--- a/libbirdfont/Font.vala +++ b/libbirdfont/Font.vala @@ -678,6 +678,7 @@ modified = false; } + /** Number of glyphs in this font. */ public uint length () { return glyph_name.length (); }
--- a/libbirdfont/RecentFiles.vala +++ b/libbirdfont/RecentFiles.vala @@ -21,8 +21,9 @@ public class RecentFiles : Table { Gee.ArrayList<Row> rows = new Gee.ArrayList<Row> (); - const int RECENT_FONT = -2; - const int BACKUP = -3; + const int CURRENT_FONT = -4; + const int RECENT_FONT = -3; + const int BACKUP = -2; public RecentFiles () { } @@ -51,8 +52,20 @@ Row row; Gee.ArrayList<Font> recent_fonts = get_recent_font_files (); Gee.ArrayList<Font> backups = get_backups (); + Font current_font = BirdFont.get_current_font (); rows.clear (); + + if (current_font.font_file != null) { + row = new Row.headline (current_font.get_file_name ()); + rows.add (row); + + row = new Row.columns_1 (t_("Folder") + ": " + (!) current_font.get_folder ().get_path (), CURRENT_FONT, false); + rows.add (row); + + row = new Row.columns_1 (t_("Glyphs") + @": $(current_font.length ())", CURRENT_FONT, false); + rows.add (row); + } if (recent_fonts.size > 0) { row = new Row.headline (t_("Recent Files"));