[node-patches] Change in ovirt-node[master]: network_page: Add NIC dialog buttons

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


Fabian Deutsch has uploaded a new change for review.

Change subject: network_page: Add NIC dialog buttons
......................................................................

network_page: Add NIC dialog buttons

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


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/26/9926/1

diff --git a/scripts/tui/src/ovirt/node/plugins/network_page.py b/scripts/tui/src/ovirt/node/plugins/network_page.py
index df1dbf2..32ffc82 100644
--- a/scripts/tui/src/ovirt/node/plugins/network_page.py
+++ b/scripts/tui/src/ovirt/node/plugins/network_page.py
@@ -154,7 +154,7 @@
         })
 
         padd = lambda l: l.ljust(14)
-        return self._build_dialog("dialog.nic", "NIC Details: %s" % iface, [
+        dialog = self._build_dialog("dialog.nic", "NIC Details: %s" % iface, [
             ("dialog.nic._row[0]", ovirt.node.ui.Row([
                 ("dialog.nic.iface",
                     ovirt.node.ui.KeywordLabel(padd("Interface: "))),
@@ -196,8 +196,18 @@
 
             ("dialog.nic.vlanid",
                     ovirt.node.ui.Entry(padd("VLAN ID: "))),
+
+            ("dialog.nic._buttons", ovirt.node.ui.Row([
+                ("dialog.nic.save",
+                        ovirt.node.ui.Button("Save & Close")),
+                ("dialog.nic.close",
+                        ovirt.node.ui.Button("Close")),
+            ]))
         ])
 
+        dialog.has_save_button = False
+        return dialog
+
     def on_change(self, changes):
         pass
 
diff --git a/scripts/tui/src/ovirt/node/ui/widgets.py b/scripts/tui/src/ovirt/node/ui/widgets.py
index 5409fb1..a21d6c8 100644
--- a/scripts/tui/src/ovirt/node/ui/widgets.py
+++ b/scripts/tui/src/ovirt/node/ui/widgets.py
@@ -181,8 +181,8 @@
 
         body = urwid.LineBox(body, title)
         overlay = urwid.Overlay(body, previous_widget, 'center',
-                                          ('relative', 70), 'middle',
-                                          ('relative', 70))
+                                          ('relative', 100), 'bottom',
+                                          ('relative', 100))
         overlay_attrmap = urwid.AttrMap(overlay, "plugin.widget.dialog")
         super(ModalDialog, self).__init__(overlay_attrmap)
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I389507d483b54c18a57b2a4f27f841b4332a0c5b
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