+
+ /* 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 )
+ {
+ int i = 0;
+ while( [[NSFileManager defaultManager] fileExistsAtPath: pathToReleaseNote] == NO )
+ {
+ msleep( 100000 );
+ i += 1;
+ if( i == 150 )
+ {
+ /* if this takes more than 15 sec, exit */
+ msg_Warn( p_intf, "download took more than 15 sec, exiting" );
+ break;
+ }
+ }
+ msg_Dbg( p_intf, "waited %i ms for the release notes", (i * 100000) );
+ msleep( 500000 );
+
+ /* let's open our cached release note and display it
+ * we can't use NSString stringWithContentsOfFile:encoding:error:
+ * since it is Tiger only */
+ NSString * releaseNote = [[NSString alloc] initWithData: \
+ [NSData dataWithContentsOfFile: pathToReleaseNote] \
+ encoding: NSISOLatin1StringEncoding];
+ if( releaseNote )
+ [o_fld_releaseNote setString: releaseNote];
+
+ /* delete the file since it isn't needed anymore */
+ BOOL myBOOL = NO;
+ myBOOL = [[NSFileManager defaultManager] removeFileAtPath: \
+ pathToReleaseNote handler: nil];
+ }
+ else
+ {
+ /* don't confuse the user, but make her happy */
+ [o_fld_status setStringValue: _NS("This version of VLC " \
+ "is the latest available.")];
+ [o_btn_DownloadNow setEnabled: NO];
+ msg_Dbg( p_intf, "current version is up-to-date" );
+ }