mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Removed view arguments from core.gui classes's init methods.
--HG-- branch : objp
This commit is contained in:
parent
55db21f3e0
commit
58347bc36f
12
core/app.py
12
core/app.py
@ -106,12 +106,12 @@ class DupeGuru(RegistrableApplication, Broadcaster):
|
|||||||
'ignore_hardlink_matches': False,
|
'ignore_hardlink_matches': False,
|
||||||
}
|
}
|
||||||
self.selected_dupes = []
|
self.selected_dupes = []
|
||||||
self.details_panel = DetailsPanel(None, self)
|
self.details_panel = DetailsPanel(self)
|
||||||
self.directory_tree = DirectoryTree(None, self)
|
self.directory_tree = DirectoryTree(self)
|
||||||
self.extra_fairware_reminder = ExtraFairwareReminder(None, self)
|
self.extra_fairware_reminder = ExtraFairwareReminder(self)
|
||||||
self.prioritize_dialog = PrioritizeDialog(None, self)
|
self.prioritize_dialog = PrioritizeDialog(self)
|
||||||
self.problem_dialog = ProblemDialog(None, self)
|
self.problem_dialog = ProblemDialog(self)
|
||||||
self.stats_label = StatsLabel(None, self)
|
self.stats_label = StatsLabel(self)
|
||||||
# subclasses must create self.result_table
|
# subclasses must create self.result_table
|
||||||
|
|
||||||
#--- Virtual
|
#--- Virtual
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Created By: Virgil Dupras
|
# Created By: Virgil Dupras
|
||||||
# Created On: 2010-02-06
|
# Created On: 2010-02-06
|
||||||
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
|
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
|
||||||
@ -8,12 +7,12 @@
|
|||||||
# http://www.hardcoded.net/licenses/bsd_license
|
# http://www.hardcoded.net/licenses/bsd_license
|
||||||
|
|
||||||
from hscommon.notify import Listener
|
from hscommon.notify import Listener
|
||||||
|
from hscommon.gui.base import NoopGUI
|
||||||
|
|
||||||
class GUIObject(Listener):
|
class GUIObject(Listener):
|
||||||
def __init__(self, view, app):
|
def __init__(self, app):
|
||||||
Listener.__init__(self, app)
|
Listener.__init__(self, app)
|
||||||
if view is not None:
|
self.view = NoopGUI()
|
||||||
self.view = view
|
|
||||||
self.app = app
|
self.app = app
|
||||||
|
|
||||||
def directories_changed(self):
|
def directories_changed(self):
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
from .base import GUIObject
|
from .base import GUIObject
|
||||||
|
|
||||||
class DetailsPanel(GUIObject):
|
class DetailsPanel(GUIObject):
|
||||||
def __init__(self, view, app):
|
def __init__(self, app):
|
||||||
GUIObject.__init__(self, view, app)
|
GUIObject.__init__(self, app)
|
||||||
self._table = []
|
self._table = []
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
|
@ -59,8 +59,8 @@ class DirectoryTree(GUIObject, Tree):
|
|||||||
# refresh()
|
# refresh()
|
||||||
# refresh_states() # when only states label need to be refreshed
|
# refresh_states() # when only states label need to be refreshed
|
||||||
#
|
#
|
||||||
def __init__(self, view, app):
|
def __init__(self, app):
|
||||||
GUIObject.__init__(self, view, app)
|
GUIObject.__init__(self, app)
|
||||||
Tree.__init__(self)
|
Tree.__init__(self)
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
|
@ -40,7 +40,7 @@ class PrioritizationList(GUISelectableList):
|
|||||||
self._refresh_contents()
|
self._refresh_contents()
|
||||||
|
|
||||||
class PrioritizeDialog:
|
class PrioritizeDialog:
|
||||||
def __init__(self, view, app):
|
def __init__(self, app):
|
||||||
self.app = app
|
self.app = app
|
||||||
self.categories = [cat(app.results) for cat in app._prioritization_categories()]
|
self.categories = [cat(app.results) for cat in app._prioritization_categories()]
|
||||||
self.category_list = CriterionCategoryList(self)
|
self.category_list = CriterionCategoryList(self)
|
||||||
|
@ -12,11 +12,11 @@ from .base import GUIObject
|
|||||||
from .problem_table import ProblemTable
|
from .problem_table import ProblemTable
|
||||||
|
|
||||||
class ProblemDialog(GUIObject, Broadcaster):
|
class ProblemDialog(GUIObject, Broadcaster):
|
||||||
def __init__(self, view, app):
|
def __init__(self, app):
|
||||||
GUIObject.__init__(self, view, app)
|
GUIObject.__init__(self, app)
|
||||||
Broadcaster.__init__(self)
|
Broadcaster.__init__(self)
|
||||||
self._selected_dupe = None
|
self._selected_dupe = None
|
||||||
self.problem_table = ProblemTable(None, self)
|
self.problem_table = ProblemTable(self)
|
||||||
|
|
||||||
def reveal_selected_dupe(self):
|
def reveal_selected_dupe(self):
|
||||||
if self._selected_dupe is not None:
|
if self._selected_dupe is not None:
|
||||||
|
@ -19,11 +19,11 @@ class ProblemTable(GUITable, Listener):
|
|||||||
Column('msg', coltr("Error Message")),
|
Column('msg', coltr("Error Message")),
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, view, problem_dialog):
|
def __init__(self, problem_dialog):
|
||||||
GUITable.__init__(self)
|
GUITable.__init__(self)
|
||||||
Listener.__init__(self, problem_dialog)
|
Listener.__init__(self, problem_dialog)
|
||||||
self.columns = Columns(self)
|
self.columns = Columns(self)
|
||||||
self.view = view
|
self.view = None
|
||||||
self.dialog = problem_dialog
|
self.dialog = problem_dialog
|
||||||
|
|
||||||
#--- Override
|
#--- Override
|
||||||
|
@ -53,7 +53,7 @@ class DupeRow(Row):
|
|||||||
|
|
||||||
class ResultTable(GUIObject, GUITable):
|
class ResultTable(GUIObject, GUITable):
|
||||||
def __init__(self, app):
|
def __init__(self, app):
|
||||||
GUIObject.__init__(self, None, app)
|
GUIObject.__init__(self, app)
|
||||||
GUITable.__init__(self)
|
GUITable.__init__(self)
|
||||||
self.columns = Columns(self, prefaccess=app, savename='ResultTable')
|
self.columns = Columns(self, prefaccess=app, savename='ResultTable')
|
||||||
self._power_marker = False
|
self._power_marker = False
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Created By: Virgil Dupras
|
# Created By: Virgil Dupras
|
||||||
# Created On: 2010-02-11
|
# Created On: 2010-02-11
|
||||||
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
|
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user