Clone in a terminal:
Commit 8704191
Johan Mattsson - 2015-05-08T18:02:37+00:00
870419173f31feb701b38b565b1be093a500c650johan.mattsson.m@gmail.com

New key bindings

Changed files (4)

Diff

diff --git a/birdfont/GtkWindow.vala b/birdfont/GtkWindow.valaindex 5fb3f97..21ccd0e 100644--- a/birdfont/GtkWindow.vala+++ b/birdfont/GtkWindow.vala@@ -821,6 +821,8 @@ public class GlyphCanvasArea : DrawingArea  { 		 		add_events (event_flags); +		bool button_down = false;+ 		glyph_canvas.signal_redraw_area.connect ((x, y, w, h) => { 			queue_draw_area ((int)x, (int)y, (int)w, (int)h); 		});@@ -854,6 +856,10 @@ public class GlyphCanvasArea : DrawingArea  { 		button_press_event.connect ((t, e)=> { 			GtkWindow.reset_modifier (e.state); +			if (button_down) {+				warning (@"Button already is down. $(e.button)");+			}+			 			if (e.time < last_press) { 				warning ("Discarding event."); 				return true;@@ -862,7 +868,8 @@ public class GlyphCanvasArea : DrawingArea  { 			last_press = e.time; 			 			if (e.type == EventType.BUTTON_PRESS) {-				TabContent.button_press (e.button, e.x, e.y);	+				TabContent.button_press (e.button, e.x, e.y);+				button_down = true; 			} else if (e.type == EventType.2BUTTON_PRESS) { 				TabContent.double_click (e.button, e.x, e.y); 			}@@ -871,6 +878,10 @@ public class GlyphCanvasArea : DrawingArea  { 		}); 		 		button_release_event.connect ((t, e)=> {+			if (!button_down) {+				warning (@"Button is not down $(e.button)");+			}+			 			if (e.time < last_release) { 				warning ("Discarding event."); 				return true;@@ -879,6 +890,7 @@ public class GlyphCanvasArea : DrawingArea  { 			if (e.type == EventType.BUTTON_RELEASE) { 				TabContent.button_release ((int) e.button, e.x, e.y); 				last_release = e.time;+				button_down = false; 			} 			 			return true;diff --git a/libbirdfont/BezierTool.vala b/libbirdfont/BezierTool.valaindex 17ddbe0..37727f9 100644--- a/libbirdfont/BezierTool.vala+++ b/libbirdfont/BezierTool.vala@@ -151,14 +151,13 @@ public class BezierTool : Tool { 			state = MOVE_POINT; 		} else if (state == MOVE_POINT) { 			if (PenTool.can_join (current_point)) {-				bool clockwise;+				EditPoint first = current_path.get_first_point (); 				bool swap; 				-				clockwise = current_path.is_clockwise (); 				p = PenTool.join_paths (current_point);-				 				return_if_fail (p != null); 				path = (!) p;+				swap = path.get_first_point () != first; 				 				if (current_path.points.size == 1) { 					return_if_fail (path.is_open ());@@ -168,7 +167,6 @@ public class BezierTool : Tool { 				} else { 					g.open_path (); 					current_path = path;-					swap = path.is_clockwise () != clockwise; 					current_point = !swap ? path.get_first_point () : path.get_last_point (); 					state = !swap ? MOVE_LAST_HANDLE_RIGHT : MOVE_LAST_HANDLE_LEFT; 				}diff --git a/libbirdfont/Glyph.vala b/libbirdfont/Glyph.valaindex 72762ce..5fe5e92 100644--- a/libbirdfont/Glyph.vala+++ b/libbirdfont/Glyph.vala@@ -1266,6 +1266,8 @@ public class Glyph : FontDisplay { 		clear_active_paths (); 		GlyphCanvas.redraw (); 		+		MainWindow.set_cursor (NativeWindow.VISIBLE);+		 		return r; 	} diff --git a/resources/key_bindings.xml b/resources/key_bindings.xmlindex d968709..15fb957 100644--- a/resources/key_bindings.xml+++ b/resources/key_bindings.xml@@ -6,6 +6,7 @@ 	<action key="s" ctrl="true" alt="false" command="false" shift="false" action="save" /> 	<action key="S" ctrl="true" alt="false" command="false" shift="true" action="save as" /> 	<action key="e" ctrl="true" alt="false" command="false" shift="false" action="export" />+	<action key="" ctrl="false" alt="false" command="false" shift="false" action="export settings" /> 	<action key="p" ctrl="true" alt="false" command="false" shift="false" action="preview" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="select character set" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="quit" />@@ -21,7 +22,7 @@ 	<action key="i" ctrl="true" alt="false" command="false" shift="false" action="import svg file" /> 	<action key="b" ctrl="true" alt="false" command="false" shift="false" action="import background image" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="simplify path" />-	<action key="c" ctrl="false" alt="false" command="false" shift="false" action="close path" />+	<action key="" ctrl="false" alt="false" command="false" shift="false" action="close path" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="glyph sequence" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="set background glyph" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="remove background glyph" />@@ -48,8 +49,7 @@ 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="save as .bfp" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="settings" /> 	<action key="d" ctrl="true" alt="false" command="false" shift="false" action="name and description" />-	<action key="b" ctrl="false" alt="false" command="false" shift="false" action="foresight" />-	<action key="s" ctrl="false" alt="false" command="false" shift="false" action="bezier_line" />+	<action key="b" ctrl="false" alt="false" command="false" shift="false" action="bezier_tool" /> 	<action key="n" ctrl="false" alt="false" command="false" shift="false" action="pen_tool" /> 	<action key="m" ctrl="false" alt="false" command="false" shift="false" action="point_tool" /> 	<action key="z" ctrl="false" alt="false" command="false" shift="false" action="zoom_tool" />@@ -68,11 +68,11 @@ 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="skew" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="width" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="height" />-	<action key="" ctrl="false" alt="false" command="false" shift="false" action="object_stroke" /> 	<action key="w" ctrl="false" alt="false" command="false" shift="false" action="tie_point" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="symmetric" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="create_line" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="reverse_path" />+	<action key="c" ctrl="false" alt="false" command="false" shift="false" action="close_path" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="move_layer" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="flip_vertical" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="flip_horizontal" />@@ -86,6 +86,9 @@ 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="auto_trace_simplify" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="autotrace" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="delete_background" />+	<action key="" ctrl="false" alt="false" command="false" shift="false" action="apply_stroke" />+	<action key="" ctrl="false" alt="false" command="false" shift="false" action="object_stroke" />+	<action key="" ctrl="false" alt="false" command="false" shift="false" action="stroke_to_outline" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="help_lines" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="show_xheight_helplines" /> 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="background_help_lines" />@@ -112,4 +115,5 @@ 	<action key="" ctrl="false" alt="false" command="false" shift="false" action="select_background" /> 	<action key="+" ctrl="true" alt="false" command="false" shift="false" action="zoom_in" /> 	<action key="-" ctrl="true" alt="false" command="false" shift="false" action="zoom_out" />+	<action key="s" ctrl="false" alt="false" command="false" shift="false" action="bezier_line" /> </bindings>

Contact

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