예제 #1
0
	def activate(self, leaf):
		email = email_from_leaf(leaf)

		if not utils.spawn_async(['thunderbird', 'mailto:%s' % email]):
			utils.spawn_async(['icedove', 'mailto:%s' % email])
		if (not utils.spawn_async_notify_as(
		        'thunderbird.desktop', ['thunderbird', 'mailto:%s' % email])):
			utils.spawn_async_notify_as(
					'icedove.desktop', ['icedove', 'mailto:%s' % email])
예제 #2
0
파일: dictionary.py 프로젝트: pbx/kupfer
 def activate(self, leaf):
     text = leaf.object
     dict_id = __kupfer_settings__["dictionary"]
     dict_argv = list(dictionaries[dict_id])
     dict_argv[-1] = dict_argv[-1] + kupferstring.tolocale(text)
     try:
         utils.spawn_async_notify_as(dict_id + ".desktop", dict_argv)
     except utils.SpawnError as exc:
         raise OperationError(exc)
예제 #3
0
	def _make_archive(cls, ctx, basename, dirpath, filepaths):
		archive_type = __kupfer_settings__["archive_type"]
		archive_path = \
			utils.get_destpath_in_directory(dirpath, basename, archive_type)
		cmd = ["file-roller", "--add-to=%s" % (archive_path, )]
		cmd.extend(filepaths)
		runtimehelper.register_async_file_result(ctx, archive_path)
		utils.spawn_async_notify_as("file-roller.desktop", cmd)
		return archive_path
예제 #4
0
 def _make_archive(cls, ctx, basename, dirpath, filepaths):
     archive_type = __kupfer_settings__["archive_type"]
     archive_path = \
         utils.get_destpath_in_directory(dirpath, basename, archive_type)
     cmd = ["file-roller", "--add-to=%s" % (archive_path, )]
     cmd.extend(filepaths)
     runtimehelper.register_async_file_result(ctx, archive_path)
     utils.spawn_async_notify_as("file-roller.desktop", cmd)
     return archive_path
예제 #5
0
 def activate(self, leaf):
     text = leaf.object
     dict_id = __kupfer_settings__["dictionary"]
     dict_argv = list(dictionaries[dict_id])
     dict_argv[-1] = dict_argv[-1] + text
     try:
         utils.spawn_async_notify_as(dict_id + ".desktop", dict_argv)
     except utils.SpawnError as exc:
         raise OperationError(exc)
예제 #6
0
 def run(self):
     utils.spawn_async_notify_as("evolution.desktop",
                                 ['xdg-open', 'mailto:'])
예제 #7
0
	def _make_archive(cls, filepaths):
		cmd = ["file-roller", "--add"]
		cmd.extend(filepaths)
		utils.spawn_async_notify_as("file-roller.desktop", cmd)
예제 #8
0
	def activate(self, leaf):
		utils.spawn_async_notify_as("file-roller.desktop",
				["file-roller", "--extract-here", leaf.object])
예제 #9
0
	def run(self):
		utils.spawn_async_notify_as("evolution.desktop",
		                           ['evolution', 'mailto:'])
예제 #10
0
	def activate(self, leaf):
		text = leaf.object
		utils.spawn_async_notify_as("gnome-dictionary.desktop",
		                           ["gnome-dictionary", "--look-up=%s" % text])
예제 #11
0
	def run(self):
		if (not utils.spawn_async_notify_as(
		        'thunderbird.desktop', ['thunderbird', '--compose'])):
			utils.spawn_async_notify_as(
					'icedove.desktop', ['icedove', '--compose'])
예제 #12
0
 def _make_archive(cls, filepaths):
     cmd = ["file-roller", "--add"]
     cmd.extend(filepaths)
     utils.spawn_async_notify_as("file-roller.desktop", cmd)
예제 #13
0
 def activate(self, leaf):
     utils.spawn_async_notify_as(
         "file-roller.desktop",
         ["file-roller", "--extract-here", leaf.object])