From 814372e88b23ce7956b2322d6f382742e2277ea5 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Wed, 13 Feb 2013 13:31:08 +0000 Subject: GTK: Add shortcuts for changing selection mode Now when the graph has focus, shift+n will choose node selection, shift+e edge selection and shift+b both. --- tikzit/src/gtk/Application.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tikzit/src/gtk/Application.m') diff --git a/tikzit/src/gtk/Application.m b/tikzit/src/gtk/Application.m index 4c696a2..bfde140 100644 --- a/tikzit/src/gtk/Application.m +++ b/tikzit/src/gtk/Application.m @@ -209,7 +209,7 @@ Application* app = nil; } } -- (void) activateToolForKey:(unsigned int)keyVal withMask:(InputMask)mask { +- (BOOL) activateToolForKey:(unsigned int)keyVal withMask:(InputMask)mask { // FIXME: cache the accel info, rather than reparsing it every time? for (id tool in tools) { guint toolKey = 0; @@ -217,9 +217,10 @@ Application* app = nil; gtk_accelerator_parse ([[tool shortcut] UTF8String], &toolKey, &toolMod); if (toolKey != 0 && toolKey == keyVal && (int)mask == (int)toolMod) { [self setActiveTool:tool]; - return; + return YES; } } + return NO; } - (void) _addWindow:(Window*)window { -- cgit v1.2.3