Note that this does not change the text of the status property itself, so it can still be used for string comparisons. There are certain keyboard layout names that are the pathological case. --- pyanaconda/ui/gui/hubs/__init__.py | 6 +++++- pyanaconda/ui/gui/spokes/source.py | 5 +---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py index 498f6dc..e73f8af 100644 --- a/pyanaconda/ui/gui/hubs/__init__.py +++ b/pyanaconda/ui/gui/hubs/__init__.py @@ -182,8 +182,12 @@ class Hub(UIObject): setViewportBackground(viewport) def _updateCompleteness(self, spoke): + status = spoke.status + if len(status) > 42: + status = status[:30] + "..." + status[-12:] + spoke.selector.set_sensitive(spoke.ready) - spoke.selector.set_property("status", spoke.status) + spoke.selector.set_property("status", status) spoke.selector.set_incomplete(not spoke.completed) self._handleCompleteness(spoke) diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index 2dd9cc1..f607cdc 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -344,10 +344,7 @@ class SourceSpoke(NormalSpoke): @property def status(self): if self.data.method.method == "url": - if len(self.data.method.url) > 42: - return self.data.method.url[:30] + "..." + self.data.method.url[-12:] - else: - return self.data.method.url + return self.data.method.url elif self.data.method.method == "nfs": return _("NFS server %s") % self.data.method.server elif self.data.method.method == "cdrom": -- 1.7.8.4 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list