[vlc-commits] macosx: correctly toggle enabled state of record menu item

David Fuhrmann git at videolan.org
Sat Nov 29 16:54:45 CET 2014


vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Nov 29 12:51:33 2014 +0100| [da094802f9ec4989529f257cfd64357d44e5ac99] | committer: David Fuhrmann

macosx: correctly toggle enabled state of record menu item

(cherry picked from commit f91af6c0d2cad14f30d5876c895a1ff9460f0264)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

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

 modules/gui/macosx/MainMenu.m |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m
index 5c26908..e61271d 100644
--- a/modules/gui/macosx/MainMenu.m
+++ b/modules/gui/macosx/MainMenu.m
@@ -571,8 +571,6 @@ static VLCMainMenu *_o_sharedInstance = nil;
     playlist_t * p_playlist = pl_Get(p_intf);
     input_thread_t * p_input = playlist_CurrentInput(p_playlist);
     if (p_input != NULL) {
-        [o_mi_record setEnabled: var_GetBool(p_input, "can-record")];
-
         [self setupVarMenuItem: o_mi_program target: (vlc_object_t *)p_input
                                  var: "program" selector: @selector(toggleVar:)];
 
@@ -623,7 +621,6 @@ static VLCMainMenu *_o_sharedInstance = nil;
         [o_mi_ffmpeg_pp setEnabled:YES];
         vlc_object_release(p_input);
     } else {
-        [o_mi_record setEnabled: NO];
         [o_mi_ffmpeg_pp setEnabled:NO];
     }
 }
@@ -1558,6 +1555,10 @@ static VLCMainMenu *_o_sharedInstance = nil;
         if (!p_input)
             bEnabled = FALSE;
         [self setupMenus]; /* Make sure input menu is up to date */
+    } else if ([o_title isEqualToString: _NS("Record")]) {
+        bEnabled = FALSE;
+        if (p_input)
+            bEnabled = var_GetBool(p_input, "can-record");
     } else if ([o_title isEqualToString: _NS("Previous")] ||
             [o_title isEqualToString: _NS("Next")]) {
         PL_LOCK;



More information about the vlc-commits mailing list