projects
/
enjoyable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
72b2570
)
Add key equivalents for switching configurations.
author
Joe Wreschnig
<joe.wreschnig@gmail.com>
Fri, 1 Mar 2013 12:59:33 +0000
(13:59 +0100)
committer
Joe Wreschnig
<joe.wreschnig@gmail.com>
Fri, 1 Mar 2013 12:59:33 +0000
(13:59 +0100)
ApplicationController.m
patch
|
blob
|
history
diff --git
a/ApplicationController.m
b/ApplicationController.m
index
a3ad5ed
..
b86a5f2
100644
(file)
--- a/
ApplicationController.m
+++ b/
ApplicationController.m
@@
-61,8
+61,14
@@
NSInteger removeFrom = [self firstConfigMenuIndex];
while (dockMenuBase.numberOfItems > removeFrom)
[dockMenuBase removeItemAtIndex:dockMenuBase.numberOfItems - 1];
NSInteger removeFrom = [self firstConfigMenuIndex];
while (dockMenuBase.numberOfItems > removeFrom)
[dockMenuBase removeItemAtIndex:dockMenuBase.numberOfItems - 1];
- for (Config *config in self.configsController.configs)
- [dockMenuBase addItemWithTitle:config.name action:@selector(chooseConfig:) keyEquivalent:@""];
+ int added = 0;
+ for (Config *config in self.configsController.configs) {
+ NSString *keyEquiv = ++added < 10 ? @(added).stringValue : @"";
+ [dockMenuBase addItemWithTitle:config.name
+ action:@selector(chooseConfig:)
+ keyEquivalent:keyEquiv];
+
+ }
[_targetController refreshConfigs];
[self configChanged];
}
[_targetController refreshConfigs];
[self configChanged];
}