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

David Fuhrmann git at videolan.org
Sat Nov 29 12:52:07 CET 2014


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

macosx: correctly toggle enabled state of record menu item

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

 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 0927d6a..ffe784e 100644
--- a/modules/gui/macosx/MainMenu.m
+++ b/modules/gui/macosx/MainMenu.m
@@ -576,8 +576,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:)];
 
@@ -628,7 +626,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];
     }
 }
@@ -1534,6 +1531,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