Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
450
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
593745e7
Commit
593745e7
authored
6 years ago
by
Felix Paul Kühne
Browse files
Options
Downloads
Patches
Plain Diff
macosx/main menu: iterate on menu item validation
parent
33c51004
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/gui/macosx/VLCMainMenu.m
+10
-8
10 additions, 8 deletions
modules/gui/macosx/VLCMainMenu.m
modules/gui/macosx/VLCPlaylistController.m
+2
-4
2 additions, 4 deletions
modules/gui/macosx/VLCPlaylistController.m
with
12 additions
and
12 deletions
modules/gui/macosx/VLCMainMenu.m
+
10
−
8
View file @
593745e7
...
...
@@ -63,6 +63,7 @@
VLCHelpWindowController
*
_helpWindowController
;
VLCAddonsWindowController
*
_addonsController
;
VLCRendererMenuController
*
_rendererMenuController
;
VLCPlaylistController
*
_playlistController
;
NSTimer
*
_cancelRendererDiscoveryTimer
;
NSMenu
*
_playlistTableColumnsContextMenu
;
...
...
@@ -86,6 +87,7 @@
-
(
void
)
awakeFromNib
{
_timeSelectionPanel
=
[[
VLCTimeSelectionPanelController
alloc
]
init
];
_playlistController
=
[[
VLCMain
sharedInstance
]
playlistController
];
/* check whether the user runs OSX with a RTL language */
NSArray
*
languages
=
[
NSLocale
preferredLanguages
];
...
...
@@ -1604,19 +1606,19 @@
input_thread_t
*
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
mi
==
_stop
||
mi
==
_voutMenustop
||
mi
==
_dockMenustop
)
{
if
(
!
p_input
)
enabled
=
NO
;
// FIXME: disable the stop item as soon as we can detect if there is an input or not*/
/* if (!p_input)
enabled = NO;*/
[
self
setupMenus
];
/* Make sure input menu is up to date */
}
else
if
(
mi
==
_previous
||
mi
==
_voutMenuprev
||
mi
==
_dockMenuprevious
||
mi
==
_dockMenuprevious
)
{
enabled
=
_playlistController
.
hasPreviousPlaylistItem
;
}
else
if
(
mi
==
_next
||
mi
==
_voutMenunext
||
mi
==
_dockMenunext
)
{
PL_LOCK
;
enabled
=
playlist_CurrentSize
(
p_playlist
)
>
1
;
PL_UNLOCK
;
mi
==
_dockMenunext
)
{
enabled
=
_playlistController
.
hasNextPlaylistItem
;
}
else
if
(
mi
==
_record
)
{
enabled
=
NO
;
if
(
p_input
)
...
...
This diff is collapsed.
Click to expand it.
modules/gui/macosx/VLCPlaylistController.m
+
2
−
4
View file @
593745e7
...
...
@@ -366,10 +366,8 @@ static const struct vlc_playlist_callbacks playlist_callbacks = {
-
(
int
)
startPlaylist
{
vlc_playlist_Lock
(
_p_playlist
);
int
ret
=
vlc_playlist_Start
(
_p_playlist
);
vlc_playlist_Unlock
(
_p_playlist
);
return
ret
;
NSInteger
selectedIndex
=
[
_playlistDataSource
.
tableView
selectedRow
];
return
[
self
playItemAtIndex
:
selectedIndex
];
}
-
(
int
)
playPreviousItem
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment