BOOL b_mediaKeySupport;
}
-- (void)enableMediaKeySupport:(BOOL)b_value;
+- (void)coreChangedMediaKeySupportSetting: (NSNotification *)o_notification;
- (void)sendEvent: (NSEvent*)event;
- (void)resetJump;
- (void)awakeFromNib
{
b_mediaKeySupport = config_GetInt( VLCIntf, "macosx-mediakeys" );
+ [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(coreChangedMediaKeySupportSetting:) name: @"VLCMediaKeySupportSettingChanged" object: nil];
}
-- (void)enableMediaKeySupport:(BOOL)b_value
+- (void)dealloc
{
- b_mediaKeySupport = b_value;
+ [[NSNotificationCenter defaultCenter] removeObserver: self];
+ [super dealloc];
+}
+
+- (void)coreChangedMediaKeySupportSetting: (NSNotification *)o_notification
+{
+ b_mediaKeySupport = config_GetInt( VLCIntf, "macosx-mediakeys" );
}
- (void)sendEvent: (NSEvent*)event
[[[VLCMain sharedInstance] appleRemoteController] startListening: [VLCMain sharedInstance]];
else
[[[VLCMain sharedInstance] appleRemoteController] stopListening: [VLCMain sharedInstance]];
+ [[NSNotificationCenter defaultCenter] postNotificationName: @"VLCMediaKeySupportSettingChanged"
+ object: nil
+ userInfo: nil];
/* okay, let's save our changes to vlcrc */
i = config_SaveConfigFile( p_intf, "main" );