From 5081666d35077cf89eaa54b55ca7fb340a99db7b Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 4 Jul 2006 18:42:12 +0000 Subject: [PATCH] More cleanup with updating inspector. --- macosx/Controller.h | 2 +- macosx/Controller.m | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/macosx/Controller.h b/macosx/Controller.h index b5728cc8b..66efc41b4 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -141,7 +141,7 @@ - (void) attemptToStartAuto: (Torrent *) torrent; - (void) attemptToStartMultipleAuto: (NSArray *) torrents; -- (void) reloadInspector: (NSNotification *) notification; +- (void) reloadInspectorSettings: (NSNotification *) notification; - (void) sleepCallBack: (natural_t) messageType argument: (void *) messageArgument; diff --git a/macosx/Controller.m b/macosx/Controller.m index 81df718b1..0864a5a9d 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -231,7 +231,7 @@ static void sleepCallBack(void * controller, io_service_t y, name: @"TorrentStartSettingChange" object: nil]; //change that just impacts the inspector - [nc addObserver: self selector: @selector(reloadInspector:) + [nc addObserver: self selector: @selector(reloadInspectorSettings:) name: @"TorrentSettingChange" object: nil]; //timer to update the interface @@ -246,7 +246,8 @@ static void sleepCallBack(void * controller, io_service_t y, [fWindow makeKeyAndOrderFront: nil]; - [self reloadInspector: nil]; + //load info for no torrents + [fInfoController updateInfoForTorrents: [NSArray array]]; if ([fDefaults boolForKey: @"InfoVisible"]) [self showInfo: nil]; } @@ -1121,9 +1122,9 @@ static void sleepCallBack(void * controller, io_service_t y, } } -- (void) reloadInspector: (NSNotification *) notification +- (void) reloadInspectorSettings: (NSNotification *) notification { - [fInfoController updateInfoForTorrents: [self torrentsAtIndexes: [fTableView selectedRowIndexes]]]; + [fInfoController updateInfoSettings]; } - (int) numberOfRowsInTableView: (NSTableView *) t @@ -1238,7 +1239,7 @@ static void sleepCallBack(void * controller, io_service_t y, - (void) tableViewSelectionDidChange: (NSNotification *) notification { - [self reloadInspector: nil]; + [fInfoController updateInfoForTorrents: [self torrentsAtIndexes: [fTableView selectedRowIndexes]]]; } - (void) toggleStatusBar: (id) sender