[vlc-commits] macosx: add constant for VLCMediaKeySupportSettingChanged notification

David Fuhrmann git at videolan.org
Sat Aug 20 23:46:01 CEST 2016


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Aug 20 23:45:38 2016 +0200| [2b086638c535de90f0145e695c848b0c1f66cb9a] | committer: David Fuhrmann

macosx: add constant for VLCMediaKeySupportSettingChanged notification

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2b086638c535de90f0145e695c848b0c1f66cb9a
---

 modules/gui/macosx/VLCCoreInteraction.m | 2 +-
 modules/gui/macosx/VLCMain.h            | 2 +-
 modules/gui/macosx/VLCMainWindow.m      | 2 +-
 modules/gui/macosx/VLCPLModel.m         | 4 ++--
 modules/gui/macosx/simple_prefs.m       | 4 +---
 5 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/modules/gui/macosx/VLCCoreInteraction.m b/modules/gui/macosx/VLCCoreInteraction.m
index 5dfecbe..d939da4 100644
--- a/modules/gui/macosx/VLCCoreInteraction.m
+++ b/modules/gui/macosx/VLCCoreInteraction.m
@@ -104,7 +104,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
                                                                      [SPMediaKeyTap defaultMediaKeyUserBundleIdentifiers], kMediaKeyUsingBundleIdentifiersDefaultsKey,
                                                                      nil]];
         }
-        [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(coreChangedMediaKeySupportSetting:) name: @"VLCMediaKeySupportSettingChanged" object: nil];
+        [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(coreChangedMediaKeySupportSetting:) name:VLCMediaKeySupportSettingChangedNotification object: nil];
 
         /* init Apple Remote support */
         _remote = [[AppleRemote alloc] init];
diff --git a/modules/gui/macosx/VLCMain.h b/modules/gui/macosx/VLCMain.h
index 0123f1c..e75e261 100644
--- a/modules/gui/macosx/VLCMain.h
+++ b/modules/gui/macosx/VLCMain.h
@@ -52,7 +52,7 @@ intf_thread_t *getIntf();
 
 static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
 static NSString * VLCConfigurationChangedNotification = @"VLCConfigurationChangedNotification";
-
+static NSString * VLCMediaKeySupportSettingChangedNotification = @"VLCMediaKeySupportSettingChangedNotification";
 
 /*****************************************************************************
  * VLCMain interface
diff --git a/modules/gui/macosx/VLCMainWindow.m b/modules/gui/macosx/VLCMainWindow.m
index 283c6a0..4d89e13 100644
--- a/modules/gui/macosx/VLCMainWindow.m
+++ b/modules/gui/macosx/VLCMainWindow.m
@@ -1184,7 +1184,7 @@ static const float f_min_window_height = 307.;
         [self showDropZone];
     PL_UNLOCK;
 
-    [[NSNotificationCenter defaultCenter] postNotificationName: @"VLCMediaKeySupportSettingChanged"
+    [[NSNotificationCenter defaultCenter] postNotificationName: VLCMediaKeySupportSettingChangedNotification
                                                         object: nil
                                                       userInfo: nil];
 }
diff --git a/modules/gui/macosx/VLCPLModel.m b/modules/gui/macosx/VLCPLModel.m
index b014373..7ccf308 100644
--- a/modules/gui/macosx/VLCPLModel.m
+++ b/modules/gui/macosx/VLCPLModel.m
@@ -273,7 +273,7 @@ static int VolumeUpdated(vlc_object_t *p_this, const char *psz_var,
     // update badge in sidebar
     [[[VLCMain sharedInstance] mainWindow] updateWindow];
 
-    [[NSNotificationCenter defaultCenter] postNotificationName: @"VLCMediaKeySupportSettingChanged"
+    [[NSNotificationCenter defaultCenter] postNotificationName: VLCMediaKeySupportSettingChangedNotification
                                                         object: nil
                                                       userInfo: nil];
 }
@@ -289,7 +289,7 @@ static int VolumeUpdated(vlc_object_t *p_this, const char *psz_var,
     // update badge in sidebar
     [[[VLCMain sharedInstance] mainWindow] updateWindow];
 
-    [[NSNotificationCenter defaultCenter] postNotificationName: @"VLCMediaKeySupportSettingChanged"
+    [[NSNotificationCenter defaultCenter] postNotificationName: VLCMediaKeySupportSettingChangedNotification
                                                         object: nil
                                                       userInfo: nil];
 }
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index afddf2f..e7a4a1a 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -1080,9 +1080,7 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
     /* okay, let's save our changes to vlcrc */
     config_SaveConfigFile(p_intf);
 
-    [[NSNotificationCenter defaultCenter] postNotificationName: @"VLCMediaKeySupportSettingChanged"
-                                                            object: nil
-                                                          userInfo: nil];
+    [[NSNotificationCenter defaultCenter] postNotificationName:VLCMediaKeySupportSettingChangedNotification object:nil];
     [[NSNotificationCenter defaultCenter] postNotificationName:VLCConfigurationChangedNotification object:nil];
 }
 



More information about the vlc-commits mailing list