Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
165779f7
Commit
165779f7
authored
Jun 16, 2014
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: minor cleanup in the menu code
parent
03648ce9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
50 deletions
+26
-50
modules/gui/macosx/MainMenu.h
modules/gui/macosx/MainMenu.h
+1
-1
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+25
-49
No files found.
modules/gui/macosx/MainMenu.h
View file @
165779f7
/*****************************************************************************
* MainMenu.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2011-201
3
Felix Paul Kühne
* Copyright (C) 2011-201
4
Felix Paul Kühne
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
...
...
modules/gui/macosx/MainMenu.m
View file @
165779f7
/*****************************************************************************
* MainMenu.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2011-201
3
Felix Paul Kühne
* Copyright (C) 2011-201
4
Felix Paul Kühne
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
...
...
@@ -56,8 +56,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
return
_o_sharedInstance
?
_o_sharedInstance
:
[[
self
alloc
]
init
];
}
#pragma mark -
#pragma mark Initialization
#pragma mark - Initialization
-
(
id
)
init
{
...
...
@@ -265,8 +264,16 @@ static VLCMainMenu *_o_sharedInstance = nil;
[
self
setupVarMenuItem
:
o_mi_add_intf
target
:
(
vlc_object_t
*
)
p_intf
var:
"intf-add"
selector
:
@selector
(
toggleVar
:
)];
[
self
setupExtensionsMenu
];
/* setup extensions menu */
// FIXME: Implement preference for autoloading extensions on mac
if
(
!
[
o_extMgr
isLoaded
]
&&
!
[
o_extMgr
cannotLoad
])
[
o_extMgr
loadExtensions
];
/* Let the ExtensionsManager itself build the menu */
[
o_extMgr
buildMenu
:
o_mu_extensions
];
[
o_mi_extensions
setEnabled
:
([
o_mu_extensions
numberOfItems
]
>
0
)];
/* setup post-proc menu */
NSUInteger
count
=
(
NSUInteger
)
[
o_mu_ffmpeg_pp
numberOfItems
];
if
(
count
>
0
)
[
o_mu_ffmpeg_pp
removeAllItems
];
...
...
@@ -543,8 +550,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
return
[
o_context_menu
autorelease
];
}
#pragma mark -
#pragma mark Termination
#pragma mark - Termination
-
(
void
)
releaseRepresentedObjects
:(
NSMenu
*
)
the_menu
{
...
...
@@ -561,8 +567,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
}
}
#pragma mark -
#pragma mark Interface update
#pragma mark - Interface update
-
(
void
)
setupMenus
{
...
...
@@ -705,31 +710,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
[
o_pool
release
];
}
#pragma mark -
#pragma mark Extensions
-
(
void
)
setupExtensionsMenu
{
/* Load extensions if needed */
// TODO: Implement preference for autoloading extensions on mac
// if (!var_InheritBool(p_intf, "qt-autoload-extensions")
// && ![o_extMgr isLoaded])
// {
// return;
// }
if
(
!
[
o_extMgr
isLoaded
]
&&
!
[
o_extMgr
cannotLoad
])
{
[
o_extMgr
loadExtensions
];
}
/* Let the ExtensionsManager itself build the menu */
[
o_extMgr
buildMenu
:
o_mu_extensions
];
[
o_mi_extensions
setEnabled
:
([
o_mu_extensions
numberOfItems
]
>
0
)];
}
#pragma mark -
#pragma mark View
#pragma mark - View
-
(
IBAction
)
toggleEffectsButton
:(
id
)
sender
{
...
...
@@ -795,8 +776,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
return
YES
;
}
#pragma mark -
#pragma mark Playback
#pragma mark - Playback
-
(
IBAction
)
quitAfterPlayback
:(
id
)
sender
{
...
...
@@ -837,8 +817,8 @@ static VLCMainMenu *_o_sharedInstance = nil;
[[
VLCCoreInteraction
sharedInstance
]
setAtoB
];
}
#pragma mark -
#pragma mark audio menu
#pragma mark -
audio menu
-
(
void
)
refreshAudioDeviceList
{
char
**
ids
,
**
names
;
...
...
@@ -901,8 +881,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
[
self
refreshAudioDeviceList
];
}
#pragma mark -
#pragma mark video menu
#pragma mark - video menu
-
(
IBAction
)
toggleFullscreen
:(
id
)
sender
{
...
...
@@ -1063,6 +1042,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
}
#pragma mark - Subtitles Menu
-
(
IBAction
)
addSubtitleFile
:(
id
)
sender
{
NSInteger
i_returnValue
=
0
;
...
...
@@ -1154,8 +1134,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
}
}
#pragma mark -
#pragma mark Panels
#pragma mark - Panels
-
(
IBAction
)
intfOpenFile
:(
id
)
sender
{
...
...
@@ -1274,8 +1253,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
[[
VLCMainWindow
sharedInstance
]
changePlaylistState
:
psUserMenuEvent
];
}
#pragma mark -
#pragma mark Help and Docs
#pragma mark - Help and Docs
-
(
void
)
initAbout
{
...
...
@@ -1339,8 +1317,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
[[
NSWorkspace
sharedWorkspace
]
openURL
:
o_url
];
}
#pragma mark -
#pragma mark Errors, warnings and messages
#pragma mark - Errors, warnings and messages
-
(
IBAction
)
viewErrorsAndWarnings
:(
id
)
sender
{
...
...
@@ -1352,8 +1329,8 @@ static VLCMainMenu *_o_sharedInstance = nil;
[[[
VLCMain
sharedInstance
]
info
]
initPanel
];
}
#pragma mark -
#pragma mark convinience stuff for other objects
#pragma mark -
convinience stuff for other objects
-
(
void
)
setPlay
{
[
o_mi_play
setTitle
:
_NS
(
"Play"
)];
...
...
@@ -1395,8 +1372,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
[
o_mi_random
setState
:
b_value
];
}
#pragma mark -
#pragma mark Dynamic menu creation and validation
#pragma mark - Dynamic menu creation and validation
-
(
void
)
setupVarMenuItem
:(
NSMenuItem
*
)
o_mi
target
:(
vlc_object_t
*
)
p_object
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment