]> git.sesse.net Git - vlc/commitdiff
* don't store the temp release note in the user's Caches-folder, but in /tmp. Renamed...
authorFelix Paul Kühne <fkuehne@videolan.org>
Wed, 1 Mar 2006 22:21:36 +0000 (22:21 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Wed, 1 Mar 2006 22:21:36 +0000 (22:21 +0000)
* cleanup of the source

modules/gui/macosx/update.h
modules/gui/macosx/update.m

index ab47b2bb059f8e309fe69c8a7de127373ac715f7..a4eb52c15c5949504ae36b251ee778a166396c97 100644 (file)
@@ -35,7 +35,6 @@
     IBOutlet id o_update_window;
     IBOutlet id o_bar_checking;
 
-    NSString * o_hashOfOurBinary;
     NSString * o_urlOfBinary;
     update_t * p_u;
     intf_thread_t * p_intf;
index b5783725fb35c6b846f604f14db6545181fb3e9b..9637eff5c132a134dc5e35b8eae1e4fa5c06bbfd 100644 (file)
@@ -72,8 +72,6 @@ static VLCUpdate *_o_sharedInstance = nil;
 
 - (void)dealloc
 {
-    if( o_hashOfOurBinary )
-        [o_hashOfOurBinary release];
     if( o_urlOfBinary )
         [o_urlOfBinary release];
 
@@ -144,9 +142,9 @@ static VLCUpdate *_o_sharedInstance = nil;
     BOOL releaseChecked = NO;
     int x = 0;
     NSString * pathToReleaseNote;
-    pathToReleaseNote = [[NSString stringWithString: \
-        @"~/Library/Caches/vlc_releasenote_temp.txt"] \
-        stringByExpandingTildeInPath];
+    pathToReleaseNote = [NSString stringWithFormat: \
+        @"/tmp/vlc_releasenote_%@.tmp", [[NSCalendarDate calendarDate] \
+        descriptionWithCalendarFormat: @"%m-%d-%y--%I.%M.%S.%F"]];
     
     if( p_uit )
     {
@@ -172,13 +170,13 @@ static VLCUpdate *_o_sharedInstance = nil;
                 }
                 else if( p_uit->file.i_type == UPDATE_FILE_TYPE_BINARY )
                 {
-                    msg_Dbg( p_intf, "binary found, version = %s" \
-                        ", hash=%s, size=%i MB", p_uit->release.psz_version, \
-                        p_uit->file.psz_md5, \
+                    msg_Dbg( p_intf, "binary found, version = %s" \
+                        "url=%s, size=%i MB", p_uit->release.psz_version, \
+                        p_uit->file.psz_url, \
                         (int)((p_uit->file.l_size / 1024) / 1024) );
-                    [o_fld_currentVersionAndSize setStringValue: \
-                        [NSString stringWithFormat: \
-                        @"The current release is %s (%i MB to download).", \
+                    [o_fld_currentVersionAndSize setStringValue: [NSString \
+                        stringWithFormat: \
+                        _NS("The current release is %s (%i MB to download)."), \
                         p_uit->release.psz_version, ((p_uit->file.l_size \
                         / 1024) / 1024)]];
                         
@@ -186,15 +184,6 @@ static VLCUpdate *_o_sharedInstance = nil;
                         [o_urlOfBinary release];
                     o_urlOfBinary = [[NSString alloc] initWithUTF8String: \
                         p_uit->file.psz_url];
-
-                    /* save the hash of our file, if available */
-                    if( p_uit->file.psz_md5 )
-                    {
-                        if( o_hashOfOurBinary )
-                            [o_hashOfOurBinary release];
-                        o_hashOfOurBinary = [[NSString alloc] \
-                            initWithUTF8String: p_uit->file.psz_md5];
-                    }
                 }
                 if( p_uit->release.i_status == UPDATE_RELEASE_STATUS_NEWER &&
                     !releaseChecked )
@@ -272,6 +261,11 @@ static VLCUpdate *_o_sharedInstance = nil;
                 p_uit->release.i_status == UPDATE_RELEASE_STATUS_NEWER &&
                 p_uit->file.i_type == UPDATE_FILE_TYPE_BINARY )
             {
+                /* put the mirror information */
+                msg_Dbg( p_intf, "used mirror: %s, %s [%s]", \
+                    p_uit->mirror.psz_name, p_uit->mirror.psz_location, \
+                    p_uit->mirror.psz_type );
+
                 /* that's our binary */
                 update_download( p_uit, (char *)[path UTF8String] );
             }