[kupfer/next] Adapt plugins Core (Text) and Shell Commands to get_text_items



commit 359df88854255ba0cdbe244697ac53ad5eae6c73
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Sun Jan 24 23:07:26 2010 +0100

    Adapt plugins Core (Text) and Shell Commands to get_text_items

 kupfer/plugin/commands.py  |    2 +-
 kupfer/plugin/core/text.py |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/kupfer/plugin/commands.py b/kupfer/plugin/commands.py
index 380b522..80312d4 100644
--- a/kupfer/plugin/commands.py
+++ b/kupfer/plugin/commands.py
@@ -43,7 +43,7 @@ class CommandTextSource (TextSource):
 	def get_rank(self):
 		return 80
 
-	def get_items(self, text):
+	def get_text_items(self, text):
 		if not text.strip():
 			return
 		if len(text.splitlines()) > 1:
diff --git a/kupfer/plugin/core/text.py b/kupfer/plugin/core/text.py
index d2c0b16..1030ab3 100644
--- a/kupfer/plugin/core/text.py
+++ b/kupfer/plugin/core/text.py
@@ -21,7 +21,7 @@ class BasicTextSource (TextSource):
 	def __init__(self):
 		TextSource.__init__(self, name=_("Text Matches"))
 
-	def get_items(self, text):
+	def get_text_items(self, text):
 		if not text:
 			return
 		yield TextLeaf(text)
@@ -36,7 +36,7 @@ class PathTextSource (TextSource):
 
 	def get_rank(self):
 		return 80
-	def get_items(self, text):
+	def get_text_items(self, text):
 		# Find directories or files
 		prefix = os.path.expanduser(u"~/")
 		ufilepath = text if os.path.isabs(text) else os.path.join(prefix, text)
@@ -103,7 +103,7 @@ class URLTextSource (TextSource):
 
 	def get_rank(self):
 		return 75
-	def get_items(self, text):
+	def get_text_items(self, text):
 		# Only detect "perfect" URLs
 		text = text.strip()
 		components = list(urlparse.urlparse(text))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]