[node-patches] Change in ovirt-node[master]: ui.builder: Disable SaveButton initially

fabiand at fedoraproject.org fabiand at fedoraproject.org
Tue Dec 11 20:09:43 UTC 2012


Fabian Deutsch has uploaded a new change for review.

Change subject: ui.builder: Disable SaveButton initially
......................................................................

ui.builder: Disable SaveButton initially

Change-Id: I95708732ef333d450d990441f555290690bac05b
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/ui/builder.py
M scripts/tui/src/ovirt/node/ui/tui.py
M scripts/tui/src/ovirt/node/ui/widgets.py
3 files changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/75/9975/1

diff --git a/scripts/tui/src/ovirt/node/ui/builder.py b/scripts/tui/src/ovirt/node/ui/builder.py
index fa37c73..1b502a1 100644
--- a/scripts/tui/src/ovirt/node/ui/builder.py
+++ b/scripts/tui/src/ovirt/node/ui/builder.py
@@ -196,6 +196,7 @@
         def on_valid_cb(w, v):
             widget.enable(plugin.is_valid_changes())
         plugin.sig_valid.connect(on_valid_cb)
+        on_valid_cb(None, None)
 
     def on_widget_click_cb(widget, data=None):
         LOGGER.debug("Button click: %s" % {"path": path, "widget": widget})
diff --git a/scripts/tui/src/ovirt/node/ui/tui.py b/scripts/tui/src/ovirt/node/ui/tui.py
index 9db25aa..8592f5e 100644
--- a/scripts/tui/src/ovirt/node/ui/tui.py
+++ b/scripts/tui/src/ovirt/node/ui/tui.py
@@ -96,6 +96,7 @@
                ('plugin.widget.page', None),
                ('plugin.widget.page.frame', None),
                ('plugin.widget.checkbox.label', element_styles["label"]),
+               ('plugin.widget.checkbox', element_styles["label"]),
                ]
 
     def __init__(self, app):
diff --git a/scripts/tui/src/ovirt/node/ui/widgets.py b/scripts/tui/src/ovirt/node/ui/widgets.py
index 1ee45bd..1273ac4 100644
--- a/scripts/tui/src/ovirt/node/ui/widgets.py
+++ b/scripts/tui/src/ovirt/node/ui/widgets.py
@@ -407,7 +407,7 @@
             if option_key == selected_option_key:
                 widget.set_state(True)
             widget_attr = urwid.AttrMap(widget, self._option_attr)
-            self._buttons.append(widget)
+            self._buttons.append(widget_attr)
         self._columns = urwid.Columns([self._label_attrmap] + self._buttons)
         self._pile = urwid.Pile([urwid.Divider(), self._columns,
                                  urwid.Divider()])
@@ -440,9 +440,11 @@
         self._label_attrmap = urwid.AttrMap(self._label,
                                             "plugin.widget.checkbox.label")
         self._checkbox = urwid.CheckBox("", state)
+        self._checkbox_attrmap = urwid.AttrMap(self._checkbox,
+                                               "plugin.widget.checkbox")
         self._divider = urwid.Divider()
         self._container = urwid.Columns([self._label_attrmap,
-                                         self._checkbox])
+                                         self._checkbox_attrmap])
 
         def on_change_cb(widget, new_value):
             urwid.emit_signal(self, 'change', self, new_value)


--
To view, visit http://gerrit.ovirt.org/9975
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95708732ef333d450d990441f555290690bac05b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list