Commit 8704191
New key bindings
Changed files (4)
modifiedbirdfont/GtkWindow.valamodifiedlibbirdfont/BezierTool.valamodifiedlibbirdfont/Glyph.valamodifiedresources/key_bindings.xml
Diff
@@ -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;@@ -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; }@@ -1266,6 +1266,8 @@ public class Glyph : FontDisplay { clear_active_paths (); GlyphCanvas.redraw (); + MainWindow.set_cursor (NativeWindow.VISIBLE);+ return r; } @@ -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>