diff --git a/cocoa/base/Consts.h b/cocoa/base/Consts.h index cd564961..0a9b8ee0 100644 --- a/cocoa/base/Consts.h +++ b/cocoa/base/Consts.h @@ -10,8 +10,6 @@ http://www.hardcoded.net/licenses/hs_license /* ResultsChangedNotification happens on major changes, which requires a complete reload of the data*/ #define ResultsChangedNotification @"ResultsChangedNotification" -/* ResultsChangedNotification happens on minor changes, which requires buffer flush*/ -#define ResultsUpdatedNotification @"ResultsUpdatedNotification" #define ResultsMarkingChangedNotification @"ResultsMarkingChangedNotification" #define RegistrationRequired @"RegistrationRequired" #define JobStarted @"JobStarted" diff --git a/cocoa/base/ResultWindow.m b/cocoa/base/ResultWindow.m index 66f45a5a..42f0e5c5 100644 --- a/cocoa/base/ResultWindow.m +++ b/cocoa/base/ResultWindow.m @@ -509,13 +509,11 @@ http://www.hardcoded.net/licenses/hs_license - (void)resultsChanged:(NSNotification *)aNotification { - [self reloadMatches]; [self refreshStats]; } - (void)resultsMarkingChanged:(NSNotification *)aNotification { - [self reloadMatches]; [self refreshStats]; } diff --git a/core/app.py b/core/app.py index ee8af083..96091492 100644 --- a/core/app.py +++ b/core/app.py @@ -156,6 +156,7 @@ class DupeGuru(RegistrableApplication, Broadcaster): filter = escape(filter, '()[]\\.|+?^') filter = escape(filter, '*', '.') self.results.apply_filter(filter) + self.notify('results_changed') def clean_empty_dirs(self, path): if self.options['clean_empty_dirs']: @@ -240,6 +241,18 @@ class DupeGuru(RegistrableApplication, Broadcaster): changed_groups.add(g) self.notify('results_changed') + def mark_all(self): + self.results.mark_all() + self.notify('results_changed') + + def mark_none(self): + self.results.mark_none() + self.notify('results_changed') + + def mark_invert(self): + self.results.mark_invert() + self.notify('results_changed') + def open_selected(self): if self.selected_dupes: self._open_path(self.selected_dupes[0].path) @@ -253,6 +266,7 @@ class DupeGuru(RegistrableApplication, Broadcaster): def remove_duplicates(self, duplicates): self.results.remove_duplicates(duplicates) + self.notify('results_changed') def remove_selected(self): self.remove_duplicates(self.selected_dupes) diff --git a/core/app_cocoa_inter.py b/core/app_cocoa_inter.py index fdebdcfa..2cb9b3d1 100644 --- a/core/app_cocoa_inter.py +++ b/core/app_cocoa_inter.py @@ -44,13 +44,13 @@ class PyDupeGuruBase(PyRegistrable): self.py.load() def markAll(self): - self.py.results.mark_all() + self.py.mark_all() def markNone(self): - self.py.results.mark_none() + self.py.mark_none() def markInvert(self): - self.py.results.mark_invert() + self.py.mark_invert() def purgeIgnoreList(self): self.py.PurgeIgnoreList()