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

More cleanups

- Cleanup columns.py and tables
- Other misc cleanups
- Remove text_field.py from qtlib as it is not used
- Remove unused variables from image_viewer method
This commit is contained in:
2021-08-25 00:46:33 -05:00
parent 2e13c4ccb5
commit f11fccc889
22 changed files with 146 additions and 163 deletions

View File

@@ -264,7 +264,7 @@ class DupeGuru(Broadcaster):
return None
def _get_export_data(self):
columns = [col for col in self.result_table.columns.ordered_columns if col.visible and col.name != "marked"]
columns = [col for col in self.result_table._columns.ordered_columns if col.visible and col.name != "marked"]
colnames = [col.display for col in columns]
rows = []
for group_id, group in enumerate(self.results.groups):

View File

@@ -16,7 +16,7 @@ class ExcludeListTable(GUITable, DupeGuruGUIObject):
def __init__(self, exclude_list_dialog, app):
GUITable.__init__(self)
DupeGuruGUIObject.__init__(self, app)
self.columns = Columns(self)
self._columns = Columns(self)
self.dialog = exclude_list_dialog
def rename_selected(self, newname):

View File

@@ -22,7 +22,7 @@ class IgnoreListTable(GUITable):
def __init__(self, ignore_list_dialog):
GUITable.__init__(self)
self.columns = Columns(self)
self._columns = Columns(self)
self.view = None
self.dialog = ignore_list_dialog

View File

@@ -21,7 +21,7 @@ class ProblemTable(GUITable):
def __init__(self, problem_dialog):
GUITable.__init__(self)
self.columns = Columns(self)
self._columns = Columns(self)
self.dialog = problem_dialog
# --- Override

View File

@@ -82,7 +82,7 @@ class ResultTable(GUITable, DupeGuruGUIObject):
def __init__(self, app):
GUITable.__init__(self)
DupeGuruGUIObject.__init__(self, app)
self.columns = Columns(self, prefaccess=app, savename="ResultTable")
self._columns = Columns(self, prefaccess=app, savename="ResultTable")
self._power_marker = False
self._delta_values = False
self._sort_descriptors = ("name", True)
@@ -190,4 +190,4 @@ class ResultTable(GUITable, DupeGuruGUIObject):
self.view.refresh()
def save_session(self):
self.columns.save_columns()
self._columns.save_columns()

View File

@@ -17,9 +17,11 @@ class Markable:
# in self.__marked, and is not affected by __inverted. Thus, self.mark while __inverted
# is True will launch _DidUnmark.
def _did_mark(self, o):
# Implemented in child classes
pass
def _did_unmark(self, o):
# Implemented in child classes
pass
def _get_markable_count(self):

View File

@@ -151,8 +151,8 @@ class TestApp(TestAppBase):
def __init__(self):
def link_gui(gui):
gui.view = self.make_logger()
if hasattr(gui, "columns"): # tables
gui.columns.view = self.make_logger()
if hasattr(gui, "_columns"): # tables
gui._columns.view = self.make_logger()
return gui
TestAppBase.__init__(self)