Commit f91af6c0 authored by David Fuhrmann's avatar David Fuhrmann

macosx: correctly toggle enabled state of record menu item

parent a1b3cbc4
...@@ -576,8 +576,6 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -576,8 +576,6 @@ static VLCMainMenu *_o_sharedInstance = nil;
playlist_t * p_playlist = pl_Get(p_intf); playlist_t * p_playlist = pl_Get(p_intf);
input_thread_t * p_input = playlist_CurrentInput(p_playlist); input_thread_t * p_input = playlist_CurrentInput(p_playlist);
if (p_input != NULL) { 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 [self setupVarMenuItem: o_mi_program target: (vlc_object_t *)p_input
var: "program" selector: @selector(toggleVar:)]; var: "program" selector: @selector(toggleVar:)];
...@@ -628,7 +626,6 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -628,7 +626,6 @@ static VLCMainMenu *_o_sharedInstance = nil;
[o_mi_ffmpeg_pp setEnabled:YES]; [o_mi_ffmpeg_pp setEnabled:YES];
vlc_object_release(p_input); vlc_object_release(p_input);
} else { } else {
[o_mi_record setEnabled: NO];
[o_mi_ffmpeg_pp setEnabled:NO]; [o_mi_ffmpeg_pp setEnabled:NO];
} }
} }
...@@ -1534,6 +1531,10 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -1534,6 +1531,10 @@ static VLCMainMenu *_o_sharedInstance = nil;
if (!p_input) if (!p_input)
bEnabled = FALSE; bEnabled = FALSE;
[self setupMenus]; /* Make sure input menu is up to date */ [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")] || } else if ([o_title isEqualToString: _NS("Previous")] ||
[o_title isEqualToString: _NS("Next")]) { [o_title isEqualToString: _NS("Next")]) {
PL_LOCK; PL_LOCK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment