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 > 64 Studio > 64 Studio User

 
 
LinkBack Thread Tools
 
Old 12-18-2009, 06:41 PM
Chris Lumens
 
Default Don't include advanced devices in the total count on the basic filter UI.

Seeing a count of more devices than you can find in the UI is confusing, so
only include them in the count if we're doing the advanced UI.
---
iw/filter_gui.py | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index 46c26c8..fd71833 100644
--- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -535,15 +535,23 @@ class FilterWindow(InstallWindow):
def populate(self, nonraids, mpaths, raids):
def _addTuple(tuple):
global totalDevices, totalSize
+ added = False

self.store.append(None, tuple)
- totalDevices += 1
- totalSize += tuple[0]["XXX_SIZE"]

for pg in self.pages:
if pg.cb.isMember(tuple[0]):
+ added = True
pg.cb.addToUI(tuple)

+ # Only update the size label if this device was added to any pages.
+ # This prevents situations where we're only displaying the basic
+ # filter that has one disk, but there are several advanced disks
+ # in the store that cannot be seen.
+ if added:
+ totalDevices += 1
+ totalSize += tuple[0]["XXX_SIZE"]
+
for d in nonraids:
partedDevice = parted.Device(path="/dev/" + udev_device_get_name(d))
d["XXX_SIZE"] = int(partedDevice.getSize())
--
1.6.5.1

_______________________________________________
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 01:28 AM.

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