[kupfer] favorites: Provide anything
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] favorites: Provide anything
- Date: Mon, 11 Jan 2010 22:51:30 +0000 (UTC)
commit 6ff438d45829707c41c84f10d15bcc7f4cf45d78
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Mon Jan 11 03:00:06 2010 +0100
favorites: Provide anything
kupfer/plugin/favorites.py | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/kupfer/plugin/favorites.py b/kupfer/plugin/favorites.py
index d49e312..2fa321b 100644
--- a/kupfer/plugin/favorites.py
+++ b/kupfer/plugin/favorites.py
@@ -15,10 +15,6 @@ __description__ = _("Mark commonly used items and store objects for later use")
__version__ = "2009-12-30"
__author__ = "Ulrik Sverdrup <ulrik sverdrup gmail com>"
-def _FavoritesLeafTypes():
- """reasonable pickleable types"""
- yield Leaf
-
class FavoritesSource (Source):
"""Keep a list of Leaves that the User may add and remove from"""
instance = None
@@ -128,7 +124,8 @@ class FavoritesSource (Source):
return "emblem-favorite"
def provides(self):
- return list(_FavoritesLeafTypes())
+ # returning nothing means it provides anything
+ return ()
class AddFavorite (Action):
# Rank down, since it applies everywhere
@@ -138,7 +135,7 @@ class AddFavorite (Action):
def activate(self, leaf):
FavoritesSource.add(leaf)
def item_types(self):
- return list(_FavoritesLeafTypes())
+ return (Leaf, )
def valid_for_item(self, item):
return not FavoritesSource.has_item(item)
def get_description(self):
@@ -153,7 +150,7 @@ class RemoveFavorite (Action):
def activate(self, leaf):
FavoritesSource.remove(leaf)
def item_types(self):
- return list(_FavoritesLeafTypes())
+ return (Leaf, )
def valid_for_item(self, item):
return FavoritesSource.has_item(item)
def get_description(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]