[PATCH] Add more information to the custom part summary dialog (#975804).
Chris Lumens
clumens at redhat.com
Tue Aug 5 14:36:31 UTC 2014
This should hopefully make it a little more clear which devices are being
acted upon.
---
pyanaconda/ui/gui/spokes/lib/summary.glade | 5 ++++-
pyanaconda/ui/gui/spokes/lib/summary.py | 20 +++++++++++++++++---
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/summary.glade b/pyanaconda/ui/gui/spokes/lib/summary.glade
index e1584f6..f0f33b5 100644
--- a/pyanaconda/ui/gui/spokes/lib/summary.glade
+++ b/pyanaconda/ui/gui/spokes/lib/summary.glade
@@ -14,6 +14,8 @@
<column type="gchararray"/>
<!-- column-name actionMountpoint -->
<column type="gchararray"/>
+ <!-- column-name diskTooltip -->
+ <column type="gchararray"/>
</columns>
</object>
<object class="GtkDialog" id="summaryDialog">
@@ -120,6 +122,7 @@
<property name="can_focus">True</property>
<property name="model">actionStore</property>
<property name="headers_clickable">False</property>
+ <property name="tooltip_column">5</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1">
<property name="mode">none</property>
@@ -160,7 +163,7 @@
</child>
<child>
<object class="GtkTreeViewColumn" id="deviceNameColumn">
- <property name="title" translatable="yes">Device Name</property>
+ <property name="title" translatable="yes">Device</property>
<child>
<object class="GtkCellRendererText" id="deviceNameRenderer"/>
<attributes>
diff --git a/pyanaconda/ui/gui/spokes/lib/summary.py b/pyanaconda/ui/gui/spokes/lib/summary.py
index f98db86..ea41734 100644
--- a/pyanaconda/ui/gui/spokes/lib/summary.py
+++ b/pyanaconda/ui/gui/spokes/lib/summary.py
@@ -1,6 +1,6 @@
# Action summary dialog
#
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2014 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
@@ -21,6 +21,7 @@
from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.gui.utils import escape_markup
+from pyanaconda.i18n import _
from blivet.deviceaction import ACTION_TYPE_DESTROY, ACTION_TYPE_RESIZE, ACTION_OBJECT_FORMAT
@@ -49,11 +50,24 @@ class ActionSummaryDialog(GUIObject):
if action.obj == ACTION_OBJECT_FORMAT:
mountpoint = getattr(action.device.format, "mountpoint", "")
+ if hasattr(action.device, "description"):
+ desc = _("%(description)s (%(deviceName)s)") % {"deviceName": action.device.name,
+ "description": action.device.description}
+ serial = action.device.serial
+ elif hasattr(action.device, "disk"):
+ desc = _("%(deviceName)s on %(container)s") % {"deviceName": action.device.name,
+ "container": action.device.disk.description}
+ serial = action.device.disk.serial
+ else:
+ desc = action.device.name
+ serial = action.device.serial
+
self._store.append([i,
typeString,
action.objectTypeString,
- action.device.name,
- mountpoint])
+ desc,
+ mountpoint,
+ serial])
# pylint: disable=arguments-differ
def refresh(self, actions):
--
1.9.3
More information about the anaconda-patches
mailing list