summaryrefslogtreecommitdiff
path: root/src/ui/macos.m
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-07-22 07:19:56 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-07-22 07:19:56 +0300
commit1aa960ab2b015566d1060f00644435b466225fb7 (patch)
treeaaa4f7b24474a2c09c88dbb6562ebd0cd9e35268 /src/ui/macos.m
parent896c024b4ff1a44affe3d749e09e7b7e8c31970c (diff)
Cleanup
Diffstat (limited to 'src/ui/macos.m')
-rw-r--r--src/ui/macos.m17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/ui/macos.m b/src/ui/macos.m
index 73e17a4c..65cd0c90 100644
--- a/src/ui/macos.m
+++ b/src/ui/macos.m
@@ -34,9 +34,6 @@ static NSTouchBarItemIdentifier tremoloEvent_TouchId_ = @"fi.skyjake.Bitwi
34 34
35enum iTouchBarVariant { 35enum iTouchBarVariant {
36 default_TouchBarVariant, 36 default_TouchBarVariant,
37 sequence_TouchBarVariant,
38 tracker_TouchBarVariant,
39 wide_TouchBarVariant,
40}; 37};
41 38
42@interface CommandButton : NSButtonTouchBarItem { 39@interface CommandButton : NSButtonTouchBarItem {
@@ -136,10 +133,10 @@ enum iTouchBarVariant {
136 [sdlDelegate applicationDidFinishLaunching:notification]; 133 [sdlDelegate applicationDidFinishLaunching:notification];
137} 134}
138 135
136#if 0
139- (NSTouchBar *)makeTouchBar { 137- (NSTouchBar *)makeTouchBar {
140 NSTouchBar *bar = [[NSTouchBar alloc] init]; 138 NSTouchBar *bar = [[NSTouchBar alloc] init];
141 bar.delegate = self; 139 bar.delegate = self;
142#if 0
143 switch (touchBarVariant) { 140 switch (touchBarVariant) {
144 case default_TouchBarVariant: 141 case default_TouchBarVariant:
145 bar.defaultItemIdentifiers = @[ play_TouchId_, restart_TouchId_, 142 bar.defaultItemIdentifiers = @[ play_TouchId_, restart_TouchId_,
@@ -175,17 +172,9 @@ enum iTouchBarVariant {
175 NSTouchBarItemIdentifierOtherItemsProxy ]; 172 NSTouchBarItemIdentifierOtherItemsProxy ];
176 break; 173 break;
177 } 174 }
178#endif
179 return bar; 175 return bar;
180} 176}
181 177#endif
182- (void)playPressed {
183 postCommand_App("playback.toggle");
184}
185
186- (void)restartPressed {
187 postCommand_App("playback.restart");
188}
189 178
190- (void)showPreferences { 179- (void)showPreferences {
191 postCommand_App("preferences"); 180 postCommand_App("preferences");
@@ -415,6 +404,7 @@ void insertMenuItems_MacOS(const char *menuLabel, const iMenuItem *items, size_t
415} 404}
416 405
417void handleCommand_MacOS(const char *cmd) { 406void handleCommand_MacOS(const char *cmd) {
407#if 0
418 if (equal_Command(cmd, "tabs.changed")) { 408 if (equal_Command(cmd, "tabs.changed")) {
419 MyDelegate *myDel = (MyDelegate *) [[NSApplication sharedApplication] delegate]; 409 MyDelegate *myDel = (MyDelegate *) [[NSApplication sharedApplication] delegate];
420 const char *tabId = valuePtr_Command(cmd, "id"); 410 const char *tabId = valuePtr_Command(cmd, "id");
@@ -431,4 +421,5 @@ void handleCommand_MacOS(const char *cmd) {
431 [myDel setTouchBarVariant:default_TouchBarVariant]; 421 [myDel setTouchBarVariant:default_TouchBarVariant];
432 } 422 }
433 } 423 }
424#endif
434} 425}