diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-03-04 18:44:41 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-03-04 18:44:41 (GMT) |
commit | efe30813637d5857d346ed7bd83dd9dd0ca8d359 (patch) | |
tree | a1d768a3f3ef97a88af77393580060d91c35efa0 /listview.py | |
parent | 8f988a9b3054c30ad41472bce63130b8ebe53424 (diff) |
Implement filtering and refresh on focus-in.
Diffstat (limited to 'listview.py')
-rw-r--r-- | listview.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/listview.py b/listview.py index 36e8551..3db99a7 100644 --- a/listview.py +++ b/listview.py @@ -14,6 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA import os +import logging import hippo import gobject @@ -45,11 +46,11 @@ class ListView(hippo.CanvasWidget, hippo.CanvasItem): def __init__(self): self._expanded = False + self._query = '' + self._entries = None hippo.CanvasWidget.__init__(self) - self._entries = datastore.find('') - self._box = hippo.CanvasBox() self._box.props.background_color = color.DESKTOP_BACKGROUND.get_int() self._box.props.spacing = units.points_to_pixels(5) @@ -68,6 +69,7 @@ class ListView(hippo.CanvasWidget, hippo.CanvasItem): canvas.show() def update_with_query(self, query): + self._query = query self._entries = datastore.find(query) self._update() |