1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

Pushed the error message logic in Cocoa' addDirectory into the core.

This commit is contained in:
Virgil Dupras
2012-07-31 15:33:44 -04:00
parent 81df280ea6
commit deb5260c6a
24 changed files with 185 additions and 198 deletions

View File

@@ -265,11 +265,10 @@ class DupeGuru(RegistrableApplication, Broadcaster):
try:
self.directories.add_path(Path(d))
self.notify('directories_changed')
return 0
except directories.AlreadyThereError:
return 1
self.view.show_message(tr("'{}' already is in the list.").format(d))
except directories.InvalidPathError:
return 2
self.view.show_message(tr("'{}' does not exist.").format(d))
def add_selected_to_ignore_list(self):
dupes = self.without_ref(self.selected_dupes)