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
6a8197f6
Commit
6a8197f6
authored
Dec 20, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: further optimize the menu re-creation on 10.6+
parent
e316b5a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+13
-6
No files found.
modules/gui/macosx/MainMenu.m
View file @
6a8197f6
...
...
@@ -481,10 +481,8 @@ static VLCMainMenu *_o_sharedInstance = nil;
if
(
[
o_mi_screen
hasSubmenu
]
)
{
y
=
[[
o_mi_screen
submenu
]
numberOfItems
]
-
1
;
msg_Dbg
(
VLCIntf
,
"%i items in submenu"
,
y
);
while
(
x
!=
y
)
{
msg_Dbg
(
VLCIntf
,
"removing item %i of %i"
,
x
,
y
);
[[
o_mi_screen
submenu
]
removeItemAtIndex
:
x
];
x
++
;
}
...
...
@@ -927,12 +925,21 @@ static VLCMainMenu *_o_sharedInstance = nil;
selector
:(
SEL
)
pf_callback
{
vlc_value_t
val
,
val_list
,
text_list
;
int
i_type
,
i
,
i_nb_items
;
int
i_type
,
i
;
/* remove previous items */
i_nb_items
=
[
o_menu
numberOfItems
];
for
(
i
=
0
;
i
<
i_nb_items
;
i
++
)
[
o_menu
removeItemAtIndex
:
0
];
if
(
OSX_LEOPARD
)
{
int
i_nb_items
;
i_nb_items
=
[
o_menu
numberOfItems
];
for
(
i
=
0
;
i
<
i_nb_items
;
i
++
)
[
o_menu
removeItemAtIndex
:
0
];
}
else
{
/* this is more efficient then the legacy code, but 10.6+ only */
[
o_menu
removeAllItems
];
}
/* Check the type of the object variable */
i_type
=
var_Type
(
p_object
,
psz_variable
);
...
...
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