mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
#2791 show a progress indicator when verifying local data in the add window
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
|
||||
@interface AddWindowController (Private)
|
||||
|
||||
- (void) updateFiles;
|
||||
|
||||
- (void) confirmAdd;
|
||||
|
||||
- (void) setDestinationPath: (NSString *) destination;
|
||||
@@ -105,8 +107,9 @@
|
||||
[fLocationImageView setImage: nil];
|
||||
}
|
||||
|
||||
fTimer = [NSTimer scheduledTimerWithTimeInterval: UPDATE_SECONDS target: fFileController
|
||||
selector: @selector(reloadData) userInfo: nil repeats: YES];
|
||||
fTimer = [NSTimer scheduledTimerWithTimeInterval: UPDATE_SECONDS target: self
|
||||
selector: @selector(updateFiles) userInfo: nil repeats: YES];
|
||||
[self updateFiles];
|
||||
}
|
||||
|
||||
- (void) windowDidLoad
|
||||
@@ -191,7 +194,7 @@
|
||||
- (void) verifyLocalData: (id) sender
|
||||
{
|
||||
[fTorrent resetCache];
|
||||
[fFileController reloadData];
|
||||
[self updateFiles];
|
||||
}
|
||||
|
||||
- (void) updateStatusField: (NSNotification *) notification
|
||||
@@ -229,6 +232,21 @@
|
||||
|
||||
@implementation AddWindowController (Private)
|
||||
|
||||
- (void) updateFiles
|
||||
{
|
||||
[fTorrent update];
|
||||
|
||||
[fFileController reloadData];
|
||||
|
||||
if ([fTorrent isChecking])
|
||||
{
|
||||
[fVerifyIndicator setHidden: NO];
|
||||
[fVerifyIndicator setDoubleValue: [fTorrent checkingProgress]];
|
||||
}
|
||||
else
|
||||
[fVerifyIndicator setHidden: YES];
|
||||
}
|
||||
|
||||
- (void) confirmAdd
|
||||
{
|
||||
[fTimer invalidate];
|
||||
|
||||
Reference in New Issue
Block a user