]> granicus.if.org Git - transmission/commitdiff
the PiecesView will use target/action instead of notification center for mouse-down...
authorMitchell Livingston <livings124@transmissionbt.com>
Tue, 12 Mar 2013 02:56:35 +0000 (02:56 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Tue, 12 Mar 2013 02:56:35 +0000 (02:56 +0000)
macosx/InfoActivityViewController.m
macosx/PiecesView.m

index 8d191f3f1b89a3aeeb46ae3578b6540321086313..4f06d6dcdf072dffc3e0620e06d459fbb2446dc6 100644 (file)
@@ -55,8 +55,6 @@
 
 - (void) awakeFromNib
 {
-    [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(updatePiecesView) name: @"UpdatePiecesView" object: nil];
-    
     [fTransferSectionLabel sizeToFit];
     [fDatesSectionLabel sizeToFit];
     [fTimeSectionLabel sizeToFit];
         frame.size.width -= widthIncrease;
         [field setFrame: frame];
     }
+    
+    //set the click action of the pieces view
+    [fPiecesView setAction:@selector(updatePiecesView)];
+    [fPiecesView setTarget:self];
 }
 
 - (void) dealloc
index d7e36b6c62c24cdb754925df41eb131adc5f6a43..9b86e307898ea27b66192e65d515429b855eacaf 100644 (file)
@@ -216,7 +216,7 @@ enum
         const BOOL availability = ![[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"];
         [[NSUserDefaults standardUserDefaults] setBool: availability forKey: @"PiecesViewShowAvailability"];
         
-        [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdatePiecesView" object: self];
+        [self sendAction:[self action] to:[self target]];
     }
     
     [super mouseDown: event];