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 > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 01-25-2010, 08:17 PM
Chris Lumens
 
Default Fix visibility counting on filter notebook pages.

Since all notebook pages share the same store, a device being visible on one
page means it'll be counted as being visible on all pages. That means
flipping to the correct initial page doesn't work. Instead, we need to count
using the visible methods on callback objects to only count the devices that
are members of each page as visible.
---
iw/filter_gui.py | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index 4247503..efdb5a4 100644
--- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -357,7 +357,16 @@ class NotebookPage(object):
self.filteredModel.refilter()

def getNVisible(self):
- return self.ds.getNVisible()
+ retval = 0
+ iter = self.filteredModel.get_iter_first()
+
+ while iter:
+ if self.cb.visible(self.filteredModel, iter, self.treeView):
+ retval += 1
+
+ iter = self.filteredModel.iter_next(iter)
+
+ return retval

class FilterWindow(InstallWindow):
windowTitle = N_("Device Filter")
--
1.6.5.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-26-2010, 07:38 AM
Ales Kozumplik
 
Default Fix visibility counting on filter notebook pages.

@@ -357,7 +357,16 @@ class NotebookPage(object):
self.filteredModel.refilter()

def getNVisible(self):
- return self.ds.getNVisible()
+ retval = 0
+ iter = self.filteredModel.get_iter_first()
+
+ while iter:
+ if self.cb.visible(self.filteredModel, iter, self.treeView):
+ retval += 1
+
+ iter = self.filteredModel.iter_next(iter)
+
+ return retval

class FilterWindow(InstallWindow):
windowTitle = N_("Device Filter")


I can't really see the details, but it looks good to me.

_______________________________________________
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 04:30 AM.

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