1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 06:37:17 +00:00

refactoring: take ignore_list out of Scanner class

It's now `DupeGuru` that holds it and passes it to `get_dupe_groups()`,
the only place where it's actually used in `Scanner`.

This will make the SE/ME/PE merge easier by allowing us to instantiate
the Scanner on-the-fly since it doesn't hold state anymore.
This commit is contained in:
Virgil Dupras
2016-05-29 14:13:19 -04:00
parent a0a90e8ef8
commit 9ed4b7abf0
5 changed files with 45 additions and 50 deletions

View File

@@ -1,8 +1,8 @@
# Created On: 2012/03/13
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
#
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
from hscommon.trans import tr
@@ -12,12 +12,12 @@ class IgnoreListDialog:
#--- View interface
# show()
#
def __init__(self, app):
self.app = app
self.ignore_list = self.app.scanner.ignore_list
self.ignore_list = self.app.ignore_list
self.ignore_list_table = IgnoreListTable(self)
def clear(self):
if not self.ignore_list:
return
@@ -25,15 +25,15 @@ class IgnoreListDialog:
if self.app.view.ask_yes_no(msg):
self.ignore_list.Clear()
self.refresh()
def refresh(self):
self.ignore_list_table.refresh()
def remove_selected(self):
for row in self.ignore_list_table.selected_rows:
self.ignore_list.remove(row.path1_original, row.path2_original)
self.refresh()
def show(self):
self.view.show()