[PATCH 2/2] Remove the window property from UIObject.
David Shea
dshea at redhat.com
Mon Jul 7 20:45:42 UTC 2014
Windows mean nothing outside of a GUI context, so let's stop pretending
that anything in the TUI can be treated the same as a Gtk object.
---
pyanaconda/ui/common.py | 7 -------
pyanaconda/ui/tui/simpleline/base.py | 7 +------
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py
index 5c1caf2..b151afe 100644
--- a/pyanaconda/ui/common.py
+++ b/pyanaconda/ui/common.py
@@ -102,13 +102,6 @@ class UIObject(object):
pass
@property
- def window(self):
- """Return an object with show_all and hide methods that is to be used
- to display this UI object.
- """
- raise TypeError("UIObject.window has to be overriden")
-
- @property
def data(self):
return self._data
diff --git a/pyanaconda/ui/tui/simpleline/base.py b/pyanaconda/ui/tui/simpleline/base.py
index fefbf80..89e9da9 100644
--- a/pyanaconda/ui/tui/simpleline/base.py
+++ b/pyanaconda/ui/tui/simpleline/base.py
@@ -279,7 +279,7 @@ class App(object):
# get the widget tree from the screen and show it in the screen
try:
input_needed = screen.refresh(args)
- screen.window.show_all()
+ screen.show_all()
self._redraw = False
except ExitMainLoop:
raise
@@ -531,11 +531,6 @@ class UIScreen(object):
self._window = [_(self.title), u""]
return True
- @property
- def window(self):
- """Return reference to the window instance. In TUI, just return self."""
- return self
-
def _print_long_widget(self, widget):
"""Prints a long widget (possibly longer than the screen height) with
user interaction (when needed).
--
2.0.0
More information about the anaconda-patches
mailing list