diff --git a/core/app.py b/core/app.py index bbbc20ce..92cf8042 100644 --- a/core/app.py +++ b/core/app.py @@ -106,12 +106,12 @@ class DupeGuru(RegistrableApplication, Broadcaster): 'ignore_hardlink_matches': False, } self.selected_dupes = [] - self.details_panel = DetailsPanel(None, self) - self.directory_tree = DirectoryTree(None, self) - self.extra_fairware_reminder = ExtraFairwareReminder(None, self) - self.prioritize_dialog = PrioritizeDialog(None, self) - self.problem_dialog = ProblemDialog(None, self) - self.stats_label = StatsLabel(None, self) + self.details_panel = DetailsPanel(self) + self.directory_tree = DirectoryTree(self) + self.extra_fairware_reminder = ExtraFairwareReminder(self) + self.prioritize_dialog = PrioritizeDialog(self) + self.problem_dialog = ProblemDialog(self) + self.stats_label = StatsLabel(self) # subclasses must create self.result_table #--- Virtual diff --git a/core/gui/base.py b/core/gui/base.py index d7a4d592..e78ac60d 100644 --- a/core/gui/base.py +++ b/core/gui/base.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Created By: Virgil Dupras # Created On: 2010-02-06 # Copyright 2011 Hardcoded Software (http://www.hardcoded.net) @@ -8,12 +7,12 @@ # http://www.hardcoded.net/licenses/bsd_license from hscommon.notify import Listener +from hscommon.gui.base import NoopGUI class GUIObject(Listener): - def __init__(self, view, app): + def __init__(self, app): Listener.__init__(self, app) - if view is not None: - self.view = view + self.view = NoopGUI() self.app = app def directories_changed(self): diff --git a/core/gui/details_panel.py b/core/gui/details_panel.py index 3f418aa6..e1e76d0c 100644 --- a/core/gui/details_panel.py +++ b/core/gui/details_panel.py @@ -9,8 +9,8 @@ from .base import GUIObject class DetailsPanel(GUIObject): - def __init__(self, view, app): - GUIObject.__init__(self, view, app) + def __init__(self, app): + GUIObject.__init__(self, app) self._table = [] def connect(self): diff --git a/core/gui/directory_tree.py b/core/gui/directory_tree.py index 6bba4fd6..7c323feb 100644 --- a/core/gui/directory_tree.py +++ b/core/gui/directory_tree.py @@ -59,8 +59,8 @@ class DirectoryTree(GUIObject, Tree): # refresh() # refresh_states() # when only states label need to be refreshed # - def __init__(self, view, app): - GUIObject.__init__(self, view, app) + def __init__(self, app): + GUIObject.__init__(self, app) Tree.__init__(self) def connect(self): diff --git a/core/gui/prioritize_dialog.py b/core/gui/prioritize_dialog.py index d458f6cb..b7a9b3a1 100644 --- a/core/gui/prioritize_dialog.py +++ b/core/gui/prioritize_dialog.py @@ -40,7 +40,7 @@ class PrioritizationList(GUISelectableList): self._refresh_contents() class PrioritizeDialog: - def __init__(self, view, app): + def __init__(self, app): self.app = app self.categories = [cat(app.results) for cat in app._prioritization_categories()] self.category_list = CriterionCategoryList(self) diff --git a/core/gui/problem_dialog.py b/core/gui/problem_dialog.py index 628b3bf6..b636c4f3 100644 --- a/core/gui/problem_dialog.py +++ b/core/gui/problem_dialog.py @@ -12,11 +12,11 @@ from .base import GUIObject from .problem_table import ProblemTable class ProblemDialog(GUIObject, Broadcaster): - def __init__(self, view, app): - GUIObject.__init__(self, view, app) + def __init__(self, app): + GUIObject.__init__(self, app) Broadcaster.__init__(self) self._selected_dupe = None - self.problem_table = ProblemTable(None, self) + self.problem_table = ProblemTable(self) def reveal_selected_dupe(self): if self._selected_dupe is not None: diff --git a/core/gui/problem_table.py b/core/gui/problem_table.py index 62b04721..3c830b72 100644 --- a/core/gui/problem_table.py +++ b/core/gui/problem_table.py @@ -19,11 +19,11 @@ class ProblemTable(GUITable, Listener): Column('msg', coltr("Error Message")), ] - def __init__(self, view, problem_dialog): + def __init__(self, problem_dialog): GUITable.__init__(self) Listener.__init__(self, problem_dialog) self.columns = Columns(self) - self.view = view + self.view = None self.dialog = problem_dialog #--- Override diff --git a/core/gui/result_table.py b/core/gui/result_table.py index 5c4a8286..7cc7ad62 100644 --- a/core/gui/result_table.py +++ b/core/gui/result_table.py @@ -53,7 +53,7 @@ class DupeRow(Row): class ResultTable(GUIObject, GUITable): def __init__(self, app): - GUIObject.__init__(self, None, app) + GUIObject.__init__(self, app) GUITable.__init__(self) self.columns = Columns(self, prefaccess=app, savename='ResultTable') self._power_marker = False diff --git a/core/gui/stats_label.py b/core/gui/stats_label.py index 2f9d22ba..54c22ac1 100644 --- a/core/gui/stats_label.py +++ b/core/gui/stats_label.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Created By: Virgil Dupras # Created On: 2010-02-11 # Copyright 2011 Hardcoded Software (http://www.hardcoded.net)