[anaconda][master/rhel7-branch][PATCH 1/2] Add a button for adding an ECKD DASD (#1070115)
Vratislav Podzimek
vpodzime at redhat.com
Fri Aug 29 06:55:21 UTC 2014
On Thu, 2014-08-28 at 15:18 -0400, Samantha N. Bueno wrote:
> This adds a button to the storage filter for manually adding an ECKD
> DASD.
>
> Resolves: rhbz#1070115
> ---
> pyanaconda/ui/gui/spokes/filter.glade | 19 +++++++++++++++++--
> pyanaconda/ui/gui/spokes/filter.py | 12 ++++++++++++
> 2 files changed, 29 insertions(+), 2 deletions(-)
>
> diff --git a/pyanaconda/ui/gui/spokes/filter.glade b/pyanaconda/ui/gui/spokes/filter.glade
> index ff0426d..57908e3 100644
> --- a/pyanaconda/ui/gui/spokes/filter.glade
> +++ b/pyanaconda/ui/gui/spokes/filter.glade
> @@ -1639,6 +1639,21 @@
> </packing>
> </child>
> <child>
> + <object class="GtkButton" id="addDASDButton">
> + <property name="label" translatable="yes">_Add DASD...</property>
> + <property name="visible">True</property>
> + <property name="can_focus">True</property>
> + <property name="receives_default">True</property>
> + <property name="use_underline">True</property>
> + <signal name="clicked" handler="on_add_dasd_clicked" swapped="no"/>
> + </object>
> + <packing>
> + <property name="expand">False</property>
> + <property name="fill">True</property>
> + <property name="position">1</property>
> + </packing>
> + </child>
> + <child>
> <object class="GtkButton" id="addISCSIButton">
> <property name="label" translatable="yes">Add _iSCSI Target...</property>
> <property name="visible">True</property>
> @@ -1650,7 +1665,7 @@
> <packing>
> <property name="expand">False</property>
> <property name="fill">True</property>
> - <property name="position">1</property>
> + <property name="position">2</property>
> </packing>
> </child>
> <child>
> @@ -1665,7 +1680,7 @@
> <packing>
> <property name="expand">False</property>
> <property name="fill">True</property>
> - <property name="position">2</property>
> + <property name="position">3</property>
> </packing>
> </child>
> </object>
> diff --git a/pyanaconda/ui/gui/spokes/filter.py b/pyanaconda/ui/gui/spokes/filter.py
> index 97b07ca..77977e1 100644
> --- a/pyanaconda/ui/gui/spokes/filter.py
> +++ b/pyanaconda/ui/gui/spokes/filter.py
> @@ -38,6 +38,7 @@ from pyanaconda.ui.gui.spokes import NormalSpoke
> from pyanaconda.ui.gui.spokes.advstorage.fcoe import FCoEDialog
> from pyanaconda.ui.gui.spokes.advstorage.iscsi import ISCSIDialog
> from pyanaconda.ui.gui.spokes.advstorage.zfcp import ZFCPDialog
> +from pyanaconda.ui.gui.spokes.advstorage.dasd import DASDDialog
> from pyanaconda.ui.gui.spokes.lib.cart import SelectedDisksDialog
> from pyanaconda.ui.gui.categories.system import SystemCategory
>
> @@ -677,6 +678,17 @@ class FilterSpoke(NormalSpoke):
> # storage are displayed in the UI.
> self.refresh()
>
> + def on_add_dasd_clicked(self, widget, *args):
> + dialog = DASDDialog(self.data, self.storage)
> +
> + with enlightbox(self.window, dialog.window):
> + dialog.refresh()
This line could be moved outside of the enlightboxed block. In case it
takes a some time to process, there'd be an empty lightbox or an empty
lightboxed dialog window in the meantime. Otherwise it is just a
neatpick from my side. :)
> + dialog.run()
> +
> + # We now need to refresh so any new disks picked up by adding advanced
> + # storage are displayed in the UI.
> + self.refresh()
> +
> ##
> ## SEARCH TAB SIGNAL HANDLERS
> ##
Looks good to me.
--
Vratislav Podzimek
Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list