2012-03-14 16:47:21 +00:00
|
|
|
# Created By: Virgil Dupras
|
|
|
|
# Created On: 2012-03-13
|
2015-01-03 21:30:57 +00:00
|
|
|
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
2020-01-01 02:16:27 +00:00
|
|
|
#
|
|
|
|
# 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
|
2015-01-03 21:33:16 +00:00
|
|
|
# http://www.gnu.org/licenses/gpl-3.0.html
|
2012-03-14 16:47:21 +00:00
|
|
|
|
|
|
|
from hscommon.gui.table import GUITable, Row
|
|
|
|
from hscommon.gui.column import Column, Columns
|
|
|
|
from hscommon.trans import trget
|
|
|
|
|
2020-01-01 02:16:27 +00:00
|
|
|
coltr = trget("columns")
|
|
|
|
|
2012-03-14 16:47:21 +00:00
|
|
|
|
|
|
|
class IgnoreListTable(GUITable):
|
|
|
|
COLUMNS = [
|
|
|
|
# the str concat below saves us needless localization.
|
2020-01-01 02:16:27 +00:00
|
|
|
Column("path1", coltr("File Path") + " 1"),
|
|
|
|
Column("path2", coltr("File Path") + " 2"),
|
2012-03-14 16:47:21 +00:00
|
|
|
]
|
2020-01-01 02:16:27 +00:00
|
|
|
|
2012-03-14 16:47:21 +00:00
|
|
|
def __init__(self, ignore_list_dialog):
|
|
|
|
GUITable.__init__(self)
|
|
|
|
self.columns = Columns(self)
|
|
|
|
self.view = None
|
|
|
|
self.dialog = ignore_list_dialog
|
2020-01-01 02:16:27 +00:00
|
|
|
|
|
|
|
# --- Override
|
2012-03-14 16:47:21 +00:00
|
|
|
def _fill(self):
|
|
|
|
for path1, path2 in self.dialog.ignore_list:
|
|
|
|
self.append(IgnoreListRow(self, path1, path2))
|
2020-01-01 02:16:27 +00:00
|
|
|
|
2012-03-14 16:47:21 +00:00
|
|
|
|
|
|
|
class IgnoreListRow(Row):
|
|
|
|
def __init__(self, table, path1, path2):
|
|
|
|
Row.__init__(self, table)
|
|
|
|
self.path1_original = path1
|
|
|
|
self.path2_original = path2
|
|
|
|
self.path1 = str(path1)
|
|
|
|
self.path2 = str(path2)
|