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
e4b9f907
Commit
e4b9f907
authored
Jun 14, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: Do not load resources when the VLC interface is not loaded.
parent
2cf6ffb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+24
-8
No files found.
modules/gui/macosx/intf.m
View file @
e4b9f907
...
...
@@ -314,6 +314,8 @@ static VLCMain *_o_sharedMainInstance = nil;
else
_o_sharedMainInstance
=
[
super
init
];
p_intf
=
NULL
;
o_msg_lock
=
[[
NSLock
alloc
]
init
];
o_msg_arr
=
[[
NSMutableArray
arrayWithCapacity
:
200
]
retain
];
/* subscribe to LibVLC's debug messages as early as possible (for us) */
...
...
@@ -365,7 +367,10 @@ static VLCMain *_o_sharedMainInstance = nil;
playlist_t
*
p_playlist
;
vlc_value_t
val
;
/* Check if we already did this once. Opening the other nibs calls it too, because VLCMain is the owner */
if
(
!
p_intf
)
return
;
/* Check if we already did this once. Opening the other nibs calls it too,
because VLCMain is the owner */
if
(
nib_main_loaded
)
return
;
/* check whether the user runs a valid version of OS X */
...
...
@@ -543,6 +548,8 @@ static VLCMain *_o_sharedMainInstance = nil;
-
(
void
)
applicationWillFinishLaunching
:(
NSNotification
*
)
o_notification
{
if
(
!
p_intf
)
return
;
/* FIXME: don't poll */
interfaceTimer
=
[[
NSTimer
scheduledTimerWithTimeInterval
:
0
.
5
target:
self
selector
:
@selector
(
manageIntf
:)
...
...
@@ -559,6 +566,8 @@ static VLCMain *_o_sharedMainInstance = nil;
-
(
void
)
applicationDidFinishLaunching
:(
NSNotification
*
)
aNotification
{
if
(
!
p_intf
)
return
;
[
self
_removeOldPreferences
];
#ifdef UPDATE_CHECK
...
...
@@ -579,6 +588,8 @@ static VLCMain *_o_sharedMainInstance = nil;
-
(
void
)
initStrings
{
if
(
!
p_intf
)
return
;
[
o_window
setTitle
:
_NS
(
"VLC media player"
)];
[
self
setScrollField
:
_NS
(
"VLC media player"
)
stopAfter
:
-
1
];
...
...
@@ -749,6 +760,8 @@ static VLCMain *_o_sharedMainInstance = nil;
-
(
void
)
releaseRepresentedObjects
:(
NSMenu
*
)
the_menu
{
if
(
!
p_intf
)
return
;
NSArray
*
menuitems_array
=
[
the_menu
itemArray
];
for
(
int
i
=
0
;
i
<
[
menuitems_array
count
];
i
++
)
{
...
...
@@ -766,6 +779,8 @@ static VLCMain *_o_sharedMainInstance = nil;
vout_thread_t
*
p_vout
;
int
returnedValue
=
0
;
if
(
!
p_intf
)
return
;
msg_Dbg
(
p_intf
,
"Terminating"
);
/* Make sure the manage_thread won't call -terminate: again */
...
...
@@ -906,7 +921,6 @@ static NSString * VLCToolbarMediaControl = @"VLCToolbarMediaControl";
{
NSToolbarItem
*
toolbarItem
=
[[[
NSToolbarItem
alloc
]
initWithItemIdentifier
:
itemIdentifier
]
autorelease
];
if
(
[
itemIdentifier
isEqual
:
VLCToolbarMediaControl
]
)
{
[
toolbarItem
setLabel
:
@"Media Controls"
];
...
...
@@ -988,12 +1002,14 @@ static NSString * VLCToolbarMediaControl = @"VLCToolbarMediaControl";
application */
-
(
void
)
applicationDidBecomeActive
:(
NSNotification
*
)
aNotification
{
if
(
!
p_intf
)
return
;
#ifndef __x86_64__
[
o_remote
startListening
:
self
];
#endif
}
-
(
void
)
applicationDidResignActive
:(
NSNotification
*
)
aNotification
{
if
(
!
p_intf
)
return
;
#ifndef __x86_64__
[
o_remote
stopListening
:
self
];
#endif
...
...
@@ -1003,7 +1019,7 @@ static NSString * VLCToolbarMediaControl = @"VLCToolbarMediaControl";
-
(
void
)
computerWillSleep
:
(
NSNotification
*
)
notification
{
/* Pause */
if
(
p_intf
->
p_sys
->
i_play_status
==
PLAYING_S
)
if
(
p_intf
&&
p_intf
->
p_sys
->
i_play_status
==
PLAYING_S
)
{
vlc_value_t
val
;
val
.
i_int
=
config_GetInt
(
p_intf
,
"key-play-pause"
);
...
...
@@ -1500,11 +1516,11 @@ static void manage_cleanup( void * args )
id
self
=
manage_cleanup_stack
->
self
;
playlist_t
*
p_playlist
=
manage_cleanup_stack
->
p_playlist
;
var_
Add
Callback
(
p_playlist
,
"item-current"
,
PlaylistChanged
,
self
);
var_
Add
Callback
(
p_playlist
,
"intf-change"
,
PlaylistChanged
,
self
);
var_
Add
Callback
(
p_playlist
,
"item-change"
,
PlaylistChanged
,
self
);
var_
Add
Callback
(
p_playlist
,
"playlist-item-append"
,
PlaylistChanged
,
self
);
var_
Add
Callback
(
p_playlist
,
"playlist-item-deleted"
,
PlaylistChanged
,
self
);
var_
Del
Callback
(
p_playlist
,
"item-current"
,
PlaylistChanged
,
self
);
var_
Del
Callback
(
p_playlist
,
"intf-change"
,
PlaylistChanged
,
self
);
var_
Del
Callback
(
p_playlist
,
"item-change"
,
PlaylistChanged
,
self
);
var_
Del
Callback
(
p_playlist
,
"playlist-item-append"
,
PlaylistChanged
,
self
);
var_
Del
Callback
(
p_playlist
,
"playlist-item-deleted"
,
PlaylistChanged
,
self
);
pl_Release
(
p_intf
);
...
...
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