Removed view arguments from core.gui classes's init methods.

--HG--
branch : objp
This commit is contained in:
Virgil Dupras 2012-01-13 16:14:06 -05:00
parent 55db21f3e0
commit 58347bc36f
9 changed files with 20 additions and 22 deletions

View File

@ -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

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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)

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Created By: Virgil Dupras
# Created On: 2010-02-11
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)