mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-18 20:34:39 +01:00
Support loading multiple files or a folder from dropping on the Mac dock icon.
Fixes issue #2787
This commit is contained in:
parent
287b3fcb1f
commit
8e89838621
10
dist/Info.plist.in
vendored
10
dist/Info.plist.in
vendored
@ -44,6 +44,16 @@
|
||||
<string>30</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>****</string>
|
||||
<string>fold</string>
|
||||
<string>disk</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
|
@ -153,6 +153,7 @@ static BreakpadRef InitBreakpad() {
|
||||
qLog(Warning)<<"Media key monitoring disabled";
|
||||
|
||||
}
|
||||
|
||||
- (BOOL) application: (NSApplication*)app openFile:(NSString*)filename {
|
||||
qDebug() << "Wants to open:" << [filename UTF8String];
|
||||
|
||||
@ -163,6 +164,14 @@ static BreakpadRef InitBreakpad() {
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void) application: (NSApplication*)app openFiles:(NSArray*)filenames {
|
||||
qLog(Debug) << "Wants to open:";
|
||||
NSLog(@"%@", filenames);
|
||||
[filenames enumerateObjectsUsingBlock:^(id object, NSUInteger idx, BOOL* stop) {
|
||||
[self application:app openFile:(NSString*)object];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void) mediaKeyTap: (SPMediaKeyTap*)keyTap receivedMediaKeyEvent:(NSEvent*)event {
|
||||
NSAssert([event type] == NSSystemDefined && [event subtype] == SPSystemDefinedEventMediaKeys, @"Unexpected NSEvent in mediaKeyTap:receivedMediaKeyEvent:");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user