[virt-tools-list] [PATCH 3/9] Updated removepool.py to use the grid screen helper function.
Darryl L. Pierce
dpierce at redhat.com
Fri Jul 22 15:32:06 UTC 2011
From: "Darryl L. Pierce" <dpierce at redhat.com>
---
src/virtManagerTui/removepool.py | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/virtManagerTui/removepool.py b/src/virtManagerTui/removepool.py
index 1c27f7f..754ddf0 100644
--- a/src/virtManagerTui/removepool.py
+++ b/src/virtManagerTui/removepool.py
@@ -18,7 +18,9 @@
# MA 02110-1301, USA. A copy of the GNU General Public License is
# also available at http://www.gnu.org/copyleft/gpl.html.
-import snack
+from snack import Checkbox
+from snack import Label
+
from storagelistconfigscreen import StorageListConfigScreen
LIST_POOLS_PAGE = 1
@@ -66,11 +68,11 @@ class RemoveStoragePoolConfigScreen(StorageListConfigScreen):
def get_confirm_page(self, screen):
ignore = screen
- self.__confirm = snack.Checkbox("Check here to confirm deleting pool: %s" % self.get_selected_pool())
- grid = snack.Grid(1, 1)
- grid.setField(self.__confirm, 0, 0)
- return [snack.Label("Remove Selected Storage Pool"),
- grid]
+ self.__confirm = Checkbox("Check here to confirm deleting pool: %s" % self.get_selected_pool())
+ fields = []
+ fields.append((None, self.__confirm))
+ return [Label("Remove Selected Storage Pool"),
+ self.create_grid_from_fields(fields)]
def RemoveStoragePool():
screen = RemoveStoragePoolConfigScreen()
--
1.7.6
More information about the virt-tools-list
mailing list