[Goodies-commits] r1463 - in thunar-archive-plugin/trunk: . icons icons/16x16 po scripts thunar-archive-plugin
Benedikt Meurer
benny at xfce.org
Sat Jul 1 23:24:38 CEST 2006
Author: benny
Date: 2006-07-01 21:24:28 +0000 (Sat, 01 Jul 2006)
New Revision: 1463
Added:
thunar-archive-plugin/trunk/icons/
thunar-archive-plugin/trunk/icons/16x16/
thunar-archive-plugin/trunk/icons/16x16/Makefile.am
thunar-archive-plugin/trunk/icons/16x16/tap-add.png
thunar-archive-plugin/trunk/icons/16x16/tap-extract.png
thunar-archive-plugin/trunk/icons/Makefile.am
thunar-archive-plugin/trunk/scripts/
thunar-archive-plugin/trunk/scripts/Makefile.am
thunar-archive-plugin/trunk/scripts/ark.tap
thunar-archive-plugin/trunk/scripts/file-roller.tap
thunar-archive-plugin/trunk/thunar-archive-plugin/tap-backend.c
thunar-archive-plugin/trunk/thunar-archive-plugin/tap-backend.h
Modified:
thunar-archive-plugin/trunk/ChangeLog
thunar-archive-plugin/trunk/Makefile.am
thunar-archive-plugin/trunk/README
thunar-archive-plugin/trunk/configure.in.in
thunar-archive-plugin/trunk/po/ChangeLog
thunar-archive-plugin/trunk/po/POTFILES.in
thunar-archive-plugin/trunk/po/ca.po
thunar-archive-plugin/trunk/po/de.po
thunar-archive-plugin/trunk/po/el.po
thunar-archive-plugin/trunk/po/eu.po
thunar-archive-plugin/trunk/po/fr.po
thunar-archive-plugin/trunk/po/hu.po
thunar-archive-plugin/trunk/po/ja.po
thunar-archive-plugin/trunk/po/pl.po
thunar-archive-plugin/trunk/po/ru.po
thunar-archive-plugin/trunk/po/thunar-archive-plugin.pot
thunar-archive-plugin/trunk/po/zh_TW.po
thunar-archive-plugin/trunk/thunar-archive-plugin/Makefile.am
thunar-archive-plugin/trunk/thunar-archive-plugin/tap-provider.c
Log:
2006-07-01 Benedikt Meurer <benny at xfce.org>
* thunar-archive-plugin/: Add support for other archive managers than
file-roller, using the mime database and an additional .tap wrapper
script.
* configure.in.in, icons/, thunar-archive-plugin/tap-provider.c,
Makefile.am: Add icons for the extract and create actions, from
the file-roller user interface.
* configure.in.in, scripts/, Makefile.am: Add wrapper scripts for
file-roller and ark; xarchiver should ship the wrapper script as
part of its distribution.
* README: Add documentation about the new framework.
* po/POTFILES.in: Add tap-backend.c here.
* po/*.po, po/thunar-archive-plugin.pot: Merge new strings.
* po/de.po: Update german translations.
Modified: thunar-archive-plugin/trunk/ChangeLog
===================================================================
--- thunar-archive-plugin/trunk/ChangeLog 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/ChangeLog 2006-07-01 21:24:28 UTC (rev 1463)
@@ -1,3 +1,19 @@
+2006-07-01 Benedikt Meurer <benny at xfce.org>
+
+ * thunar-archive-plugin/: Add support for other archive managers than
+ file-roller, using the mime database and an additional .tap wrapper
+ script.
+ * configure.in.in, icons/, thunar-archive-plugin/tap-provider.c,
+ Makefile.am: Add icons for the extract and create actions, from
+ the file-roller user interface.
+ * configure.in.in, scripts/, Makefile.am: Add wrapper scripts for
+ file-roller and ark; xarchiver should ship the wrapper script as
+ part of its distribution.
+ * README: Add documentation about the new framework.
+ * po/POTFILES.in: Add tap-backend.c here.
+ * po/*.po, po/thunar-archive-plugin.pot: Merge new strings.
+ * po/de.po: Update german translations.
+
2006-06-19 Benedikt Meurer <benny at xfce.org>
* COPYING: This should be LGPL, as pointed out by Yves-Alexis
Modified: thunar-archive-plugin/trunk/Makefile.am
===================================================================
--- thunar-archive-plugin/trunk/Makefile.am 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/Makefile.am 2006-07-01 21:24:28 UTC (rev 1463)
@@ -1,7 +1,9 @@
# $Id$
SUBDIRS = \
+ icons \
po \
+ scripts \
thunar-archive-plugin
AUTOMAKE_OPTIONS = \
Modified: thunar-archive-plugin/trunk/README
===================================================================
--- thunar-archive-plugin/trunk/README 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/README 2006-07-01 21:24:28 UTC (rev 1463)
@@ -13,9 +13,30 @@
thunar-archive-plugin depends on the following packages:
- Thunar 0.2.2 or above
- - file-roller 2.8 or above
+Supported archive managers
+==========================
+
+thunar-archive-plugin currently supports file-roller (the GNOME archive manager)
+and ark (the KDE archive manager), but support for additional archive managers
+can be easily added.
+
+To add support for a new archive manager, all you need to do is to install
+the .desktop file - with the list of supported mime types - for the archive
+manager to the $(datadir)/applications/ folder (as usual), and in addition,
+install a .tap file to $(libexecdir)/thunar-archive-plugin/, which provides
+a wrapper script that invokes the archive manager with the appropriate
+parameters for the actions "Create Archive", "Extract Here" and "Extract To".
+
+The .tap and .desktop files should have the same basename, otherwise the
+thunar-archive-plugin is not able to find the appropriate .tap file for an
+archive manager. For example, if the name of the .desktop file is ark.desktop,
+the .tap file must be named ark.tap.
+
+See the scripts/ directory for examples of how to create said .tap files.
+
+
Installation
============
Modified: thunar-archive-plugin/trunk/configure.in.in
===================================================================
--- thunar-archive-plugin/trunk/configure.in.in 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/configure.in.in 2006-07-01 21:24:28 UTC (rev 1463)
@@ -141,7 +141,10 @@
AC_OUTPUT([
Makefile
+icons/Makefile
+icons/16x16/Makefile
po/Makefile.in
+scripts/Makefile
thunar-archive-plugin/Makefile
])
Property changes on: thunar-archive-plugin/trunk/icons
___________________________________________________________________
Name: svn:ignore
+ .deps
.libs
Makefile
Makefile.in
.*.swp
Property changes on: thunar-archive-plugin/trunk/icons/16x16
___________________________________________________________________
Name: svn:ignore
+ .deps
.libs
Makefile
Makefile.in
.*.swp
Added: thunar-archive-plugin/trunk/icons/16x16/Makefile.am
===================================================================
--- thunar-archive-plugin/trunk/icons/16x16/Makefile.am (rev 0)
+++ thunar-archive-plugin/trunk/icons/16x16/Makefile.am 2006-07-01 21:24:28 UTC (rev 1463)
@@ -0,0 +1,11 @@
+# $Id$
+
+appsdir = $(datadir)/icons/hicolor/16x16/apps
+apps_DATA = \
+ tap-add.png \
+ tap-extract.png
+
+EXTRA_DIST = \
+ $(apps_DATA)
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
Property changes on: thunar-archive-plugin/trunk/icons/16x16/Makefile.am
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Rev
Added: thunar-archive-plugin/trunk/icons/16x16/tap-add.png
===================================================================
(Binary files differ)
Property changes on: thunar-archive-plugin/trunk/icons/16x16/tap-add.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: thunar-archive-plugin/trunk/icons/16x16/tap-extract.png
===================================================================
(Binary files differ)
Property changes on: thunar-archive-plugin/trunk/icons/16x16/tap-extract.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: thunar-archive-plugin/trunk/icons/Makefile.am
===================================================================
--- thunar-archive-plugin/trunk/icons/Makefile.am (rev 0)
+++ thunar-archive-plugin/trunk/icons/Makefile.am 2006-07-01 21:24:28 UTC (rev 1463)
@@ -0,0 +1,19 @@
+# $Id$
+
+SUBDIRS = \
+ 16x16
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+install-data-hook:
+ @-if test -z "$(DESTDIR)"; then \
+ echo "Updating Gtk icon cache."; \
+ $(gtk_update_icon_cache); \
+ else \
+ echo "*** Icon cache not updated. Remember to run:"; \
+ echo "***"; \
+ echo "*** $(gtk_update_icon_cache)"; \
+ echo "***"; \
+ fi
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
Property changes on: thunar-archive-plugin/trunk/icons/Makefile.am
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Rev
Modified: thunar-archive-plugin/trunk/po/ChangeLog
===================================================================
--- thunar-archive-plugin/trunk/po/ChangeLog 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/ChangeLog 2006-07-01 21:24:28 UTC (rev 1463)
@@ -1,3 +1,9 @@
+2006-07-01 Benedikt Meurer <benny at xfce.org>
+
+ * POTFILES.in: Add tap-backend.c here.
+ * thunar-archive-plugin.pot, *.po: Merge new strings.
+ * de.po: Update german translations.
+
2006-04-23 Daichi Kawahata <daichi at xfce.org>
* LINGUAS, eu.po: Added Basque translations by Piarres Beobide
@@ -18,32 +24,32 @@
* LINGUAS, zh_TW.po: Added Traditional Chinese translations by
Hydonsingore Cia <hydonsingore at mail.educities.edu.tw>.
-2006-04-08 Daichi Kawahata <daichi at xfce.org>
+2006-04-08 Daichi Kawahata <daichi at xfce.org>
* LINGUAS, el.po: Added Greek translations by Stavros Giannouris
<stavrosg2002 at freemail.gr>.
* LINGUAS, pl.po: Added Polish translations by Piotr Malinski
<admin at rk.edu.pl>.
-2006-04-02 Daichi Kawahata <daichi at xfce.org>
+2006-04-02 Daichi Kawahata <daichi at xfce.org>
* LINGUAS, fr.po: Added French translations by Stephane Roy
<sroy at j2n.net>.
* ru.po: Updated.
* LINGUAS, ja.po: Added Japanese translations.
-2006-03-30 Benedikt Meurer <benny at xfce.org>
+2006-03-30 Benedikt Meurer <benny at xfce.org>
* LINGUAS: Add 'ru' here.
* ru.po: Add russian translations, thanks to Andrey Fedoseev
<andrey.fedoseev at gmail.com>.
-2006-03-27 Benedikt Meurer <benny at xfce.org>
+2006-03-27 Benedikt Meurer <benny at xfce.org>
* LINGUAS: Add 'hu' here.
* de.po, hu.po: Update version.
-2006-03-26 Benedikt Meurer <benny at xfce.org>
+2006-03-26 Benedikt Meurer <benny at xfce.org>
* thunar-archive-plugin.pot: Merge new strings.
* de.po: Update german translations.
Modified: thunar-archive-plugin/trunk/po/POTFILES.in
===================================================================
--- thunar-archive-plugin/trunk/po/POTFILES.in 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/POTFILES.in 2006-07-01 21:24:28 UTC (rev 1463)
@@ -1,2 +1,3 @@
+thunar-archive-plugin/tap-backend.c
thunar-archive-plugin/tap-provider.c
thunar-archive-plugin/thunar-archive-plugin.c
Modified: thunar-archive-plugin/trunk/po/ca.po
===================================================================
--- thunar-archive-plugin/trunk/po/ca.po 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/ca.po 2006-07-01 21:24:28 UTC (rev 1463)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: thunar-archive-plugin-0.1.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-26 16:09+0200\n"
+"POT-Creation-Date: 2006-07-01 21:02+0200\n"
"PO-Revision-Date: 2006-04-17 17:50+0100\n"
"Last-Translator: Carles Muñoz Gorriz <carlesmu at internautas.org>\n"
"Language-Team: catalan\n"
@@ -17,45 +17,64 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:305
-#: thunar-archive-plugin/tap-provider.c:343
+#. prepare the dialog to query the preferred archiver for the user
+#: thunar-archive-plugin/tap-backend.c:84
+msgid "Select an archive manager"
+msgstr ""
+
+#. add the header label
+#: thunar-archive-plugin/tap-backend.c:108
+msgid ""
+"Please select your preferred archive manager\n"
+"from the list of available applications below:"
+msgstr ""
+
+#. tell the user that we cannot handle the specified mime types
+#: thunar-archive-plugin/tap-backend.c:280
+#: thunar-archive-plugin/tap-backend.c:432
+#, c-format
+msgid "No suitable archive manager found"
+msgstr ""
+
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:289
+#: thunar-archive-plugin/tap-provider.c:323
msgid "Failed to extract files"
msgstr "No s'han pogut extreure els fitxers"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:387
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:361
msgid "Failed to create archive"
msgstr "No s'ha pogut crear l'arxiu"
#. append the "Extract Here" action
-#: thunar-archive-plugin/tap-provider.c:433
+#: thunar-archive-plugin/tap-provider.c:406
msgid "Extract _Here"
msgstr "Extreu _aquí"
-#: thunar-archive-plugin/tap-provider.c:435
+#: thunar-archive-plugin/tap-provider.c:408
msgid "Extract the selected archive in the current folder"
msgid_plural "Extract the selected archives in the current folder"
msgstr[0] "Extreu l'arxiu seleccionat al directori actual"
msgstr[1] "Extreu els arxius seleccionats al directori actual"
#. append the "Extract To..." action
-#: thunar-archive-plugin/tap-provider.c:448
+#: thunar-archive-plugin/tap-provider.c:424
msgid "_Extract To..."
msgstr "_Extreu a…"
-#: thunar-archive-plugin/tap-provider.c:450
+#: thunar-archive-plugin/tap-provider.c:426
msgid "Extract the selected archive"
msgid_plural "Extract the selected archives"
msgstr[0] "Extreu l'arxiu seleccionat"
msgstr[1] "Extreu els arxius seleccionats"
#. append the "Create Archive..." action
-#: thunar-archive-plugin/tap-provider.c:466
+#: thunar-archive-plugin/tap-provider.c:445
msgid "Cr_eate Archive..."
msgstr "Cr_ea un arxiu…"
-#: thunar-archive-plugin/tap-provider.c:468
+#: thunar-archive-plugin/tap-provider.c:447
msgid "Create an archive with the selected object"
msgid_plural "Create an archive with the selected objects"
msgstr[0] "Crea un arxiu amb l'objecte seleccionat"
Modified: thunar-archive-plugin/trunk/po/de.po
===================================================================
--- thunar-archive-plugin/trunk/po/de.po 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/de.po 2006-07-01 21:24:28 UTC (rev 1463)
@@ -7,8 +7,8 @@
msgstr ""
"Project-Id-Version: thunar-archive-plugin 0.1.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-26 16:09+0200\n"
-"PO-Revision-Date: 2006-03-26 16:10+0100\n"
+"POT-Creation-Date: 2006-07-01 21:02+0200\n"
+"PO-Revision-Date: 2006-07-01 20:30+0100\n"
"Last-Translator: Benedikt Meurer <benny at xfce.org>\n"
"Language-Team: German <de at li.org>\n"
"MIME-Version: 1.0\n"
@@ -16,45 +16,66 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:305
-#: thunar-archive-plugin/tap-provider.c:343
+#. prepare the dialog to query the preferred archiver for the user
+#: thunar-archive-plugin/tap-backend.c:84
+msgid "Select an archive manager"
+msgstr "Archivmanager auswählen"
+
+#. add the header label
+#: thunar-archive-plugin/tap-backend.c:108
+msgid ""
+"Please select your preferred archive manager\n"
+"from the list of available applications below:"
+msgstr ""
+"Wählen Sie Ihren bevorzugten Archivmanager\n"
+"aus der folgenden Liste von Anwendungen:"
+
+#. tell the user that we cannot handle the specified mime types
+#: thunar-archive-plugin/tap-backend.c:280
+#: thunar-archive-plugin/tap-backend.c:432
+#, c-format
+msgid "No suitable archive manager found"
+msgstr "Kein unterstützter Archivmanager gefunden"
+
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:289
+#: thunar-archive-plugin/tap-provider.c:323
msgid "Failed to extract files"
msgstr "Dateien konnte nicht entpackt werden"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:387
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:361
msgid "Failed to create archive"
msgstr "Archiv konnte nicht erstellt werden"
#. append the "Extract Here" action
-#: thunar-archive-plugin/tap-provider.c:433
+#: thunar-archive-plugin/tap-provider.c:406
msgid "Extract _Here"
msgstr "_Hier entpacken"
-#: thunar-archive-plugin/tap-provider.c:435
+#: thunar-archive-plugin/tap-provider.c:408
msgid "Extract the selected archive in the current folder"
msgid_plural "Extract the selected archives in the current folder"
msgstr[0] "Das ausgewählte Archiv ins aktuelle Verzeichnis entpacken"
msgstr[1] "Die ausgewählten Archive ins aktuelle Verzeichnis entpacken"
#. append the "Extract To..." action
-#: thunar-archive-plugin/tap-provider.c:448
+#: thunar-archive-plugin/tap-provider.c:424
msgid "_Extract To..."
msgstr "Entpacken _nach..."
-#: thunar-archive-plugin/tap-provider.c:450
+#: thunar-archive-plugin/tap-provider.c:426
msgid "Extract the selected archive"
msgid_plural "Extract the selected archives"
msgstr[0] "Das ausgewählte Archiv entpacken"
msgstr[1] "Die ausgewählten Archive entpacken"
#. append the "Create Archive..." action
-#: thunar-archive-plugin/tap-provider.c:466
+#: thunar-archive-plugin/tap-provider.c:445
msgid "Cr_eate Archive..."
msgstr "A_rchiv erstellen"
-#: thunar-archive-plugin/tap-provider.c:468
+#: thunar-archive-plugin/tap-provider.c:447
msgid "Create an archive with the selected object"
msgid_plural "Create an archive with the selected objects"
msgstr[0] "Ein Archiv mit der ausgewählte Datei erstellen"
Modified: thunar-archive-plugin/trunk/po/el.po
===================================================================
--- thunar-archive-plugin/trunk/po/el.po 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/el.po 2006-07-01 21:24:28 UTC (rev 1463)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: thunar-archive-plugin 0.1.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-26 16:09+0200\n"
+"POT-Creation-Date: 2006-07-01 21:02+0200\n"
"PO-Revision-Date: 2006-04-07 20:43+0200\n"
"Last-Translator: Stavros Giannouris <stavrosg2002 at freemail.gr>\n"
"Language-Team: Greek <nls at tux.hellug.gr>\n"
@@ -16,45 +16,64 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:305
-#: thunar-archive-plugin/tap-provider.c:343
+#. prepare the dialog to query the preferred archiver for the user
+#: thunar-archive-plugin/tap-backend.c:84
+msgid "Select an archive manager"
+msgstr ""
+
+#. add the header label
+#: thunar-archive-plugin/tap-backend.c:108
+msgid ""
+"Please select your preferred archive manager\n"
+"from the list of available applications below:"
+msgstr ""
+
+#. tell the user that we cannot handle the specified mime types
+#: thunar-archive-plugin/tap-backend.c:280
+#: thunar-archive-plugin/tap-backend.c:432
+#, c-format
+msgid "No suitable archive manager found"
+msgstr ""
+
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:289
+#: thunar-archive-plugin/tap-provider.c:323
msgid "Failed to extract files"
msgstr "Η αποσυμπίεση των αρχείων απέτυχε"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:387
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:361
msgid "Failed to create archive"
msgstr "Η δημιουργία του συμπιεσμένου αρχείου απέτυχε"
#. append the "Extract Here" action
-#: thunar-archive-plugin/tap-provider.c:433
+#: thunar-archive-plugin/tap-provider.c:406
msgid "Extract _Here"
msgstr "Αποσυμπίεση Ε_δώ"
-#: thunar-archive-plugin/tap-provider.c:435
+#: thunar-archive-plugin/tap-provider.c:408
msgid "Extract the selected archive in the current folder"
msgid_plural "Extract the selected archives in the current folder"
msgstr[0] "Αποσυμπιέζει το επιλεγμένο συμπιεσμένο αρχείο στον τρέχον φάκελο"
msgstr[1] "Αποσυμπιέζει τα επιλεγμένα συμπιεσμένα αρχεία στον τρέχον φάκελο"
#. append the "Extract To..." action
-#: thunar-archive-plugin/tap-provider.c:448
+#: thunar-archive-plugin/tap-provider.c:424
msgid "_Extract To..."
msgstr "Αποσυμπίεση σ_το..."
-#: thunar-archive-plugin/tap-provider.c:450
+#: thunar-archive-plugin/tap-provider.c:426
msgid "Extract the selected archive"
msgid_plural "Extract the selected archives"
msgstr[0] "Αποσυμπιέζει το επιλεγμένο συμπιεσμένο αρχείο"
msgstr[1] "Αποσυμπιέζει τα επιλεγμένα συμπιεσμένα αρχεία"
#. append the "Create Archive..." action
-#: thunar-archive-plugin/tap-provider.c:466
+#: thunar-archive-plugin/tap-provider.c:445
msgid "Cr_eate Archive..."
msgstr "Δημιουργία Συ_μπιεσμένου Αρχείου..."
-#: thunar-archive-plugin/tap-provider.c:468
+#: thunar-archive-plugin/tap-provider.c:447
msgid "Create an archive with the selected object"
msgid_plural "Create an archive with the selected objects"
msgstr[0] "Δημιουργεί ένα συμπιεσμένο αρχείο με το επιλεγμένο αντικείμενο"
Modified: thunar-archive-plugin/trunk/po/eu.po
===================================================================
--- thunar-archive-plugin/trunk/po/eu.po 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/eu.po 2006-07-01 21:24:28 UTC (rev 1463)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: thunar-archive-plugin 0.1.3svn\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-26 16:09+0200\n"
+"POT-Creation-Date: 2006-07-01 21:02+0200\n"
"PO-Revision-Date: 2006-04-07 13:29+0100\n"
"Last-Translator: Piarres Beobide <pi at beobide.net>\n"
"Language-Team: Librezale <Librezale at librezale.org>\n"
@@ -17,45 +17,64 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:305
-#: thunar-archive-plugin/tap-provider.c:343
+#. prepare the dialog to query the preferred archiver for the user
+#: thunar-archive-plugin/tap-backend.c:84
+msgid "Select an archive manager"
+msgstr ""
+
+#. add the header label
+#: thunar-archive-plugin/tap-backend.c:108
+msgid ""
+"Please select your preferred archive manager\n"
+"from the list of available applications below:"
+msgstr ""
+
+#. tell the user that we cannot handle the specified mime types
+#: thunar-archive-plugin/tap-backend.c:280
+#: thunar-archive-plugin/tap-backend.c:432
+#, c-format
+msgid "No suitable archive manager found"
+msgstr ""
+
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:289
+#: thunar-archive-plugin/tap-provider.c:323
msgid "Failed to extract files"
msgstr "Huts fitxategiak ateratzerakoan"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:387
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:361
msgid "Failed to create archive"
msgstr "Huts fitxategia sortzerakoan"
#. append the "Extract Here" action
-#: thunar-archive-plugin/tap-provider.c:433
+#: thunar-archive-plugin/tap-provider.c:406
msgid "Extract _Here"
msgstr "Hona A_tera"
-#: thunar-archive-plugin/tap-provider.c:435
+#: thunar-archive-plugin/tap-provider.c:408
msgid "Extract the selected archive in the current folder"
msgid_plural "Extract the selected archives in the current folder"
msgstr[0] "Aukeratutako fitxategia uneko karpetara atera"
msgstr[1] "Aukeratutako fitxategiak uneko karpetara atera"
#. append the "Extract To..." action
-#: thunar-archive-plugin/tap-provider.c:448
+#: thunar-archive-plugin/tap-provider.c:424
msgid "_Extract To..."
msgstr "_Hona atera..."
-#: thunar-archive-plugin/tap-provider.c:450
+#: thunar-archive-plugin/tap-provider.c:426
msgid "Extract the selected archive"
msgid_plural "Extract the selected archives"
msgstr[0] "Aukeratutako fitxategia atera"
msgstr[1] "Aukeratutako fitxategiak atera"
#. append the "Create Archive..." action
-#: thunar-archive-plugin/tap-provider.c:466
+#: thunar-archive-plugin/tap-provider.c:445
msgid "Cr_eate Archive..."
msgstr "Fitxat_egia Sortu"
-#: thunar-archive-plugin/tap-provider.c:468
+#: thunar-archive-plugin/tap-provider.c:447
msgid "Create an archive with the selected object"
msgid_plural "Create an archive with the selected objects"
msgstr[0] "Fitxategi bat sortu aukeratutako elementuarekin"
Modified: thunar-archive-plugin/trunk/po/fr.po
===================================================================
--- thunar-archive-plugin/trunk/po/fr.po 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/fr.po 2006-07-01 21:24:28 UTC (rev 1463)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: thunar-archive-plugin-0.1.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-26 16:09+0200\n"
+"POT-Creation-Date: 2006-07-01 21:02+0200\n"
"PO-Revision-Date: 2006-04-02 14:10+0100\n"
"Last-Translator: Stephane Roy <sroy at j2n.net>\n"
"Language-Team: French <traduc at traduc.org>\n"
@@ -16,45 +16,64 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:305
-#: thunar-archive-plugin/tap-provider.c:343
+#. prepare the dialog to query the preferred archiver for the user
+#: thunar-archive-plugin/tap-backend.c:84
+msgid "Select an archive manager"
+msgstr ""
+
+#. add the header label
+#: thunar-archive-plugin/tap-backend.c:108
+msgid ""
+"Please select your preferred archive manager\n"
+"from the list of available applications below:"
+msgstr ""
+
+#. tell the user that we cannot handle the specified mime types
+#: thunar-archive-plugin/tap-backend.c:280
+#: thunar-archive-plugin/tap-backend.c:432
+#, c-format
+msgid "No suitable archive manager found"
+msgstr ""
+
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:289
+#: thunar-archive-plugin/tap-provider.c:323
msgid "Failed to extract files"
msgstr "Échec à l'extraction des fichiers"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:387
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:361
msgid "Failed to create archive"
msgstr "Échec à la création de l'archive"
#. append the "Extract Here" action
-#: thunar-archive-plugin/tap-provider.c:433
+#: thunar-archive-plugin/tap-provider.c:406
msgid "Extract _Here"
msgstr "Extraire _ici"
-#: thunar-archive-plugin/tap-provider.c:435
+#: thunar-archive-plugin/tap-provider.c:408
msgid "Extract the selected archive in the current folder"
msgid_plural "Extract the selected archives in the current folder"
msgstr[0] "Extraire de l'archive sélectionnée dans le dossier courant"
msgstr[1] "Extraire des l'archives sélectionnées dans le dossier courant"
#. append the "Extract To..." action
-#: thunar-archive-plugin/tap-provider.c:448
+#: thunar-archive-plugin/tap-provider.c:424
msgid "_Extract To..."
msgstr "_Extraire vers..."
-#: thunar-archive-plugin/tap-provider.c:450
+#: thunar-archive-plugin/tap-provider.c:426
msgid "Extract the selected archive"
msgid_plural "Extract the selected archives"
msgstr[0] "Extraire de l'archive sélectionnée"
msgstr[1] "Extraire des l'archives sélectionnée"
#. append the "Create Archive..." action
-#: thunar-archive-plugin/tap-provider.c:466
+#: thunar-archive-plugin/tap-provider.c:445
msgid "Cr_eate Archive..."
msgstr "Cré_er une archive..."
-#: thunar-archive-plugin/tap-provider.c:468
+#: thunar-archive-plugin/tap-provider.c:447
msgid "Create an archive with the selected object"
msgid_plural "Create an archive with the selected objects"
msgstr[0] "Créer une archive avec les objets sélectionnés"
Modified: thunar-archive-plugin/trunk/po/hu.po
===================================================================
--- thunar-archive-plugin/trunk/po/hu.po 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/hu.po 2006-07-01 21:24:28 UTC (rev 1463)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: thunar-archive-plugin-0.1.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-26 16:09+0200\n"
+"POT-Creation-Date: 2006-07-01 21:02+0200\n"
"PO-Revision-Date: 2006-03-27 02:47+0100\n"
"Last-Translator: \n"
"Language-Team: hu\n"
@@ -18,43 +18,62 @@
"X-Poedit-Language: Hungarian\n"
"X-Poedit-Country: HUNGARY\n"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:305
-#: thunar-archive-plugin/tap-provider.c:343
+#. prepare the dialog to query the preferred archiver for the user
+#: thunar-archive-plugin/tap-backend.c:84
+msgid "Select an archive manager"
+msgstr ""
+
+#. add the header label
+#: thunar-archive-plugin/tap-backend.c:108
+msgid ""
+"Please select your preferred archive manager\n"
+"from the list of available applications below:"
+msgstr ""
+
+#. tell the user that we cannot handle the specified mime types
+#: thunar-archive-plugin/tap-backend.c:280
+#: thunar-archive-plugin/tap-backend.c:432
+#, c-format
+msgid "No suitable archive manager found"
+msgstr ""
+
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:289
+#: thunar-archive-plugin/tap-provider.c:323
msgid "Failed to extract files"
msgstr "Fájlok kibontása sikertelen"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:387
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:361
msgid "Failed to create archive"
msgstr "Archívum létrehozása sikertelen"
#. append the "Extract Here" action
-#: thunar-archive-plugin/tap-provider.c:433
+#: thunar-archive-plugin/tap-provider.c:406
msgid "Extract _Here"
msgstr "Kibontás _ide"
-#: thunar-archive-plugin/tap-provider.c:435
+#: thunar-archive-plugin/tap-provider.c:408
msgid "Extract the selected archive in the current folder"
msgid_plural "Extract the selected archives in the current folder"
msgstr[0] "Kijelölt archívumok kibontása e mappába"
#. append the "Extract To..." action
-#: thunar-archive-plugin/tap-provider.c:448
+#: thunar-archive-plugin/tap-provider.c:424
msgid "_Extract To..."
msgstr "_Kibontás..."
-#: thunar-archive-plugin/tap-provider.c:450
+#: thunar-archive-plugin/tap-provider.c:426
msgid "Extract the selected archive"
msgid_plural "Extract the selected archives"
msgstr[0] "Kijelölt archívumok kibontása"
#. append the "Create Archive..." action
-#: thunar-archive-plugin/tap-provider.c:466
+#: thunar-archive-plugin/tap-provider.c:445
msgid "Cr_eate Archive..."
msgstr "Archívum _létrehozása..."
-#: thunar-archive-plugin/tap-provider.c:468
+#: thunar-archive-plugin/tap-provider.c:447
msgid "Create an archive with the selected object"
msgid_plural "Create an archive with the selected objects"
msgstr[0] "Archívum létrehozása a kijelölt objektumokkal"
Modified: thunar-archive-plugin/trunk/po/ja.po
===================================================================
--- thunar-archive-plugin/trunk/po/ja.po 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/ja.po 2006-07-01 21:24:28 UTC (rev 1463)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: thunar-archive-plugin 0.1.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-26 16:09+0200\n"
+"POT-Creation-Date: 2006-07-01 21:02+0200\n"
"PO-Revision-Date: 2006-04-02 18:17+0900\n"
"Last-Translator: Daichi Kawahata <daichi at xfce.org>\n"
"Language-Team: Japanese <xfce-users-jp at ml.fdiary.net>\n"
@@ -17,43 +17,62 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:305
-#: thunar-archive-plugin/tap-provider.c:343
+#. prepare the dialog to query the preferred archiver for the user
+#: thunar-archive-plugin/tap-backend.c:84
+msgid "Select an archive manager"
+msgstr ""
+
+#. add the header label
+#: thunar-archive-plugin/tap-backend.c:108
+msgid ""
+"Please select your preferred archive manager\n"
+"from the list of available applications below:"
+msgstr ""
+
+#. tell the user that we cannot handle the specified mime types
+#: thunar-archive-plugin/tap-backend.c:280
+#: thunar-archive-plugin/tap-backend.c:432
+#, c-format
+msgid "No suitable archive manager found"
+msgstr ""
+
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:289
+#: thunar-archive-plugin/tap-provider.c:323
msgid "Failed to extract files"
msgstr "ファイルを取り出すのに失敗しました"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:387
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:361
msgid "Failed to create archive"
msgstr "アーカイブの作成に失敗しました"
#. append the "Extract Here" action
-#: thunar-archive-plugin/tap-provider.c:433
+#: thunar-archive-plugin/tap-provider.c:406
msgid "Extract _Here"
msgstr "ここで展開(_H)"
-#: thunar-archive-plugin/tap-provider.c:435
+#: thunar-archive-plugin/tap-provider.c:408
msgid "Extract the selected archive in the current folder"
msgid_plural "Extract the selected archives in the current folder"
msgstr[0] "現在のフォルダで選択したアーカイブを展開します。"
#. append the "Extract To..." action
-#: thunar-archive-plugin/tap-provider.c:448
+#: thunar-archive-plugin/tap-provider.c:424
msgid "_Extract To..."
msgstr "別の場所に展開(_E)..."
-#: thunar-archive-plugin/tap-provider.c:450
+#: thunar-archive-plugin/tap-provider.c:426
msgid "Extract the selected archive"
msgid_plural "Extract the selected archives"
msgstr[0] "選択したアーカイブを展開します。"
#. append the "Create Archive..." action
-#: thunar-archive-plugin/tap-provider.c:466
+#: thunar-archive-plugin/tap-provider.c:445
msgid "Cr_eate Archive..."
msgstr "アーカイブを作成(_E)..."
-#: thunar-archive-plugin/tap-provider.c:468
+#: thunar-archive-plugin/tap-provider.c:447
msgid "Create an archive with the selected object"
msgid_plural "Create an archive with the selected objects"
msgstr[0] "選択したオブジェクトでアーカイブを作成します。"
Modified: thunar-archive-plugin/trunk/po/pl.po
===================================================================
--- thunar-archive-plugin/trunk/po/pl.po 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/pl.po 2006-07-01 21:24:28 UTC (rev 1463)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: thunar-archive-plugin 0.1.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-26 16:09+0200\n"
+"POT-Creation-Date: 2006-07-01 21:02+0200\n"
"PO-Revision-Date: 2006-04-08 12:09+0900\n"
"Last-Translator: Piotr Maliński <admin at rk.edu.pl>\n"
"Language-Team: Polish <translation-team-pl at lists.sourceforge.net>\n"
@@ -18,23 +18,42 @@
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:305
-#: thunar-archive-plugin/tap-provider.c:343
+#. prepare the dialog to query the preferred archiver for the user
+#: thunar-archive-plugin/tap-backend.c:84
+msgid "Select an archive manager"
+msgstr ""
+
+#. add the header label
+#: thunar-archive-plugin/tap-backend.c:108
+msgid ""
+"Please select your preferred archive manager\n"
+"from the list of available applications below:"
+msgstr ""
+
+#. tell the user that we cannot handle the specified mime types
+#: thunar-archive-plugin/tap-backend.c:280
+#: thunar-archive-plugin/tap-backend.c:432
+#, c-format
+msgid "No suitable archive manager found"
+msgstr ""
+
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:289
+#: thunar-archive-plugin/tap-provider.c:323
msgid "Failed to extract files"
msgstr "Nie udało się rozpakować plików"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:387
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:361
msgid "Failed to create archive"
msgstr "Nie mogę stworzyć archiwum"
#. append the "Extract Here" action
-#: thunar-archive-plugin/tap-provider.c:433
+#: thunar-archive-plugin/tap-provider.c:406
msgid "Extract _Here"
msgstr "Rozpakuj _Tutaj"
-#: thunar-archive-plugin/tap-provider.c:435
+#: thunar-archive-plugin/tap-provider.c:408
msgid "Extract the selected archive in the current folder"
msgid_plural "Extract the selected archives in the current folder"
msgstr[0] "Rozpakuj tutaj"
@@ -42,11 +61,11 @@
msgstr[2] ""
#. append the "Extract To..." action
-#: thunar-archive-plugin/tap-provider.c:448
+#: thunar-archive-plugin/tap-provider.c:424
msgid "_Extract To..."
msgstr "_Rozpakuj Do..."
-#: thunar-archive-plugin/tap-provider.c:450
+#: thunar-archive-plugin/tap-provider.c:426
msgid "Extract the selected archive"
msgid_plural "Extract the selected archives"
msgstr[0] "Rozpakuj zaznaczone archiwa"
@@ -54,11 +73,11 @@
msgstr[2] ""
#. append the "Create Archive..." action
-#: thunar-archive-plugin/tap-provider.c:466
+#: thunar-archive-plugin/tap-provider.c:445
msgid "Cr_eate Archive..."
msgstr "_Stwórz archiwum..."
-#: thunar-archive-plugin/tap-provider.c:468
+#: thunar-archive-plugin/tap-provider.c:447
msgid "Create an archive with the selected object"
msgid_plural "Create an archive with the selected objects"
msgstr[0] "Stwórz archiwum z zaznaczonych obiektów"
Modified: thunar-archive-plugin/trunk/po/ru.po
===================================================================
--- thunar-archive-plugin/trunk/po/ru.po 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/ru.po 2006-07-01 21:24:28 UTC (rev 1463)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: thunar-archive-plugin 0.1.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-26 16:09+0200\n"
+"POT-Creation-Date: 2006-07-01 21:02+0200\n"
"PO-Revision-Date: 2006-03-26 22:00+0600\n"
"Last-Translator: Andrey Fedoseev <andrey.fedoseev at gmail.com>\n"
"Language-Team: Russian\n"
@@ -18,23 +18,42 @@
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: KBabel 1.11.2\n"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:305
-#: thunar-archive-plugin/tap-provider.c:343
+#. prepare the dialog to query the preferred archiver for the user
+#: thunar-archive-plugin/tap-backend.c:84
+msgid "Select an archive manager"
+msgstr ""
+
+#. add the header label
+#: thunar-archive-plugin/tap-backend.c:108
+msgid ""
+"Please select your preferred archive manager\n"
+"from the list of available applications below:"
+msgstr ""
+
+#. tell the user that we cannot handle the specified mime types
+#: thunar-archive-plugin/tap-backend.c:280
+#: thunar-archive-plugin/tap-backend.c:432
+#, c-format
+msgid "No suitable archive manager found"
+msgstr ""
+
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:289
+#: thunar-archive-plugin/tap-provider.c:323
msgid "Failed to extract files"
msgstr "Не удалось извлечь файлы"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:387
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:361
msgid "Failed to create archive"
msgstr "Не удалось создать архив"
#. append the "Extract Here" action
-#: thunar-archive-plugin/tap-provider.c:433
+#: thunar-archive-plugin/tap-provider.c:406
msgid "Extract _Here"
msgstr "Извлечь сюда"
-#: thunar-archive-plugin/tap-provider.c:435
+#: thunar-archive-plugin/tap-provider.c:408
msgid "Extract the selected archive in the current folder"
msgid_plural "Extract the selected archives in the current folder"
msgstr[0] "Извлечь файлы из выбранного архива в текущую папку"
@@ -42,11 +61,11 @@
msgstr[2] "Извлечь файлы из выбранных архивов в текущую папку"
#. append the "Extract To..." action
-#: thunar-archive-plugin/tap-provider.c:448
+#: thunar-archive-plugin/tap-provider.c:424
msgid "_Extract To..."
msgstr "Извлечь в..."
-#: thunar-archive-plugin/tap-provider.c:450
+#: thunar-archive-plugin/tap-provider.c:426
msgid "Extract the selected archive"
msgid_plural "Extract the selected archives"
msgstr[0] "Извлечь файлы из выбранного архива"
@@ -54,11 +73,11 @@
msgstr[2] "Извлечь файлы из выбранных архивов"
#. append the "Create Archive..." action
-#: thunar-archive-plugin/tap-provider.c:466
+#: thunar-archive-plugin/tap-provider.c:445
msgid "Cr_eate Archive..."
msgstr "Создать архив..."
-#: thunar-archive-plugin/tap-provider.c:468
+#: thunar-archive-plugin/tap-provider.c:447
msgid "Create an archive with the selected object"
msgid_plural "Create an archive with the selected objects"
msgstr[0] "Поместить выбранный объект в архив"
Modified: thunar-archive-plugin/trunk/po/thunar-archive-plugin.pot
===================================================================
--- thunar-archive-plugin/trunk/po/thunar-archive-plugin.pot 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/thunar-archive-plugin.pot 2006-07-01 21:24:28 UTC (rev 1463)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-26 16:09+0200\n"
+"POT-Creation-Date: 2006-07-01 21:02+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,45 +17,64 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:305
-#: thunar-archive-plugin/tap-provider.c:343
+#. prepare the dialog to query the preferred archiver for the user
+#: thunar-archive-plugin/tap-backend.c:84
+msgid "Select an archive manager"
+msgstr ""
+
+#. add the header label
+#: thunar-archive-plugin/tap-backend.c:108
+msgid ""
+"Please select your preferred archive manager\n"
+"from the list of available applications below:"
+msgstr ""
+
+#. tell the user that we cannot handle the specified mime types
+#: thunar-archive-plugin/tap-backend.c:280
+#: thunar-archive-plugin/tap-backend.c:432
+#, c-format
+msgid "No suitable archive manager found"
+msgstr ""
+
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:289
+#: thunar-archive-plugin/tap-provider.c:323
msgid "Failed to extract files"
msgstr ""
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:387
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:361
msgid "Failed to create archive"
msgstr ""
#. append the "Extract Here" action
-#: thunar-archive-plugin/tap-provider.c:433
+#: thunar-archive-plugin/tap-provider.c:406
msgid "Extract _Here"
msgstr ""
-#: thunar-archive-plugin/tap-provider.c:435
+#: thunar-archive-plugin/tap-provider.c:408
msgid "Extract the selected archive in the current folder"
msgid_plural "Extract the selected archives in the current folder"
msgstr[0] ""
msgstr[1] ""
#. append the "Extract To..." action
-#: thunar-archive-plugin/tap-provider.c:448
+#: thunar-archive-plugin/tap-provider.c:424
msgid "_Extract To..."
msgstr ""
-#: thunar-archive-plugin/tap-provider.c:450
+#: thunar-archive-plugin/tap-provider.c:426
msgid "Extract the selected archive"
msgid_plural "Extract the selected archives"
msgstr[0] ""
msgstr[1] ""
#. append the "Create Archive..." action
-#: thunar-archive-plugin/tap-provider.c:466
+#: thunar-archive-plugin/tap-provider.c:445
msgid "Cr_eate Archive..."
msgstr ""
-#: thunar-archive-plugin/tap-provider.c:468
+#: thunar-archive-plugin/tap-provider.c:447
msgid "Create an archive with the selected object"
msgid_plural "Create an archive with the selected objects"
msgstr[0] ""
Modified: thunar-archive-plugin/trunk/po/zh_TW.po
===================================================================
--- thunar-archive-plugin/trunk/po/zh_TW.po 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/po/zh_TW.po 2006-07-01 21:24:28 UTC (rev 1463)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: thunar-archive-plugin 0.1.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-26 16:09+0200\n"
+"POT-Creation-Date: 2006-07-01 21:02+0200\n"
"PO-Revision-Date: 2006-04-06 00:48+0800\n"
"Last-Translator: Hydonsingore Cia <hydonsingore at mail.educities.edu.tw>\n"
"Language-Team: Chinese (traditional) <zh-l10n at linux.org.tw>\n"
@@ -17,43 +17,62 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:305
-#: thunar-archive-plugin/tap-provider.c:343
+#. prepare the dialog to query the preferred archiver for the user
+#: thunar-archive-plugin/tap-backend.c:84
+msgid "Select an archive manager"
+msgstr ""
+
+#. add the header label
+#: thunar-archive-plugin/tap-backend.c:108
+msgid ""
+"Please select your preferred archive manager\n"
+"from the list of available applications below:"
+msgstr ""
+
+#. tell the user that we cannot handle the specified mime types
+#: thunar-archive-plugin/tap-backend.c:280
+#: thunar-archive-plugin/tap-backend.c:432
+#, c-format
+msgid "No suitable archive manager found"
+msgstr ""
+
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:289
+#: thunar-archive-plugin/tap-provider.c:323
msgid "Failed to extract files"
msgstr "無法萃取出檔案"
-#. try to run the command
-#: thunar-archive-plugin/tap-provider.c:387
+#. execute the action
+#: thunar-archive-plugin/tap-provider.c:361
msgid "Failed to create archive"
msgstr "無法建立封存檔"
#. append the "Extract Here" action
-#: thunar-archive-plugin/tap-provider.c:433
+#: thunar-archive-plugin/tap-provider.c:406
msgid "Extract _Here"
msgstr "解壓縮到此處(_H)"
-#: thunar-archive-plugin/tap-provider.c:435
+#: thunar-archive-plugin/tap-provider.c:408
msgid "Extract the selected archive in the current folder"
msgid_plural "Extract the selected archives in the current folder"
msgstr[0] "將所選的壓縮檔解壓縮到目前所在的資料夾"
#. append the "Extract To..." action
-#: thunar-archive-plugin/tap-provider.c:448
+#: thunar-archive-plugin/tap-provider.c:424
msgid "_Extract To..."
msgstr "解壓縮至(_E)..."
-#: thunar-archive-plugin/tap-provider.c:450
+#: thunar-archive-plugin/tap-provider.c:426
msgid "Extract the selected archive"
msgid_plural "Extract the selected archives"
msgstr[0] "將所選的壓縮檔解壓縮"
#. append the "Create Archive..." action
-#: thunar-archive-plugin/tap-provider.c:466
+#: thunar-archive-plugin/tap-provider.c:445
msgid "Cr_eate Archive..."
msgstr "建立封存檔(_E)..."
-#: thunar-archive-plugin/tap-provider.c:468
+#: thunar-archive-plugin/tap-provider.c:447
msgid "Create an archive with the selected object"
msgid_plural "Create an archive with the selected objects"
msgstr[0] "依所選取的物件建立封存檔"
Property changes on: thunar-archive-plugin/trunk/scripts
___________________________________________________________________
Name: svn:ignore
+ .deps
.libs
Makefile
Makefile.in
.*.swp
Copied: thunar-archive-plugin/trunk/scripts/Makefile.am (from rev 1462, thunar-archive-plugin/trunk/Makefile.am)
===================================================================
--- thunar-archive-plugin/trunk/scripts/Makefile.am (rev 0)
+++ thunar-archive-plugin/trunk/scripts/Makefile.am 2006-07-01 21:24:28 UTC (rev 1463)
@@ -0,0 +1,11 @@
+# $Id$
+
+wrapperdir = $(libexecdir)/thunar-archive-plugin
+wrapper_SCRIPTS = \
+ ark.tap \
+ file-roller.tap
+
+EXTRA_DIST = \
+ $(wrapper_SCRIPTS)
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
Added: thunar-archive-plugin/trunk/scripts/ark.tap
===================================================================
--- thunar-archive-plugin/trunk/scripts/ark.tap (rev 0)
+++ thunar-archive-plugin/trunk/scripts/ark.tap 2006-07-01 21:24:28 UTC (rev 1463)
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# file-roller.tap - Wrapper script to create and extract archive files
+# in Thunar, via the thunar-archive-plugin, using the
+# KDE ark archive manager.
+#
+# $Id$
+#
+# Copyright (c) 2006 Benedikt Meurer <benny at xfce.org>.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+
+# determine the action and the folder, $@ then contains only the files
+action=$1; shift;
+folder=$1; shift;
+
+# check the action
+case $action in
+create)
+ exec ark --add $@
+ ;;
+
+extract-here)
+ exec ark --extract-to "$folder" $@
+ ;;
+
+extract-to)
+ exec ark --extract $@
+ ;;
+
+*)
+ echo "Unsupported action '$action'" >&2
+ exit 1
+esac
+
Property changes on: thunar-archive-plugin/trunk/scripts/ark.tap
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Rev
Added: thunar-archive-plugin/trunk/scripts/file-roller.tap
===================================================================
--- thunar-archive-plugin/trunk/scripts/file-roller.tap (rev 0)
+++ thunar-archive-plugin/trunk/scripts/file-roller.tap 2006-07-01 21:24:28 UTC (rev 1463)
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# file-roller.tap - Wrapper script to create and extract archive files
+# in Thunar, via the thunar-archive-plugin, using the
+# file-roller archive manager.
+#
+# $Id$
+#
+# Copyright (c) 2006 Benedikt Meurer <benny at xfce.org>.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+
+# determine the action and the folder, $@ then contains only the files
+action=$1; shift;
+folder=$1; shift;
+
+# check the action
+case $action in
+create)
+ exec file-roller "--default-dir=$folder" --add $@
+ ;;
+
+extract-here)
+ exec file-roller "--extract-to=$folder" --force $@
+ ;;
+
+extract-to)
+ exec file-roller "--default-dir=$folder" --extract $@
+ ;;
+
+*)
+ echo "Unsupported action '$action'" >&2
+ exit 1
+esac
+
Property changes on: thunar-archive-plugin/trunk/scripts/file-roller.tap
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Rev
Modified: thunar-archive-plugin/trunk/thunar-archive-plugin/Makefile.am
===================================================================
--- thunar-archive-plugin/trunk/thunar-archive-plugin/Makefile.am 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/thunar-archive-plugin/Makefile.am 2006-07-01 21:24:28 UTC (rev 1463)
@@ -5,6 +5,7 @@
-I$(top_srcdir) \
-DG_LOG_DOMAIN=\"thunar-archive-plugin\" \
-DEXO_API_SUBJECT_TO_CHANGE \
+ -DLIBEXECDIR=\"$(libexecdir)\" \
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
$(PLATFORM_CPPFLAGS)
@@ -13,6 +14,8 @@
thunar-archive-plugin.la
thunar_archive_plugin_la_SOURCES = \
+ tap-backend.c \
+ tap-backend.h \
tap-provider.c \
tap-provider.h \
thunar-archive-plugin.c
Added: thunar-archive-plugin/trunk/thunar-archive-plugin/tap-backend.c
===================================================================
--- thunar-archive-plugin/trunk/thunar-archive-plugin/tap-backend.c (rev 0)
+++ thunar-archive-plugin/trunk/thunar-archive-plugin/tap-backend.c 2006-07-01 21:24:28 UTC (rev 1463)
@@ -0,0 +1,588 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2006 Benedikt Meurer <benny at xfce.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include <thunar-vfs/thunar-vfs.h>
+
+#include <thunar-archive-plugin/tap-backend.h>
+
+
+
+static ThunarVfsMimeApplication *tap_backend_mime_ask (GList *mime_applications,
+ GtkWidget *parent);
+static GList *tap_backend_mime_applications (ThunarVfsMimeDatabase *mime_database,
+ GList *mime_infos);
+static ThunarVfsMimeApplication *tap_backend_mime_application (GList *mime_infos,
+ GtkWidget *window,
+ GError **error);
+static gchar *tap_backend_mime_wrapper (ThunarVfsMimeApplication *mime_application) G_GNUC_MALLOC;
+static GPid tap_backend_run (const gchar *action,
+ const gchar *folder,
+ GList *files,
+ GList *mime_infos,
+ GtkWidget *window,
+ GError **error);
+
+
+
+static ThunarVfsMimeApplication*
+tap_backend_mime_ask (GList *mime_applications,
+ GtkWidget *parent)
+{
+ ThunarVfsMimeApplication *mime_application = NULL;
+ GtkIconTheme *icon_theme;
+ const gchar *icon_name;
+ GtkTooltips *tooltips;
+ GtkWidget *button;
+ GtkWidget *dialog;
+ GtkWidget *image;
+ GtkWidget *label;
+ GtkWidget *table;
+ GtkWidget *bbox;
+ GtkWidget *hbox;
+ GSList *buttons = NULL;
+ GSList *bp;
+ gchar *command;
+ gchar *space;
+ GList *mp;
+
+ /* determine the icon theme for this screen */
+ icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (parent)));
+
+ /* allocate tooltips */
+ tooltips = gtk_tooltips_new ();
+ exo_gtk_object_ref_sink (GTK_OBJECT (tooltips));
+
+ /* prepare the dialog to query the preferred archiver for the user */
+ dialog = gtk_dialog_new_with_buttons (_("Select an archive manager"),
+ GTK_WINDOW (parent),
+ GTK_DIALOG_DESTROY_WITH_PARENT
+ | GTK_DIALOG_NO_SEPARATOR
+ | GTK_DIALOG_MODAL,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OK, GTK_RESPONSE_OK,
+ NULL);
+ gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+
+ /* add the main table */
+ table = gtk_table_new (2, 2, FALSE);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (table), 6);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, TRUE, TRUE, 0);
+ gtk_widget_show (table);
+
+ /* add the header image */
+ image = gtk_image_new_from_icon_name ("gnome-package", GTK_ICON_SIZE_DIALOG);
+ gtk_table_attach (GTK_TABLE (table), image, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show (image);
+
+ /* add the header label */
+ label = gtk_label_new (_("Please select your preferred archive manager\nfrom the list of available applications below:"));
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
+ gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+ gtk_widget_show (label);
+
+ /* add the button box */
+ bbox = gtk_vbox_new (FALSE, 6);
+ gtk_container_set_border_width (GTK_CONTAINER (bbox), 12);
+ gtk_table_attach (GTK_TABLE (table), bbox, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+ gtk_widget_show (bbox);
+
+ /* add the radio buttons */
+ for (mp = mime_applications; mp != NULL; mp = mp->next)
+ {
+ /* add the radio button */
+ button = gtk_radio_button_new (buttons);
+ buttons = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
+ g_object_set_data (G_OBJECT (button), "mime-application", mp->data);
+ gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ /* set the command as tooltip, as some archive manager's names are not very useful */
+ command = g_strdup (thunar_vfs_mime_handler_get_command (THUNAR_VFS_MIME_HANDLER (mp->data)));
+ space = strchr (command, ' ');
+ if (G_LIKELY (space != NULL))
+ *space = '\0';
+ gtk_tooltips_set_tip (tooltips, button, command, NULL);
+ g_free (command);
+
+ /* add the hbox */
+ hbox = gtk_hbox_new (FALSE, 2);
+ gtk_container_add (GTK_CONTAINER (button), hbox);
+ gtk_widget_show (hbox);
+
+ /* check if we have an icon for the application */
+ icon_name = thunar_vfs_mime_handler_lookup_icon_name (THUNAR_VFS_MIME_HANDLER (mp->data), icon_theme);
+ if (G_LIKELY (icon_name != NULL))
+ {
+ /* add an image */
+ image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
+ gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
+ gtk_widget_show (image);
+ }
+
+ /* add the label for the application */
+ label = gtk_label_new (thunar_vfs_mime_application_get_name (mp->data));
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
+ gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
+ gtk_widget_show (label);
+ }
+
+ /* run the dialog */
+ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
+ {
+ /* determine the selected application */
+ for (bp = buttons; bp != NULL; bp = bp->next)
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (bp->data)))
+ {
+ mime_application = g_object_get_data (G_OBJECT (bp->data), "mime-application");
+ g_object_ref (G_OBJECT (mime_application));
+ break;
+ }
+ }
+
+ /* cleanup */
+ g_object_unref (G_OBJECT (tooltips));
+ gtk_widget_destroy (dialog);
+
+ return mime_application;
+}
+
+
+
+static GList*
+tap_backend_mime_applications (ThunarVfsMimeDatabase *mime_database,
+ GList *mime_infos)
+{
+ GList *mime_applications = NULL;
+ GList *list;
+ GList *next;
+ GList *ap;
+ GList *lp;
+ gchar *s;
+
+ /* determine the set of applications that can handle all mime types */
+ for (lp = mime_infos; lp != NULL; lp = lp->next)
+ {
+ /* no need to check anything if this is the same mime type as the previous one */
+ if (lp->prev != NULL && lp->prev->data == lp->data)
+ continue;
+
+ /* determine the list of applications that can handle this mime type */
+ list = thunar_vfs_mime_database_get_applications (mime_database, lp->data);
+ if (G_UNLIKELY (mime_applications == NULL))
+ {
+ /* first file, so just use the applications list */
+ mime_applications = list;
+ }
+ else
+ {
+ /* keep only the applications that are also present in list */
+ for (ap = mime_applications; ap != NULL; ap = next)
+ {
+ /* grab a pointer on the next application */
+ next = ap->next;
+
+ /* check if the application is present in list */
+ if (g_list_find (list, ap->data) == NULL)
+ {
+ /* drop our reference on the application */
+ g_object_unref (G_OBJECT (ap->data));
+
+ /* drop this application from the list */
+ mime_applications = g_list_delete_link (mime_applications, ap);
+ }
+ }
+
+ /* release the list of applications for this mime type */
+ g_list_foreach (list, (GFunc) g_object_unref, NULL);
+ g_list_free (list);
+ }
+
+ /* check if the set is still not empty */
+ if (G_LIKELY (mime_applications == NULL))
+ break;
+ }
+
+ /* filter out any unsupported applications */
+ for (ap = mime_applications; ap != NULL; ap = next)
+ {
+ /* determine the pointer to the next item */
+ next = ap->next;
+
+ /* check if we have a wrapper for this application */
+ s = tap_backend_mime_wrapper (ap->data);
+ if (G_UNLIKELY (s == NULL))
+ {
+ /* drop our reference on the application */
+ g_object_unref (G_OBJECT (ap->data));
+
+ /* drop the application from the list */
+ mime_applications = g_list_delete_link (mime_applications, ap);
+ }
+ g_free (s);
+ }
+
+ return mime_applications;
+}
+
+
+
+static ThunarVfsMimeApplication*
+tap_backend_mime_application (GList *mime_infos,
+ GtkWidget *window,
+ GError **error)
+{
+ ThunarVfsMimeApplication *mime_application = NULL;
+ ThunarVfsMimeDatabase *mime_database;
+ const gchar * const *mime_types;
+ ThunarVfsMimeInfo *mime_info;
+ GError *err = NULL;
+ GList *mime_applications;
+ guint n;
+
+ /* grab a reference on the mime database */
+ mime_database = thunar_vfs_mime_database_get_default ();
+
+ /* determine the mime applications that can handle the mime types */
+ mime_applications = tap_backend_mime_applications (mime_database, mime_infos);
+ if (G_UNLIKELY (mime_applications == NULL))
+ {
+ /* tell the user that we cannot handle the specified mime types */
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, _("No suitable archive manager found"));
+ }
+ else if (mime_applications->next == NULL)
+ {
+ /* only a single supported archive manager available, use that */
+ mime_application = mime_applications->data;
+ g_list_free (mime_applications);
+ }
+ else
+ {
+ /* more than one supported archive manager, check if the first
+ * available is the default for all its supported mime types.
+ */
+ mime_types = thunar_vfs_mime_application_get_mime_types (mime_applications->data);
+ for (n = 0; mime_types[n] != NULL; ++n)
+ {
+ /* determine the default application for this mime type */
+ mime_info = thunar_vfs_mime_database_get_info (mime_database, mime_types[n]);
+ mime_application = thunar_vfs_mime_database_get_default_application (mime_database, mime_info);
+ thunar_vfs_mime_info_unref (mime_info);
+
+ /* check if our expected default application is also the default here */
+ if (mime_applications->data != mime_application)
+ {
+ /* no, have to ask the user */
+ g_object_unref (G_OBJECT (mime_application));
+ break;
+ }
+
+ /* yep, next one please... */
+ g_object_unref (G_OBJECT (mime_application));
+ }
+
+ /* check if we have found a suitable one */
+ if (G_LIKELY (mime_types[n] == NULL))
+ {
+ /* use the first available archive manager */
+ mime_application = g_object_ref (G_OBJECT (mime_applications->data));
+ }
+ else
+ {
+ /* ask the user to specify the default archive manager */
+ mime_application = tap_backend_mime_ask (mime_applications, window);
+ if (G_LIKELY (mime_application != NULL))
+ {
+ /* make the selected application the default for all its
+ * supported mime types, so we don't need to ask once again.
+ */
+ mime_types = thunar_vfs_mime_application_get_mime_types (mime_application);
+ for (n = 0; mime_types[n] != NULL; ++n)
+ {
+ /* set the default application */
+ mime_info = thunar_vfs_mime_database_get_info (mime_database, mime_types[n]);
+ if (!thunar_vfs_mime_database_set_default_application (mime_database, mime_info, mime_application, &err))
+ {
+ /* not critical, still we should tell the user that we failed */
+ g_warning ("Failed to make \"%s\" the default application for %s: %s",
+ thunar_vfs_mime_application_get_name (mime_application),
+ thunar_vfs_mime_info_get_name (mime_info), err->message);
+ g_clear_error (&err);
+ }
+ thunar_vfs_mime_info_unref (mime_info);
+ }
+ }
+ }
+
+ /* cleanup */
+ g_list_foreach (mime_applications, (GFunc) g_object_unref, NULL);
+ g_list_free (mime_applications);
+ }
+
+ /* release our reference on the mime database */
+ g_object_unref (G_OBJECT (mime_database));
+
+ return mime_application;
+}
+
+
+
+static gchar*
+tap_backend_mime_wrapper (ThunarVfsMimeApplication *mime_application)
+{
+ const gchar *desktop_id;
+ gchar *basename;
+ gchar *filename;
+ gchar *dot;
+
+ /* determine the basename of the .desktop file */
+ desktop_id = thunar_vfs_mime_application_get_desktop_id (mime_application);
+ basename = g_path_get_basename (desktop_id);
+ dot = strrchr (basename, '.');
+ if (G_LIKELY (dot != NULL))
+ *dot = '\0';
+
+ /* generate the filename for the .tap wrapper script */
+ filename = g_strdup_printf (LIBEXECDIR G_DIR_SEPARATOR_S "thunar-archive-plugin" G_DIR_SEPARATOR_S "%s.tap", basename);
+
+ /* check if the wrapper script exists */
+ if (!g_file_test (filename, G_FILE_TEST_IS_EXECUTABLE))
+ {
+ /* no wrapper then */
+ g_free (filename);
+ filename = NULL;
+ }
+
+ /* cleanup */
+ g_free (basename);
+
+ return filename;
+}
+
+
+
+static GPid
+tap_backend_run (const gchar *action,
+ const gchar *folder,
+ GList *files,
+ GList *mime_infos,
+ GtkWidget *window,
+ GError **error)
+{
+ ThunarVfsMimeApplication *mime_application;
+ ThunarVfsInfo *info;
+ GdkScreen *screen;
+ gchar *wrapper;
+ gchar **argv;
+ gchar *uri;
+ GList *lp;
+ GPid pid = -1;
+ gint n;
+
+ /* determine the mime infos on-demand */
+ if (G_LIKELY (mime_infos == NULL))
+ {
+ /* determine the mime infos from the files */
+ for (lp = files; lp != NULL; lp = lp->next)
+ {
+ info = thunarx_file_info_get_vfs_info (THUNARX_FILE_INFO (lp->data));
+ mime_infos = g_list_append (mime_infos, thunar_vfs_mime_info_ref (info->mime_info));
+ thunar_vfs_info_unref (info);
+ }
+ }
+
+ /* determine the mime application to use */
+ mime_application = tap_backend_mime_application (mime_infos, window, error);
+ if (G_LIKELY (mime_application != NULL))
+ {
+ /* determine the wrapper script for the application */
+ wrapper = tap_backend_mime_wrapper (mime_application);
+ if (G_UNLIKELY (wrapper == NULL))
+ {
+ /* tell the user that we cannot handle the specified mime types */
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, _("No suitable archive manager found"));
+ }
+ else
+ {
+ /* generate the command to run the wrapper */
+ argv = g_new0 (gchar *, 4 + g_list_length (files));
+ argv[0] = wrapper;
+ argv[1] = g_strdup (action);
+ argv[2] = g_strdup (folder);
+
+ /* append the file paths */
+ for (lp = files, n = 3; lp != NULL; lp = lp->next, ++n)
+ {
+ uri = thunarx_file_info_get_uri (THUNARX_FILE_INFO (lp->data));
+ argv[n] = g_filename_from_uri (uri, NULL, NULL);
+ g_free (uri);
+ }
+
+ /* determine the screen for this window */
+ screen = gtk_widget_get_screen (window);
+
+ /* try to run the command */
+ if (!gdk_spawn_on_screen (screen, folder, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, error))
+ pid = -1;
+
+ /* cleanup */
+ g_strfreev (argv);
+ }
+
+ /* cleanup */
+ g_object_unref (G_OBJECT (mime_application));
+ }
+
+ /* cleanup */
+ thunar_vfs_mime_info_list_free (mime_infos);
+
+ return pid;
+}
+
+
+
+/**
+ * tap_backend_create_archive:
+ * @folder : the path to the folder in which to create the archive.
+ * @files : a #GList of #ThunarxFileInfo<!---->s that refer to the
+ * files that should be added to the new archive.
+ * @window : a #GtkWindow, used to popup dialogs.
+ * @error : return location for errors or %NULL.
+ *
+ * Spawns a command to create a new archive in @folder with the
+ * specified @files, using the default archive manager.
+ *
+ * Note that %-1 will also be returned when the user cancels this
+ * operation, but @error will not be set then.
+ *
+ * Return value: the process id of the spawned command, or %-1
+ * on error.
+ **/
+GPid
+tap_backend_create_archive (const gchar *folder,
+ GList *files,
+ GtkWidget *window,
+ GError **error)
+{
+ ThunarVfsMimeDatabase *mime_database;
+ GList *mime_infos = NULL;
+
+ g_return_val_if_fail (files != NULL, -1);
+ g_return_val_if_fail (GTK_IS_WINDOW (window), -1);
+ g_return_val_if_fail (g_path_is_absolute (folder), -1);
+ g_return_val_if_fail (error == NULL || *error == NULL, -1);
+
+ /* determine the mime infos for zip and tar files (all supported archives must be able to handle them) */
+ mime_database = thunar_vfs_mime_database_get_default ();
+ mime_infos = g_list_append (mime_infos, thunar_vfs_mime_database_get_info (mime_database, "application/x-compressed-tar"));
+ mime_infos = g_list_append (mime_infos, thunar_vfs_mime_database_get_info (mime_database, "application/x-tar"));
+ mime_infos = g_list_append (mime_infos, thunar_vfs_mime_database_get_info (mime_database, "application/x-zip"));
+ mime_infos = g_list_append (mime_infos, thunar_vfs_mime_database_get_info (mime_database, "application/zip"));
+ g_object_unref (G_OBJECT (mime_database));
+
+ /* run the action, the mime infos will be freed by the _run() method */
+ return tap_backend_run ("create", folder, files, mime_infos, window, error);
+}
+
+
+
+/**
+ * tap_backend_extract_here:
+ * @folder : the path to the folder in which to extract the @files.
+ * @files : a #GList of #ThunarxFileInfo<!---->s that refer to the
+ * archive files that should be extracted.
+ * @window : a #GtkWindow, used to popup dialogs.
+ * @error : return location for errors or %NULL.
+ *
+ * Spawns a command to extract the set of archive @files in the
+ * specified @folder, using the default archive manager. The
+ * user will not be prompted to specify a destination folder.
+ *
+ * Note that %-1 will also be returned when the user cancels this
+ * operation, but @error will not be set then.
+ *
+ * Return value: the process id of the spawned command, or %-1
+ * on error.
+ **/
+GPid
+tap_backend_extract_here (const gchar *folder,
+ GList *files,
+ GtkWidget *window,
+ GError **error)
+{
+ g_return_val_if_fail (files != NULL, -1);
+ g_return_val_if_fail (GTK_IS_WINDOW (window), -1);
+ g_return_val_if_fail (g_path_is_absolute (folder), -1);
+ g_return_val_if_fail (error == NULL || *error == NULL, -1);
+
+ /* run the action */
+ return tap_backend_run ("extract-here", folder, files, NULL, window, error);
+}
+
+
+
+/**
+ * tap_backend_extract_here:
+ * @folder : the path to the folder, which is suggested to the
+ * user as destination folder.
+ * @files : a #GList of #ThunarxFileInfo<!---->s that refer to the
+ * archive files that should be extracted.
+ * @window : a #GtkWindow, used to popup dialogs.
+ * @error : return location for errors or %NULL.
+ *
+ * Spawns a command to extract the set of archive @files using
+ * the default archive manager. The user will be prompted to
+ * specify a destination folder, and the @folder will be suggested
+ * as default destination.
+ *
+ * Note that %-1 will also be returned when the user cancels this
+ * operation, but @error will not be set then.
+ *
+ * Return value: the process id of the spawned command, or %-1
+ * on error.
+ **/
+GPid
+tap_backend_extract_to (const gchar *folder,
+ GList *files,
+ GtkWidget *window,
+ GError **error)
+{
+ g_return_val_if_fail (files != NULL, -1);
+ g_return_val_if_fail (GTK_IS_WINDOW (window), -1);
+ g_return_val_if_fail (g_path_is_absolute (folder), -1);
+ g_return_val_if_fail (error == NULL || *error == NULL, -1);
+
+ /* run the action */
+ return tap_backend_run ("extract-to", folder, files, NULL, window, error);
+}
+
+
Property changes on: thunar-archive-plugin/trunk/thunar-archive-plugin/tap-backend.c
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Rev
Added: thunar-archive-plugin/trunk/thunar-archive-plugin/tap-backend.h
===================================================================
--- thunar-archive-plugin/trunk/thunar-archive-plugin/tap-backend.h (rev 0)
+++ thunar-archive-plugin/trunk/thunar-archive-plugin/tap-backend.h 2006-07-01 21:24:28 UTC (rev 1463)
@@ -0,0 +1,45 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2006 Benedikt Meurer <benny at xfce.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __TAP_BACKEND_H__
+#define __TAP_BACKEND_H__
+
+#include <thunarx/thunarx.h>
+
+G_BEGIN_DECLS;
+
+GPid tap_backend_create_archive (const gchar *folder,
+ GList *files,
+ GtkWidget *window,
+ GError **error) G_GNUC_INTERNAL;
+
+GPid tap_backend_extract_here (const gchar *folder,
+ GList *files,
+ GtkWidget *window,
+ GError **error) G_GNUC_INTERNAL;
+
+GPid tap_backend_extract_to (const gchar *folder,
+ GList *files,
+ GtkWidget *window,
+ GError **error) G_GNUC_INTERNAL;
+
+G_END_DECLS;
+
+#endif /* !__TAP_BACKEND_H__ */
Property changes on: thunar-archive-plugin/trunk/thunar-archive-plugin/tap-backend.h
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Rev
Modified: thunar-archive-plugin/trunk/thunar-archive-plugin/tap-provider.c
===================================================================
--- thunar-archive-plugin/trunk/thunar-archive-plugin/tap-provider.c 2006-06-28 18:27:58 UTC (rev 1462)
+++ thunar-archive-plugin/trunk/thunar-archive-plugin/tap-provider.c 2006-07-01 21:24:28 UTC (rev 1463)
@@ -28,6 +28,7 @@
#include <thunar-vfs/thunar-vfs.h>
+#include <thunar-archive-plugin/tap-backend.h>
#include <thunar-archive-plugin/tap-provider.h>
/* use access(2) with older GLib */
@@ -47,9 +48,13 @@
GtkWidget *window,
GList *files);
static void tap_provider_execute (TapProvider *tap_provider,
+ GPid (*action) (const gchar *folder,
+ GList *files,
+ GtkWidget *window,
+ GError **error),
GtkWidget *window,
- const gchar *working_directory,
- const gchar *command,
+ const gchar *folder,
+ GList *files,
const gchar *error_message);
static void tap_provider_child_watch (GPid pid,
gint status,
@@ -152,15 +157,24 @@
tap_provider->icon_factory = gtk_icon_factory_new ();
gtk_icon_factory_add_default (tap_provider->icon_factory);
- /* add the "thunar-archive-plugin" stock icon */
+ /* add the "tap-add" stock icon */
icon_set = gtk_icon_set_new ();
icon_source = gtk_icon_source_new ();
- gtk_icon_source_set_icon_name (icon_source, "file-roller");
+ gtk_icon_source_set_icon_name (icon_source, "tap-add");
gtk_icon_set_add_source (icon_set, icon_source);
- gtk_icon_factory_add (tap_provider->icon_factory, "thunar-archive-plugin", icon_set);
+ gtk_icon_factory_add (tap_provider->icon_factory, "tap-add", icon_set);
gtk_icon_source_free (icon_source);
gtk_icon_set_unref (icon_set);
+ /* add the "tap-extract" stock icon */
+ icon_set = gtk_icon_set_new ();
+ icon_source = gtk_icon_source_new ();
+ gtk_icon_source_set_icon_name (icon_source, "tap-extract");
+ gtk_icon_set_add_source (icon_set, icon_source);
+ gtk_icon_factory_add (tap_provider->icon_factory, "tap-extract", icon_set);
+ gtk_icon_source_free (icon_source);
+ gtk_icon_set_unref (icon_set);
+
/* initialize the child watch support */
tap_provider->child_watch_path = NULL;
tap_provider->child_watch_id = -1;
@@ -239,44 +253,12 @@
-static gchar*
-tap_files_to_string (GList *files)
-{
- GString *string;
- gchar *filename;
- gchar *uri;
- GList *lp;
-
- string = g_string_new ("");
- for (lp = files; lp != NULL; lp = lp->next)
- {
- /* determine the filename of the file */
- uri = thunarx_file_info_get_uri (lp->data);
- filename = g_filename_from_uri (uri, NULL, NULL);
- g_free (uri);
-
- /* check if we have a valid filename */
- if (G_LIKELY (filename != NULL))
- {
- /* append the filename to the string */
- g_string_append_printf (string, " \"%s\"", filename);
- g_free (filename);
- }
- }
-
- return g_string_free (string, FALSE);
-}
-
-
-
static void
tap_extract_here (GtkAction *action,
GtkWidget *window)
{
TapProvider *tap_provider;
GList *files;
- gchar *files_string;
- gchar *command;
gchar *dirname;
gchar *uri;
@@ -303,19 +285,11 @@
if (G_UNLIKELY (dirname == NULL))
return;
- /* generate the files list string */
- files_string = tap_files_to_string (files);
+ /* execute the action */
+ tap_provider_execute (tap_provider, tap_backend_extract_here, window, dirname, files, _("Failed to extract files"));
- /* generate the command line */
- command = g_strdup_printf ("file-roller --extract-to=\"%s\" --force %s", dirname, files_string);
-
- /* try to run the command */
- tap_provider_execute (tap_provider, window, dirname, command, _("Failed to extract files"));
-
/* cleanup */
- g_free (files_string);
g_free (dirname);
- g_free (command);
}
@@ -327,8 +301,6 @@
TapProvider *tap_provider;
const gchar *default_dir;
GList *files;
- gchar *files_string;
- gchar *command;
/* determine the files associated with the action */
files = g_object_get_qdata (G_OBJECT (action), tap_action_files_quark);
@@ -340,9 +312,6 @@
if (G_UNLIKELY (tap_provider == NULL))
return;
- /* generate the files list string */
- files_string = tap_files_to_string (files);
-
/* if $GTK_DEFAULT_FILECHOOSER_DIR is set, we use that as default
* folder (i.e. Ubuntu), otherwise we just use $HOME.
*/
@@ -350,15 +319,8 @@
if (G_LIKELY (default_dir == NULL))
default_dir = g_get_home_dir ();
- /* generate the command line */
- command = g_strdup_printf ("file-roller --default-dir=\"%s\" --extract %s", default_dir, files_string);
-
- /* try to run the command */
- tap_provider_execute (tap_provider, window, default_dir, command, _("Failed to extract files"));
-
- /* cleanup */
- g_free (files_string);
- g_free (command);
+ /* execute the action */
+ tap_provider_execute (tap_provider, tap_backend_extract_to, window, default_dir, files, _("Failed to extract files"));
}
@@ -369,8 +331,6 @@
{
TapProvider *tap_provider;
GList *files;
- gchar *files_string;
- gchar *command;
gchar *dirname;
gchar *uri;
@@ -397,19 +357,11 @@
if (G_UNLIKELY (dirname == NULL))
return;
- /* generate the files list string */
- files_string = tap_files_to_string (files);
+ /* execute the action */
+ tap_provider_execute (tap_provider, tap_backend_create_archive, window, dirname, files, _("Failed to create archive"));
- /* generate the command line */
- command = g_strdup_printf ("file-roller --default-dir=\"%s\" --add %s", dirname, files_string);
-
- /* try to run the command */
- tap_provider_execute (tap_provider, window, dirname, command, _("Failed to create archive"));
-
/* cleanup */
- g_free (files_string);
g_free (dirname);
- g_free (command);
}
@@ -456,7 +408,7 @@
"Extract the selected archive in the current folder",
"Extract the selected archives in the current folder",
n_files),
- "thunar-archive-plugin");
+ "tap-extract");
g_object_set_qdata_full (G_OBJECT (action), tap_action_files_quark,
thunarx_file_info_list_copy (files),
(GDestroyNotify) thunarx_file_info_list_free);
@@ -474,7 +426,7 @@
"Extract the selected archive",
"Extract the selected archives",
n_files),
- "thunar-archive-plugin");
+ "tap-extract");
g_object_set_qdata_full (G_OBJECT (action), tap_action_files_quark,
thunarx_file_info_list_copy (files),
(GDestroyNotify) thunarx_file_info_list_free);
@@ -495,7 +447,7 @@
"Create an archive with the selected object",
"Create an archive with the selected objects",
n_files),
- "thunar-archive-plugin");
+ "tap-add");
g_object_set_qdata_full (G_OBJECT (action), tap_action_files_quark,
thunarx_file_info_list_copy (files),
(GDestroyNotify) thunarx_file_info_list_free);
@@ -514,54 +466,43 @@
static void
tap_provider_execute (TapProvider *tap_provider,
+ GPid (*action) (const gchar *folder,
+ GList *files,
+ GtkWidget *window,
+ GError **error),
GtkWidget *window,
- const gchar *working_directory,
- const gchar *command_line,
+ const gchar *folder,
+ GList *files,
const gchar *error_message)
{
GtkWidget *dialog;
- GdkScreen *screen;
- gboolean succeed;
GSource *source;
GError *error = NULL;
- gchar **argv;
- gint pid;
+ GPid pid;
- /* determine the screen on which to run the command */
- screen = gtk_widget_get_screen (window);
- if (G_UNLIKELY (screen == NULL))
- return;
-
- /* try to parse the command line */
- succeed = g_shell_parse_argv (command_line, NULL, &argv, &error);
- if (G_LIKELY (succeed))
+ /* try to execute the action */
+ pid = (*action) (folder, files, window, &error);
+ if (G_LIKELY (pid >= 0))
{
- /* try to run the command */
- succeed = gdk_spawn_on_screen (screen, working_directory, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH, NULL, NULL, &pid, &error);
- if (G_LIKELY (succeed))
+ /* check if we already have a child watch */
+ if (G_UNLIKELY (tap_provider->child_watch_id >= 0))
{
- /* check if we already have a child watch */
- if (G_UNLIKELY (tap_provider->child_watch_id >= 0))
- {
- /* reset the callback function to g_spawn_close_pid() so the plugin can be
- * safely unloaded and the child will still not become a zombie afterwards.
- */
- source = g_main_context_find_source_by_id (NULL, tap_provider->child_watch_id);
- g_source_set_callback (source, (GSourceFunc) g_spawn_close_pid, NULL, NULL);
- }
+ /* reset the callback function to g_spawn_close_pid() so the plugin can be
+ * safely unloaded and the child will still not become a zombie afterwards.
+ */
+ source = g_main_context_find_source_by_id (NULL, tap_provider->child_watch_id);
+ g_source_set_callback (source, (GSourceFunc) g_spawn_close_pid, NULL, NULL);
+ }
- /* schedule the new child watch */
- tap_provider->child_watch_id = g_child_watch_add_full (G_PRIORITY_LOW, pid, tap_provider_child_watch,
- tap_provider, tap_provider_child_watch_destroy);
+ /* schedule the new child watch */
+ tap_provider->child_watch_id = g_child_watch_add_full (G_PRIORITY_LOW, pid, tap_provider_child_watch,
+ tap_provider, tap_provider_child_watch_destroy);
-
- /* remember the working directory for the child watch */
- tap_provider->child_watch_path = g_strdup (working_directory);
- }
+
+ /* remember the working directory for the child watch */
+ tap_provider->child_watch_path = g_strdup (folder);
}
-
- /* check if we failed */
- if (G_UNLIKELY (!succeed))
+ else if (error != NULL)
{
/* display an error dialog */
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
@@ -575,9 +516,6 @@
gtk_widget_destroy (dialog);
g_error_free (error);
}
-
- /* cleanup */
- g_strfreev (argv);
}
More information about the Goodies-commits
mailing list