Skip to content

Commit

Permalink
Connect the dasd number entry to the discovery buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
dashea committed Jul 7, 2015
1 parent b111c73 commit 6ed557d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyanaconda/ui/gui/spokes/advstorage/dasd.glade
Expand Up @@ -102,6 +102,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<signal name="activate" handler="on_device_entry_activate" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
Expand Down
10 changes: 10 additions & 0 deletions pyanaconda/ui/gui/spokes/advstorage/dasd.py
Expand Up @@ -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")

Expand Down Expand Up @@ -128,3 +129,12 @@ def _discover(self, device):
except blockdev.S390Error as err:
self._discoveryError = str(err)
return

def on_device_entry_activate(self, entry, user_data=None):
# If the user hit Enter while the start button is displayed, activate
# whichever button is displayed.
current_page = self._conditionNotebook.get_current_page()
if current_page == 0:
self._startButton.clicked()
elif current_page == 2:
self._retryButton.clicked()

0 comments on commit 6ed557d

Please sign in to comment.