[PATCH 6/9] Add device node names to the resize dialog as a new column.
Chris Lumens
clumens at redhat.com
Wed Mar 20 20:28:26 UTC 2013
This is how we do it on the shopping cart, too, so it's good to try to
do the same thing in multiple places.
---
pyanaconda/ui/gui/spokes/lib/resize.glade | 13 +++++++++++++
pyanaconda/ui/gui/spokes/lib/resize.py | 12 ++++++++----
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.glade b/pyanaconda/ui/gui/spokes/lib/resize.glade
index 3ccb00e..0c1ce28 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.glade
+++ b/pyanaconda/ui/gui/spokes/lib/resize.glade
@@ -19,6 +19,8 @@
<column type="gchararray"/>
<!-- column-name diskResizeTarget -->
<column type="gfloat"/>
+ <!-- column-name diskName -->
+ <column type="gchararray"/>
</columns>
</object>
<object class="GtkDialog" id="resizeDialog">
@@ -147,6 +149,17 @@
</object>
</child>
<child>
+ <object class="GtkTreeViewColumn" id="nameColumn">
+ <property name="title" translatable="yes">Name</property>
+ <child>
+ <object class="GtkCellRendererText" id="nameRenderer"/>
+ <attributes>
+ <attribute name="text">8</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
<object class="GtkTreeViewColumn" id="fsColumn">
<property name="title" translatable="yes">Filesystem</property>
<child>
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py b/pyanaconda/ui/gui/spokes/lib/resize.py
index 0d768fe..7a88d86 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.py
+++ b/pyanaconda/ui/gui/spokes/lib/resize.py
@@ -1,6 +1,6 @@
# Disk resizing dialog
#
-# Copyright (C) 2012 Red Hat, Inc.
+# Copyright (C) 2012-2013 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
@@ -43,6 +43,7 @@ ACTION_COL = 4
EDITABLE_COL = 5
TOOLTIP_COL = 6
RESIZE_TARGET_COL = 7
+NAME_COL = 8
PRESERVE = N_("Preserve")
SHRINK = N_("Shrink")
@@ -132,7 +133,8 @@ class ResizeDialog(GUIObject):
_(PRESERVE),
editable,
self._get_tooltip(disk),
- disk.size])
+ disk.size,
+ disk.name])
if disk.partitioned:
# Then add all its partitions.
@@ -158,7 +160,8 @@ class ResizeDialog(GUIObject):
_(PRESERVE),
not dev.protected,
self._get_tooltip(dev),
- dev.size])
+ dev.size,
+ dev.name])
diskReclaimableSpace += freeSize
# And then add another uneditable line that lists how much space is
@@ -173,7 +176,8 @@ class ResizeDialog(GUIObject):
_(PRESERVE),
False,
self._get_tooltip(disk),
- float(converted)])
+ float(converted),
+ ""])
self._initialFreeSpace += diskFree
# And then go back and fill in the total reclaimable space for the
--
1.8.1.2
More information about the anaconda-patches
mailing list