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

Huge refactoring. I moved MGOutline from moneyGuru (as well as everything that comes with it) and used it to create DirectoryOutline for the directories panel.

This commit is contained in:
Virgil Dupras
2010-02-07 15:26:50 +01:00
parent 3e34502014
commit b5dd9651c3
18 changed files with 503 additions and 403 deletions

View File

@@ -84,6 +84,7 @@ class DupeGuru(RegistrableApplication, Broadcaster):
def _do_load(self, j):
self.directories.load_from_file(op.join(self.appdata, 'last_directories.xml'))
self.notify('directories_changed')
j = j.start_subjob([1, 9])
self.results.load_from_xml(op.join(self.appdata, 'last_results.xml'), self._get_file, j)
files = flatten(g[:] for g in self.results.groups)
@@ -128,6 +129,7 @@ class DupeGuru(RegistrableApplication, Broadcaster):
def add_directory(self, d):
try:
self.directories.add_path(Path(d))
self.notify('directories_changed')
return 0
except directories.AlreadyThereError:
return 1
@@ -236,6 +238,13 @@ class DupeGuru(RegistrableApplication, Broadcaster):
if self.selected_dupes:
self._open_path(self.selected_dupes[0].path)
def remove_directory(self,index):
try:
del self.directories[index]
self.notify('directories_changed')
except IndexError:
pass
def remove_duplicates(self, duplicates):
self.results.remove_duplicates(duplicates)