mirror of
https://github.com/arsenetar/dupeguru.git
synced 2024-10-18 16:45:57 +00:00
Andrew Senetar
7ba8aa3514
- Format all files with black - Update tox.ini flake8 arguments to be compatible - Add black to requirements-extra.txt - Reduce ignored flake8 rules and fix a few violations
42 lines
1.2 KiB
Python
42 lines
1.2 KiB
Python
# 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
|
|
# http://www.gnu.org/licenses/gpl-3.0.html
|
|
|
|
from hscommon.trans import tr
|
|
from .ignore_list_table import IgnoreListTable
|
|
|
|
|
|
class IgnoreListDialog:
|
|
# --- View interface
|
|
# show()
|
|
#
|
|
|
|
def __init__(self, app):
|
|
self.app = app
|
|
self.ignore_list = self.app.ignore_list
|
|
self.ignore_list_table = IgnoreListTable(self)
|
|
|
|
def clear(self):
|
|
if not self.ignore_list:
|
|
return
|
|
msg = tr(
|
|
"Do you really want to remove all %d items from the ignore list?"
|
|
) % len(self.ignore_list)
|
|
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()
|