コード例 #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)
コード例 #2
0
ファイル: fileactions.py プロジェクト: teotikalki/kupfer
 def activate(self, leaf, ctx):
     try:
         utils.spawn_terminal(leaf.object, ctx.environment.get_screen())
     except utils.SpawnError as exc:
         raise OperationError(exc)
コード例 #3
0
ファイル: exceptions.py プロジェクト: engla/kupfer
 def __init__(self, s):
     OperationError.__init__(self, kupferstring.fromlocale(s))
コード例 #4
0
ファイル: exceptions.py プロジェクト: engla/kupfer
 def __init__(self):
     OperationError.__init__(self,
                    _("Can not be used with multiple objects"))
コード例 #5
0
ファイル: exceptions.py プロジェクト: engla/kupfer
 def __init__(self, toolname):
     OperationError.__init__(self,
                    _("%s does not support this operation") % toolname)
コード例 #6
0
ファイル: exceptions.py プロジェクト: tuxcanfly/kupfer
	def __init__(self, cmd):
		OperationError.__init__(self, _("Command '%s' not found") % (cmd, ))
コード例 #7
0
 def __init__(self, s):
     OperationError.__init__(self, kupferstring.fromlocale(s))
コード例 #8
0
 def __init__(self):
     OperationError.__init__(self,
                             _("Can not be used with multiple objects"))
コード例 #9
0
 def __init__(self, toolname):
     OperationError.__init__(
         self,
         _("%s does not support this operation") % toolname)