mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 13:44:37 +00:00
[#81 state:fixed] Show a message dialog when a duplicate scan yields no result.
This commit is contained in:
parent
b5e645cb10
commit
c95b356a99
@ -386,24 +386,20 @@ http://www.hardcoded.net/licenses/hs_license
|
|||||||
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsChangedNotification object:self];
|
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsChangedNotification object:self];
|
||||||
int r = n2i([py getOperationalErrorCount]);
|
int r = n2i([py getOperationalErrorCount]);
|
||||||
id lastAction = [[ProgressController mainProgressController] jobId];
|
id lastAction = [[ProgressController mainProgressController] jobId];
|
||||||
if ([lastAction isEqualTo:jobCopy])
|
if ([lastAction isEqualTo:jobCopy]) {
|
||||||
{
|
|
||||||
if (r > 0)
|
if (r > 0)
|
||||||
[Dialogs showMessage:[NSString stringWithFormat:@"%d file(s) couldn't be copied.",r]];
|
[Dialogs showMessage:[NSString stringWithFormat:@"%d file(s) couldn't be copied.",r]];
|
||||||
else
|
else
|
||||||
[Dialogs showMessage:@"All marked files were copied sucessfully."];
|
[Dialogs showMessage:@"All marked files were copied sucessfully."];
|
||||||
}
|
}
|
||||||
if ([lastAction isEqualTo:jobMove])
|
else if ([lastAction isEqualTo:jobMove]) {
|
||||||
{
|
|
||||||
if (r > 0)
|
if (r > 0)
|
||||||
[Dialogs showMessage:[NSString stringWithFormat:@"%d file(s) couldn't be moved. They were kept in the results, and still are marked.",r]];
|
[Dialogs showMessage:[NSString stringWithFormat:@"%d file(s) couldn't be moved. They were kept in the results, and still are marked.",r]];
|
||||||
else
|
else
|
||||||
[Dialogs showMessage:@"All marked files were moved sucessfully."];
|
[Dialogs showMessage:@"All marked files were moved sucessfully."];
|
||||||
}
|
}
|
||||||
if ([lastAction isEqualTo:jobDelete])
|
else if ([lastAction isEqualTo:jobDelete]) {
|
||||||
{
|
if (r > 0) {
|
||||||
if (r > 0)
|
|
||||||
{
|
|
||||||
NSString *msg = @"%d file(s) couldn't be sent to Trash. They were kept in the results, "\
|
NSString *msg = @"%d file(s) couldn't be sent to Trash. They were kept in the results, "\
|
||||||
"and still are marked. See the F.A.Q. section in the help file for details.";
|
"and still are marked. See the F.A.Q. section in the help file for details.";
|
||||||
[Dialogs showMessage:[NSString stringWithFormat:msg,r]];
|
[Dialogs showMessage:[NSString stringWithFormat:msg,r]];
|
||||||
@ -411,6 +407,12 @@ http://www.hardcoded.net/licenses/hs_license
|
|||||||
else
|
else
|
||||||
[Dialogs showMessage:@"All marked files were sucessfully sent to Trash."];
|
[Dialogs showMessage:@"All marked files were sucessfully sent to Trash."];
|
||||||
}
|
}
|
||||||
|
else if ([lastAction isEqualTo:jobScan]) {
|
||||||
|
NSInteger groupCount = [[py getOutlineView:0 childCountsForPath:[NSArray array]] count];
|
||||||
|
if (groupCount == 0)
|
||||||
|
[Dialogs showMessage:@"No duplicates found."];
|
||||||
|
}
|
||||||
|
|
||||||
// Re-activate toolbar items right after the progress bar stops showing instead of waiting until
|
// Re-activate toolbar items right after the progress bar stops showing instead of waiting until
|
||||||
// a mouse-over is performed
|
// a mouse-over is performed
|
||||||
[[[self window] toolbar] validateVisibleItems];
|
[[[self window] toolbar] validateVisibleItems];
|
||||||
|
@ -249,7 +249,12 @@ class DupeGuru(DupeGuruBase, QObject):
|
|||||||
self.emit(SIGNAL('resultsChanged()'))
|
self.emit(SIGNAL('resultsChanged()'))
|
||||||
if jobid == JOB_LOAD:
|
if jobid == JOB_LOAD:
|
||||||
self.emit(SIGNAL('directoriesChanged()'))
|
self.emit(SIGNAL('directoriesChanged()'))
|
||||||
if jobid in (JOB_MOVE, JOB_COPY, JOB_DELETE) and self.last_op_error_count > 0:
|
elif jobid in (JOB_MOVE, JOB_COPY, JOB_DELETE) and self.last_op_error_count > 0:
|
||||||
msg = "{0} files could not be processed.".format(self.results.mark_count)
|
msg = "{0} files could not be processed.".format(self.results.mark_count)
|
||||||
QMessageBox.warning(self.main_window, 'Warning', msg)
|
QMessageBox.warning(self.main_window, 'Warning', msg)
|
||||||
|
elif jobid == JOB_SCAN:
|
||||||
|
if not self.results.groups:
|
||||||
|
title = "Scanning complete"
|
||||||
|
msg = "No duplicates found."
|
||||||
|
QMessageBox.information(self.main_window, title, msg)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user