]> git.sesse.net Git - vlc/commitdiff
* make sure that the timer which is updating the stats-tab is stopped when the panel...
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 5 Mar 2006 16:41:18 +0000 (16:41 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 5 Mar 2006 16:41:18 +0000 (16:41 +0000)
* fixed a minor memory leak (the timer wasn't released after invalidating it)
* VLCInfo is o_info_window's delegate now

extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
modules/gui/macosx/playlistinfo.m

index bbff69cb9d22179f9ccd3f65731f2d8b6715829f..0bf4eb1d572810e2fb55fa1ecfb27cdfb9c01290 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib differ
index 67c3fe1fbdee4b7fed039fa47c56b6a8e3d0e19a..c09b181618bb45190a279a8c0d916c41c5a03e11 100644 (file)
     [o_lost_abuffers_lbl setStringValue: _NS("Lost buffers")];
 }
 
+- (void)dealloc
+{
+    /* make that it is released in any case */
+    if ( o_statUpdateTimer )
+        [o_statUpdateTimer release];
+    [super dealloc];
+}
+
 - (IBAction)togglePlaylistInfoPanel:(id)sender
 {
     if( [o_info_window isVisible] )
     {
+        [self windowShouldClose: nil];
         [o_info_window orderOut: sender];
     }
     else
 {
     if( [o_info_window isVisible] )
     {
-        if( o_statUpdateTimer )
-            [o_statUpdateTimer invalidate];
+        [self windowShouldClose: nil];
         [o_info_window orderOut: sender];
     }
     else
 
 - (IBAction)infoCancel:(id)sender
 {
+    [self windowShouldClose: nil];
     [o_info_window orderOut: self];
 }
 
         var_Set( p_playlist, "intf-change", val );
     }
     vlc_object_release( p_playlist );
+    [self windowShouldClose: nil];
     [o_info_window orderOut: self];
 }
 
     return NO;
 }
 
+- (BOOL)windowShouldClose:(id)sender
+{
+    if( o_statUpdateTimer )
+    {
+        [o_statUpdateTimer invalidate];
+        [o_statUpdateTimer release];
+    }
+    return YES;
+}
+
 @end
 
 @implementation VLCInfo (NSMenuValidation)