summaryrefslogtreecommitdiff
path: root/tikzit/src/gtk/Application.m
diff options
context:
space:
mode:
authorAlex Merry <alex.merry@cs.ox.ac.uk>2013-02-13 13:31:08 +0000
committerAlex Merry <alex.merry@cs.ox.ac.uk>2013-02-13 14:57:11 +0000
commit814372e88b23ce7956b2322d6f382742e2277ea5 (patch)
treec92167f83e2bfee10206c9b1fcf0494584cf92a8 /tikzit/src/gtk/Application.m
parent0a7223674204a6e8ee311e226b2b5ddef88803a3 (diff)
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.
Diffstat (limited to 'tikzit/src/gtk/Application.m')
-rw-r--r--tikzit/src/gtk/Application.m5
1 files changed, 3 insertions, 2 deletions
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> 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 {