[kupfer] Edit and clean up comments everywhere



commit d9e7ed1624a738588a0ec257c81492bedb60590d
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Tue Jan 12 15:31:17 2010 +0100

    Edit and clean up comments everywhere
    
    Remove stale comments and docstrings, and word some better.

 debug.py                       |    3 ++-
 kupfer/obj/objects.py          |   23 +++++++----------------
 kupfer/plugin/core/__init__.py |    5 +----
 3 files changed, 10 insertions(+), 21 deletions(-)
---
diff --git a/debug.py b/debug.py
index f701e32..9e99014 100644
--- a/debug.py
+++ b/debug.py
@@ -1,5 +1,6 @@
 """
-Debugging routines. To use this, simply import this module
+Debugging routines, can only be used when Kupfer is run from the Source
+directory.
 """
 
 import atexit
diff --git a/kupfer/obj/objects.py b/kupfer/obj/objects.py
index 0c235dc..ed46ada 100644
--- a/kupfer/obj/objects.py
+++ b/kupfer/obj/objects.py
@@ -44,10 +44,9 @@ def _directory_content(dirpath, show_hidden):
 
 class FileLeaf (Leaf, TextRepresentation):
 	"""
-	Represents one file
+	Represents one file: the represented object is a bytestring (important!)
 	"""
 	serilizable = True
-	# To save memory with (really) many instances
 
 	def __init__(self, obj, name=None):
 		"""Construct a FileLeaf
@@ -95,9 +94,6 @@ class FileLeaf (Leaf, TextRepresentation):
 		return gobject.filename_display_name(self.object)
 
 	def get_description(self):
-		"""Format the path shorter:
-		replace homedir by ~/
-		"""
 		return utils.get_display_path_for_bytestring(self.canonical_path())
 
 	def get_actions(self):
@@ -117,7 +113,6 @@ class FileLeaf (Leaf, TextRepresentation):
 	def get_gicon(self):
 		return icons.get_gicon_for_file(self.object)
 	def get_icon_name(self):
-		"""A more generic icon"""
 		if self.is_dir():
 			return "folder"
 		else:
@@ -245,9 +240,6 @@ class AppLeaf (Leaf, pretty.OutputMixin):
 class OpenUrl (Action):
 	rank_adjust = 5
 	def __init__(self, name=None):
-		"""
-		open url
-		"""
 		if not name:
 			name = _("Open URL")
 		super(OpenUrl, self).__init__(name)
@@ -266,13 +258,13 @@ class OpenUrl (Action):
 	  	return "forward"
 
 class Launch (Action):
-	"""
-	Launch operation base class
-
-	Launches an application (AppLeaf)
-	"""
+	""" Launches an application (AppLeaf) """
 	rank_adjust = 5
 	def __init__(self, name=None, is_running=False, open_new=False):
+		"""
+		If @is_running, style as if the app is running (Show application)
+		If @open_new, always start a new instance.
+		"""
 		if not name:
 			name = _("Launch")
 		Action.__init__(self, name)
@@ -294,7 +286,6 @@ class Launch (Action):
 		return Action.get_icon_name(self)
 
 class LaunchAgain (Launch):
-	"""Launch instance without checking if running"""
 	rank_adjust = 0
 	def __init__(self, name=None):
 		if not name:
@@ -370,7 +361,7 @@ class Perform (Action):
 
 class TextLeaf (Leaf, TextRepresentation):
 	"""Represent a text query
-	represented object is the unicode string
+	The represented object is a unicode string
 	"""
 	serilizable = True
 	def __init__(self, text, name=None):
diff --git a/kupfer/plugin/core/__init__.py b/kupfer/plugin/core/__init__.py
index fef5d50..240a711 100644
--- a/kupfer/plugin/core/__init__.py
+++ b/kupfer/plugin/core/__init__.py
@@ -48,10 +48,7 @@ if _is_debug():
 
 
 class SearchInside (Action):
-	"""
-	A factory action: works on a Leaf object with content
-	Return a new source with the contents of the Leaf
-	"""
+	"""Return the content source for a Leaf"""
 	def __init__(self):
 		super(SearchInside, self).__init__(_("Search Contents"))
 



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