Ning Sun avatar Ning Sun committed 09712de

change name to CamelCase

Comments (0)

Files changed (2)

deskbar-vbox/VirtualBox.py

+import deskbar.core.Utils
+import deskbar.interfaces.Action
+import deskbar.interfaces.Module
+import deskbar.interfaces.Match
+import vboxapi
+
+HANDLERS = ['VirtualBoxModule']
+
+class VirtualBoxAction(deskbar.interfaces.Action):
+	def __init__(self, prog):
+		deskbar.interfaces.Action.__init__(self, prog)
+		self._prog = prog
+		
+	def activate(self, text=None):
+		deskbar.core.Utils.spawn_async(["virtualbox", "--startvm", self._prog])
+
+	def get_verb(self):
+		return "Run Virtual Machine: <b>%(name)s</b>"
+
+	def get_icon(self):
+		return "VBox"
+
+	def is_valid(self, text=None):
+		return True
+
+class VirtualBoxMatch(deskbar.interfaces.Match):
+	"""docstring for VirtualBoxMatch"""
+	def __init__(self, prog, **kwargs):
+		deskbar.interfaces.Match.__init__(self, name=prog,
+				icon="virtualbox", category="actions", **kwargs)
+		self.prog = prog
+		self.add_action(VirtualBoxAction(self.prog))
+	
+	def get_hash(self):
+		return self.prog
+
+
+class VirtualBoxModule(deskbar.interfaces.Module):
+	"""docstring for VirtualBoxModule"""
+
+	INFOS = {'icon': deskbar.core.Utils.load_icon("virtualbox"),
+			'name': 'VirtualBox Deskbar Module',
+			'description': 'Start a virtual machine with name',
+			'version': '1.0.0.0',
+			}
+
+	def __init__(self):
+		deskbar.interfaces.Module.__init__(self)
+
+		vboxmgr = vboxapi.VirtualBoxManager(None, None)
+		vbox = vboxmgr.vbox
+		vboxmgr.mgr.getSessionObject(vbox)
+		self.vbox = vbox
+	
+	def query(self, text):
+		machs = map(lambda x:str(x.name), self.vbox.getMachines())
+		for mach in machs:
+			if mach.lower().startswith(text.lower()):
+				self._emit_query_ready(text, [VirtualBoxMatch(mach)])
+		
+	

deskbar-vbox/virtualbox.py

-import deskbar.core.Utils
-import deskbar.interfaces.Action
-import deskbar.interfaces.Module
-import deskbar.interfaces.Match
-import vboxapi
-
-HANDLERS = ['VirtualBoxModule']
-
-class VirtualBoxAction(deskbar.interfaces.Action):
-	def __init__(self, prog):
-		deskbar.interfaces.Action.__init__(self, prog)
-		self._prog = prog
-		
-	def activate(self, text=None):
-		deskbar.core.Utils.spawn_async(["virtualbox", "--startvm", self._prog])
-
-	def get_verb(self):
-		return "Run Virtual Machine: <b>%(name)s</b>"
-
-	def get_icon(self):
-		return "VBox"
-
-	def is_valid(self, text=None):
-		return True
-
-class VirtualBoxMatch(deskbar.interfaces.Match):
-	"""docstring for VirtualBoxMatch"""
-	def __init__(self, prog, **kwargs):
-		deskbar.interfaces.Match.__init__(self, name=prog,
-				icon="virtualbox", category="actions", **kwargs)
-		self.prog = prog
-		self.add_action(VirtualBoxAction(self.prog))
-	
-	def get_hash(self):
-		return self.prog
-
-
-class VirtualBoxModule(deskbar.interfaces.Module):
-	"""docstring for VirtualBoxModule"""
-
-	INFOS = {'icon': deskbar.core.Utils.load_icon("virtualbox"),
-			'name': 'VirtualBox Deskbar Module',
-			'description': 'Start a virtual machine with name',
-			'version': '1.0.0.0',
-			}
-
-	def __init__(self):
-		deskbar.interfaces.Module.__init__(self)
-
-		vboxmgr = vboxapi.VirtualBoxManager(None, None)
-		vbox = vboxmgr.vbox
-		vboxmgr.mgr.getSessionObject(vbox)
-		self.vbox = vbox
-	
-	def query(self, text):
-		machs = map(lambda x:str(x.name), self.vbox.getMachines())
-		for mach in machs:
-			if mach.lower().startswith(text.lower()):
-				self._emit_query_ready(text, [VirtualBoxMatch(mach)])
-		
-	
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.