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)
def activate(self, leaf, ctx): try: utils.spawn_terminal(leaf.object, ctx.environment.get_screen()) except utils.SpawnError as exc: raise OperationError(exc)
def __init__(self, s): OperationError.__init__(self, kupferstring.fromlocale(s))
def __init__(self): OperationError.__init__(self, _("Can not be used with multiple objects"))
def __init__(self, toolname): OperationError.__init__(self, _("%s does not support this operation") % toolname)
def __init__(self, cmd): OperationError.__init__(self, _("Command '%s' not found") % (cmd, ))
def __init__(self, toolname): OperationError.__init__( self, _("%s does not support this operation") % toolname)