mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Pushed down some result refresh calls to the core code.
This commit is contained in:
parent
42559f13d8
commit
46836cc805
@ -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"
|
||||
|
@ -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];
|
||||
}
|
||||
|
||||
|
14
core/app.py
14
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)
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user