[kupfer] plugin.fileactions: Add setting for archive type to create
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] plugin.fileactions: Add setting for archive type to create
- Date: Sun, 23 Aug 2009 11:28:10 +0000 (UTC)
commit 84a31eb1fd78d2c3896009db0812878b16312127
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Sat Aug 22 04:10:31 2009 +0200
plugin.fileactions: Add setting for archive type to create
kupfer/plugin/fileactions.py | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/plugin/fileactions.py b/kupfer/plugin/fileactions.py
index ea73122..fd38285 100644
--- a/kupfer/plugin/fileactions.py
+++ b/kupfer/plugin/fileactions.py
@@ -23,6 +23,22 @@ __description__ = _("More file actions")
__version__ = ""
__author__ = "Ulrik Sverdrup <ulrik sverdrup gmail com>"
+__kupfer_settings__ = plugin_support.PluginSettings(
+ {
+ "key" : "archive_type",
+ "label": _("Compressed archive type for 'Create Archive In'"),
+ "type": str,
+ "value": ".tar.gz",
+ "alternatives": (
+ ".7z",
+ ".rar",
+ ".tar",
+ ".tar.gz",
+ ".zip",
+ )
+ },
+)
+
class Trash (Action):
# this should never be default
rank_adjust = -10
@@ -158,7 +174,7 @@ class CreateArchiveIn (Action):
def __init__(self):
Action.__init__(self, _("Create Archive In..."))
def activate(self, leaf, iobj):
- archive_type = ".tar.gz"
+ archive_type = __kupfer_settings__["archive_type"]
dirpath = iobj.object
basename = os_path.basename(leaf.object)
archive_path = \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]