Beispiel #1
0
    def launch(self, files=(), paths=(), activate=False, ctx=None):
        """
        Launch the represented applications

        @files: a seq of GFiles (Gio.File)
        @paths: a seq of bytestring paths
        @activate: activate instead of start new
        """
        try:
            return launch.launch_application(self.object, files=files,
                                             paths=paths, activate=activate,
                                             desktop_file=self.init_path,
                                             screen=ctx and ctx.environment.get_screen())
        except launch.SpawnError as exc:
            raise OperationError(exc)
Beispiel #2
0
 def activate(self, leaf, ctx):
     try:
         utils.spawn_terminal(leaf.object, ctx.environment.get_screen())
     except utils.SpawnError as exc:
         raise OperationError(exc)
Beispiel #3
0
 def __init__(self, s):
     OperationError.__init__(self, kupferstring.fromlocale(s))
Beispiel #4
0
 def __init__(self):
     OperationError.__init__(self,
                    _("Can not be used with multiple objects"))
Beispiel #5
0
 def __init__(self, toolname):
     OperationError.__init__(self,
                    _("%s does not support this operation") % toolname)
Beispiel #6
0
	def __init__(self, cmd):
		OperationError.__init__(self, _("Command '%s' not found") % (cmd, ))
Beispiel #7
0
 def __init__(self, s):
     OperationError.__init__(self, kupferstring.fromlocale(s))
Beispiel #8
0
 def __init__(self):
     OperationError.__init__(self,
                             _("Can not be used with multiple objects"))
Beispiel #9
0
 def __init__(self, toolname):
     OperationError.__init__(
         self,
         _("%s does not support this operation") % toolname)