Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
c1f7a646
Commit
c1f7a646
authored
Mar 27, 2007
by
Pierre d'Herbemont
Browse files
Mac OS X gui: Check for update on startup.
parent
89c24db9
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/gui/macosx/intf.m
View file @
c1f7a646
...
...
@@ -737,6 +737,15 @@ static VLCMain *_o_sharedMainInstance = nil;
return
YES
;
}
-
(
void
)
applicationDidFinishLaunching
:(
NSNotification
*
)
aNotification
{
/* Check for update silently on startup */
NSLog
(
@"checking for update"
);
if
(
!
nib_update_loaded
)
nib_update_loaded
=
[
NSBundle
loadNibNamed
:
@"Update"
owner
:
self
];
[
NSThread
detachNewThreadSelector
:
@selector
(
checkForUpdate
)
toTarget
:
o_update
withObject
:
NULL
];
}
/* Listen to the remote in exclusive mode, only when VLC is the active
application */
-
(
void
)
applicationDidBecomeActive
:(
NSNotification
*
)
aNotification
...
...
@@ -1844,12 +1853,9 @@ static VLCMain *_o_sharedMainInstance = nil;
-
(
IBAction
)
checkForUpdate
:(
id
)
sender
{
if
(
!
nib_update_loaded
)
{
nib_update_loaded
=
[
NSBundle
loadNibNamed
:
@"Update"
owner
:
self
];
[
o_update
showUpdateWindow
];
}
else
{
[
o_update
showUpdateWindow
];
}
[
o_update
showUpdateWindow
];
}
-
(
IBAction
)
openReadMe
:(
id
)
sender
...
...
modules/gui/macosx/update.m
View file @
c1f7a646
...
...
@@ -145,7 +145,7 @@ static VLCUpdate *_o_sharedInstance = nil;
NSString
*
pathToReleaseNote
;
pathToReleaseNote
=
[
NSString
stringWithFormat
:
\
@"/tmp/vlc_releasenote_%d.tmp"
,
mdate
()];
if
(
p_uit
)
{
p_uit
->
i_rs
=
UPDATE_RELEASE_STATUS_NEWER
;
...
...
@@ -205,6 +205,10 @@ static VLCUpdate *_o_sharedInstance = nil;
p_uit
->
mirror
.
psz_type
);
/* make sure that we perform this check only once */
releaseChecked
=
YES
;
/* Make sure the update window is showed in case we have something */
[
o_update_window
center
];
[
o_update_window
makeKeyAndOrderFront
:
self
];
}
else
if
(
!
releaseChecked
)
{
...
...
@@ -219,7 +223,7 @@ static VLCUpdate *_o_sharedInstance = nil;
}
update_iterator_Delete
(
p_uit
);
/* wait for our release notes if necessary, since the download is done
* by another thread -- this does usually take 300000 to 500000 ms */
if
(
gettingReleaseNote
)
...
...
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