Clone in a terminal:
Commit 6adf484
Johan Mattsson - 2013-01-26T15:52:28+00:00
6adf484cede0dce54121585b76d5a8c7d0466693johan.mattsson.m@gmail.com

tooltip for pen on mac

Changed files (4)

Diff

diff --git a/birdfont/Main.vala b/birdfont/Main.valaindex 3cc6186..ab811ca 100644--- a/birdfont/Main.vala+++ b/birdfont/Main.vala@@ -31,7 +31,7 @@ public static int main (string[] arg) { 	string file; 	Supplement.Supplement supplement = new Supplement.Supplement (); 	supplement.init (arg);-	+ 	Gtk.init (ref arg); 	parse_gtk_rc (); diff --git a/libbirdfont/PenTool.vala b/libbirdfont/PenTool.valaindex 2cdd344..90fc487 100644--- a/libbirdfont/PenTool.vala+++ b/libbirdfont/PenTool.vala@@ -53,7 +53,15 @@ public class PenTool : Tool { 	private bool last_selected_is_handle = false; 	 	public PenTool (string name) {-		base (name, _("Right click to add new points, left click to move points") + " " + _("and double click to add new point on path."), ',', CTRL);+		string click_to_add_points;+		+		if (Supplement.mac) {+			click_to_add_points = _("Use left command key + click to add new point ");+		} else {+			click_to_add_points = _("Right click to add new point, left click to move points");+		}		+		+		base (name, click_to_add_points + " " + _("and double click to add new point on path."), ',', CTRL); 		 		tie_icon = Icons.get_icon ("tie_is_active.png"); 		diff --git a/libbirdfont/Supplement.vala b/libbirdfont/Supplement.valaindex e3fd5a4..c949ba9 100644--- a/libbirdfont/Supplement.vala+++ b/libbirdfont/Supplement.vala@@ -28,6 +28,7 @@ public class Supplement { 	internal static bool show_coordinates = false;
 	internal static bool fatal_wanings = false;
 	public static bool win32 = false;
+	public static bool mac = false; 	internal static string exec_path = "";
 
 	internal static Font current_font;
@@ -41,6 +42,11 @@ public class Supplement { 
 		stdout.printf ("birdfont version %s\n", VERSION);
 		stdout.printf ("built on %s\n", BUILD_TIMESTAMP);
+		+#if MAC+		print ("Mac version.\n");+		Supplement.mac = true;+#endif 		
 		init_gettext ();		
 		
diff --git a/libbirdfont/Toolbox.vala b/libbirdfont/Toolbox.valaindex b89e9e7..e6dd938 100644--- a/libbirdfont/Toolbox.vala+++ b/libbirdfont/Toolbox.vala@@ -83,71 +83,6 @@ public class Toolbox : GLib.Object  { 		Tool move_tool = new MoveTool ("move"); 		draw_tools.add_tool (move_tool); -		// Draw tool modifiers-		// DELETE tools:-		-#if MAC-		string click_to_add_points = _("Right click to add new point, left click to move points");-#else -		string click_to_add_points = _("Hold down command key + click to add new point ");-#endif	-		-		Tool new_point = new Tool ("new_point", click_to_add_points + " " + _("and double click to add new point on path"), 'a');-		new_point.select_action.connect ((self) => {-				select_draw_tool ();-			});-		-		// draw_tool_modifiers.add_tool (new_point);--		Tool insert_point_on_path = new Tool ("insert_point_on_path", _("Add new point on path"), 'n');-		insert_point_on_path.select_action.connect ((self) => {-			select_draw_tool ();-			pen_tool.begin_from_new_point_on_path ();-		});-		// draw_tool_modifiers.add_tool (insert_point_on_path);-		-		if (Supplement.experimental) {-			Tool new_point_on_path = new Tool ("new_point_on_path", _("Begin new line from point on path"), 'n');-			new_point_on_path.select_action.connect ((self) => {-					select_draw_tool ();-					pen_tool.begin_from_new_point_on_path ();-				});-			draw_tool_modifiers.add_tool (new_point_on_path);	-		}--		Tool tie_editpoint_tool = new Tool ("tie_point", _("Tie curve handles for selected edit point"), 'w');-		tie_editpoint_tool.select_action.connect ((self) => {-			bool tie;-			-			select_draw_tool ();-			-			foreach (EditPoint ep in PenTool.selected_points) {-				tie = !ep.tie_handles;--				if (tie) {-					ep.process_tied_handle ();-				}--				ep.set_tie_handle (tie);-				-				MainWindow.get_current_glyph ().update_view ();				-			}-		});-		draw_tool_modifiers.add_tool (tie_editpoint_tool);	--		Tool tie_x_or_y = new Tool ("tie_x_or_y", _("Tie coordinates to previous edit point"), 'q');-		tie_x_or_y.select_action.connect((self) => {-			select_draw_tool ();-			PenTool.tie_x_or_y_coordinates = !PenTool.tie_x_or_y_coordinates;-		});-		// Fixa: draw_tool_modifiers.add_tool (tie_x_or_y);	--		Tool erase_tool = new Tool ("erase_tool", _("Delete edit points"));-		erase_tool.select_action.connect((self) => {-			select_draw_tool ();-		});-		// draw_tool_modifiers.add_tool (erase_tool);	- 		// adjust precision 		string precision_value = Preferences.get ("precision"); 		@@ -592,7 +527,6 @@ public class Toolbox : GLib.Object  { 		// Default selection 		var idle = new IdleSource(); 		idle.set_callback (() => {-			new_point.set_selected (true); 			pen_tool.set_selected (true); 			select_draw_tool ();			 			

Contact

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