[kupfer: 15/24] plugin.vinagre: remove redundant code, SETTING_PREFER_CATALOG, fix strings



commit 1db1756234bf7760b2432d2e53414b65bfe488f7
Author: Karol BÄ?dkowski <karol bedkowsk+gh gmail com>
Date:   Tue Nov 24 09:22:00 2009 +0100

    plugin.vinagre: remove redundant code, SETTING_PREFER_CATALOG, fix strings

 kupfer/plugin/vinagre.py |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/kupfer/plugin/vinagre.py b/kupfer/plugin/vinagre.py
index 47329b5..7a42ca3 100644
--- a/kupfer/plugin/vinagre.py
+++ b/kupfer/plugin/vinagre.py
@@ -8,19 +8,14 @@ from xml.etree import cElementTree as ElementTree
 from kupfer.objects import Leaf, Action, Source, AppLeafContentMixin, UrlLeaf
 from kupfer.helplib import FilesystemWatchMixin, PicklingHelperMixin
 from kupfer import utils
-from kupfer import plugin_support
 
 __kupfer_name__ = _("Vinagre")
 __kupfer_sources__ = ("SessionSource", )
 __kupfer_actions__ = ('VinagreStartSession', )
-__description__ = _("Vinagre Bookmarks and Actions")
+__description__ = _("Vinagre bookmarks and actions")
 __version__ = "2009-11-23"
 __author__ = "Karol BÄ?dkowski <karol bedkowski gmail com>"
 
-__kupfer_settings__ = plugin_support.PluginSettings(
-	plugin_support.SETTING_PREFER_CATALOG,
-)
-
 
 class Bookmark(Leaf):
 	def __init__(self, url, name):
@@ -52,13 +47,8 @@ class VinagreStartSession(Action):
 		yield UrlLeaf
 
 	def valid_for_item(self, item):
-		if isinstance(item, Bookmark):
-			return True
-		elif isinstance(item, UrlLeaf):
-			return (item.object.startswith('ssh://') \
-					or item.object.startswith('vnc://'))
-
-		return False
+		return (item.object.startswith('ssh://') \
+				or item.object.startswith('vnc://'))
 
 
 class SessionSource(AppLeafContentMixin, Source, PicklingHelperMixin,



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