[master 7/7] Connect zfcp entries to the discovery buttons
dashea
installerbot-noreply at redhat.com
Tue Jul 7 14:15:59 UTC 2015
From: David Shea <dshea at redhat.com>
---
pyanaconda/ui/gui/spokes/advstorage/zfcp.glade | 3 +++
pyanaconda/ui/gui/spokes/advstorage/zfcp.py | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/advstorage/zfcp.glade b/pyanaconda/ui/gui/spokes/advstorage/zfcp.glade
index 5d00af9..646a88a 100644
--- a/pyanaconda/ui/gui/spokes/advstorage/zfcp.glade
+++ b/pyanaconda/ui/gui/spokes/advstorage/zfcp.glade
@@ -117,6 +117,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
+ <signal name="activate" handler="on_entry_activated" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
@@ -143,6 +144,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
+ <signal name="activate" handler="on_entry_activated" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
@@ -342,6 +344,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
+ <signal name="activate" handler="on_entry_activated" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/pyanaconda/ui/gui/spokes/advstorage/zfcp.py b/pyanaconda/ui/gui/spokes/advstorage/zfcp.py
index 5523b16..544142a 100644
--- a/pyanaconda/ui/gui/spokes/advstorage/zfcp.py
+++ b/pyanaconda/ui/gui/spokes/advstorage/zfcp.py
@@ -49,6 +49,7 @@ def __init__(self, data, storage):
self._startButton = self.builder.get_object("startButton")
self._okButton = self.builder.get_object("okButton")
self._cancelButton = self.builder.get_object("cancelButton")
+ self._retryButton = self.builder.get_object("retryButton")
self._deviceEntry = self.builder.get_object("deviceEntry")
self._wwpnEntry = self.builder.get_object("wwpnEntry")
@@ -140,3 +141,11 @@ def _discover(self, *args):
except ValueError as e:
self._discoveryError = str(e)
return
+
+ def on_entry_activated(self, entry, user_data=None):
+ # When an entry is activated, press the discover or retry button
+ current_page = self._conditionNotebook.get_current_page()
+ if current_page == 0:
+ self._startButton.clicked()
+ elif current_page == 2:
+ self._retryButton.clicked()
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/c735cbe19476c5e184566701f0cd19e511e1cd64
More information about the anaconda-patches
mailing list