Clone in a terminal:
Commit 8c11d72
Johan Mattsson - 2015-03-28T19:02:36+00:00
8c11d72b24f3b6071b1a9dab31a538f0a863a4bbjohan.mattsson.m@gmail.com

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

Changed files (2)

Diff

diff --git a/libbirdfont/Font.vala b/libbirdfont/Font.valaindex c36167f..61ec225 100644--- a/libbirdfont/Font.vala+++ b/libbirdfont/Font.vala@@ -678,6 +678,7 @@ public class Font : GLib.Object { 		modified = false; 	} +	/** Number of glyphs in this font. */ 	public uint length () { 		return glyph_name.length (); 	}diff --git a/libbirdfont/RecentFiles.vala b/libbirdfont/RecentFiles.valaindex 24e9cb4..74187fe 100644--- a/libbirdfont/RecentFiles.vala+++ b/libbirdfont/RecentFiles.vala@@ -21,8 +21,9 @@ namespace BirdFont { 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,9 +52,21 @@ public class RecentFiles : Table { 		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")); 			rows.add (row);	

Contact

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