FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Development

 
 
LinkBack Thread Tools
 
Old 01-28-2010, 05:23 PM
Hans de Goede
 
Default Skip the filtering UI if there's only one disk in the machine.

Hi,

On 01/28/2010 05:54 PM, Chris Lumens wrote:

For the common home/laptop use case, the user likely only has one disk. If
that's the case and they pick the Basic filtering UI (indicating they don't
want to add fcoe/iscsi/whatever disks), then there's no point in showing
these UI components.
---
iw/cleardisks_gui.py | 7 +++++++
iw/filter_gui.py | 26 +++++++++++++++++---------
2 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/iw/cleardisks_gui.py b/iw/cleardisks_gui.py
index dfad7d6..bab9c51 100644
--- a/iw/cleardisks_gui.py
+++ b/iw/cleardisks_gui.py
@@ -64,6 +64,13 @@ class ClearDisksWindow (InstallWindow):
self.anaconda.id.bootloader.drivelist = [bootDisk] + cleardisks

def getScreen (self, anaconda):
+ # Skip this screen as well if we only had one disk available in the
+ # filtering UI.
+ if len(anaconda.id.storage.exclusiveDisks) == 1:
+ anaconda.id.storage.clearPartDisks = anaconda.id.storage.exclusiveDisks
+ anaconda.id.bootloader.drivelist = anaconda.id.storage.exclusiveDisks
+ return None
+
(xml, self.vbox) = gui.getGladeWidget("cleardisks.glade", "vbox")
self.leftScroll = xml.get_widget("leftScroll")
self.rightScroll = xml.get_widget("rightScroll")
diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index 4ba32a7..5c13787 100644
--- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -515,15 +515,6 @@ class FilterWindow(InstallWindow):
gobject.TYPE_STRING)
self.store.set_sort_column_id(MODEL_COL, gtk.SORT_ASCENDING)

- if anaconda.id.simpleFilter:
- self.pages = [self._makeBasic()]
- self.notebook.set_show_border(False)
- self.notebook.set_show_tabs(False)
- else:
- self.pages = [self._makeBasic(), self._makeRAID(),
- self._makeMPath(), self._makeOther(),
- self._makeSearch()]
-
udev_trigger(subsystem="block")
disks = filter(udev_device_is_disk, udev_get_block_devices())
(singlepaths, mpaths, partitions) = identifyMultipaths(disks)
@@ -534,6 +525,23 @@ class FilterWindow(InstallWindow):
(raids, nonraids) = self.split_list(lambda d: isRAID(d) and not isCCISS(d),
singlepaths)

+ if anaconda.id.simpleFilter:
+ # In the typical use case, the user likely only has one drive and
+ # there's no point showing either the filtering UI or the
+ # cleardisks UI. Unfortunately, that means we need to duplicate
+ # some of the getNext method.
+ if len(singlepaths) == 1:
+ anaconda.id.storage.exclusiveDisks = [udev_device_get_name(singlepaths[0])]
+ return None
+


Note if we decide to also show BIOS RAID in the simple view this if needs to change.


+ self.pages = [self._makeBasic()]
+ self.notebook.set_show_border(False)
+ self.notebook.set_show_tabs(False)
+ else:
+ self.pages = [self._makeBasic(), self._makeRAID(),
+ self._makeMPath(), self._makeOther(),
+ self._makeSearch()]
+
self.populate(nonraids, mpaths, raids)

# If the "Add Advanced" button is ever clicked, we need to have a list


Ack!

Regards,

Hans

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-29-2010, 03:12 PM
Chris Lumens
 
Default Skip the filtering UI if there's only one disk in the machine.

> >@@ -534,6 +525,23 @@ class FilterWindow(InstallWindow):
> > (raids, nonraids) = self.split_list(lambda d: isRAID(d) and not isCCISS(d),
> > singlepaths)
> >
> >+ if anaconda.id.simpleFilter:
> >+ # In the typical use case, the user likely only has one drive and
> >+ # there's no point showing either the filtering UI or the
> >+ # cleardisks UI. Unfortunately, that means we need to duplicate
> >+ # some of the getNext method.
> >+ if len(singlepaths) == 1:
> >+ anaconda.id.storage.exclusiveDisks = [udev_device_get_name(singlepaths[0])]
> >+ return None
> >+
>
> Note if we decide to also show BIOS RAID in the simple view this if needs to change.

Okay, let's address this separately.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 07:38 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org