[self showPodcastControls];
else
[self hidePodcastControls];
+
+ [[NSNotificationCenter defaultCenter] postNotificationName: @"VLCMediaKeySupportSettingChanged"
+ object: nil
+ userInfo: nil];
}
- (NSDragOperation)sourceList:(PXSourceList *)aSourceList validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(NSInteger)index
b_mediaKeySupport = var_InheritBool(VLCIntf, "macosx-mediakeys");
if (b_mediaKeySupport) {
o_mediaKeyController = [[SPMediaKeyTap alloc] initWithDelegate:self];
- [o_mediaKeyController startWatchingMediaKeys];
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:
[SPMediaKeyTap defaultMediaKeyUserBundleIdentifiers], kMediaKeyUsingBundleIdentifiersDefaultsKey,
nil]];
[o_usedHotkeys release];
o_usedHotkeys = NULL;
+ [o_mediaKeyController release];
+
[o_msg_lock release];
/* write cached user defaults to disk */
[o_playlist playlistUpdated];
[o_mainwindow updateWindow];
[o_mainwindow updateName];
+
+ [[NSNotificationCenter defaultCenter] postNotificationName: @"VLCMediaKeySupportSettingChanged"
+ object: nil
+ userInfo: nil];
}
- (void)updateRecordState: (BOOL)b_value
[o_mainmenu setShuffle];
}
-
#pragma mark -
#pragma mark Window updater
-
-
- (void)setActiveVideoPlayback:(BOOL)b_value
{
b_active_videoplayback = b_value;
if (b_mediaKeySupport) {
if (!o_mediaKeyController)
o_mediaKeyController = [[SPMediaKeyTap alloc] initWithDelegate:self];
- [o_mediaKeyController startWatchingMediaKeys];
+
+ if ([[[VLCMain sharedInstance] playlist] currentPlaylistRoot]->i_children > 0 ||
+ p_current_input)
+ [o_mediaKeyController startWatchingMediaKeys];
+ else
+ [o_mediaKeyController stopWatchingMediaKeys];
}
else if (!b_mediaKeySupport && o_mediaKeyController)
[o_mediaKeyController stopWatchingMediaKeys];