Clone in a terminal:
Commit 0bfb5e2
Johan Mattsson - 2015-08-26T17:15:57+00:00
0bfb5e2fd4592ae21423c90173e24e9ceaf2412fjohan.mattsson.m@gmail.com

Select all glyphs in overview tab

Changed files (3)

Diff

diff --git a/libbirdfont/BackgroundImage.vala b/libbirdfont/BackgroundImage.valaindex b1ff2a0..7a01b10 100644--- a/libbirdfont/BackgroundImage.vala+++ b/libbirdfont/BackgroundImage.vala@@ -687,7 +687,6 @@ public class BackgroundImage {  		double trace_resolution = DrawingTools.auto_trace_resolution.get_value (); 		double threshold = DrawingTools.background_threshold.get_value ();-		double simplification = DrawingTools.auto_trace_simplify.get_value (); 		 		thres = (threshold - 0.5) * 255; 		diff --git a/libbirdfont/Menu.vala b/libbirdfont/Menu.valaindex b62b8d8..beea7bd 100644--- a/libbirdfont/Menu.vala+++ b/libbirdfont/Menu.vala@@ -138,6 +138,13 @@ public class Menu : AbstractMenu { 		}); 		edit_menu.items.add (select_all_paths); +		MenuItem select_all_glyphs = add_menu_item (t_("Select All Glyphs"), "select all glyphs", "Overview");+		select_all_glyphs.action.connect (() => {+			MainWindow.get_overview ().select_all_glyphs ();+			show_menu = false;+		});+		edit_menu.items.add (select_all_glyphs);+ 		MenuItem move_to_baseline = add_menu_item (t_("Move To Baseline"), "move to baseline", "Glyph"); 		move_to_baseline.action.connect (() => { 			MenuTab.move_to_baseline ();diff --git a/libbirdfont/OverView.vala b/libbirdfont/OverView.valaindex abb83cb..a0ac1e7 100644--- a/libbirdfont/OverView.vala+++ b/libbirdfont/OverView.vala@@ -1,5 +1,5 @@ /*-    Copyright (C) 2012 2014 Johan Mattsson+    Copyright (C) 2012 2014 2015 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 @@ -125,6 +125,26 @@ public class OverView : FontDisplay { 		update_item_list (); 	} 	+	public void select_all_glyphs () {+		Font f;+		GlyphCollection? glyphs;+		+		f = BirdFont.get_current_font ();+		+		for (int index = 0; index < f.length (); index++) {+			glyphs = f.get_glyph_collection_indice ((uint32) index);+			return_if_fail (glyphs != null);+			+			selected_items.add ((!) glyphs);+		}+		+		foreach (OverViewItem item in visible_items) {+			item.selected = item.glyphs != null;+		}+		+		GlyphCanvas.redraw ();+	}+	 	public void use_default_character_set () { 		GlyphRange gr = new GlyphRange (); 		all_available = false;

Contact

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