[arch-commits] Commit in thunar-archive-plugin/trunk (PKGBUILD thunar-vfs2gio.patch)

andyrtr at archlinux.org andyrtr at archlinux.org
Sun Jan 23 13:55:43 EST 2011


    Date: Sunday, January 23, 2011 @ 13:55:43
  Author: andyrtr
Revision: 107340

upgpkg: thunar-archive-plugin 0.3.0-1
upstream update 0.3.0

Modified:
  thunar-archive-plugin/trunk/PKGBUILD
Deleted:
  thunar-archive-plugin/trunk/thunar-vfs2gio.patch

----------------------+
 PKGBUILD             |   16 -
 thunar-vfs2gio.patch |  617 -------------------------------------------------
 2 files changed, 5 insertions(+), 628 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-01-23 18:02:44 UTC (rev 107339)
+++ PKGBUILD	2011-01-23 18:55:43 UTC (rev 107340)
@@ -3,28 +3,22 @@
 # Contributor: Tobias Kieslich <tobias (at) archlinux.org>
 
 pkgname=thunar-archive-plugin
-pkgver=0.2.4
-pkgrel=8
+pkgver=0.3.0
+pkgrel=1
 pkgdesc="create and deflate archives in thunar"
 arch=(i686 x86_64)
 license=('GPL2')
 url="http://goodies.xfce.org/projects/thunar-plugins/thunar-archive-plugin"
 groups=('xfce4-goodies')
-depends=('thunar>=1.2.0' 'thunar-vfs')
+depends=('thunar>=1.2.0' 'hicolor-icon-theme')
 makedepends=('intltool')
 options=('!libtool')
 install=${pkgname}.install
-source=(http://download.berlios.de/xfce-goodies/${pkgname}-${pkgver}.tar.bz2
-	thunar-vfs2gio.patch)
-md5sums=('4c389e6328af9322937af76382f0baec'
-         'f1453d7c9cd9dde04f23d78f271298cd')
+source=(http://archive.xfce.org/src/thunar-plugins/${pkgname}/0.3/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('afeb3f1c65a4529dbdadc6e7b349a712')
 
 build() {
   cd ${srcdir}/${pkgname}-${pkgver}
-  # thunar 1.2 fix
-  patch -Np1 -i ${srcdir}/thunar-vfs2gio.patch
-  sed -i -e 's/thunarx-1/thunarx-2/g' `grep -l 'thunarx-1' * -R`
- 
   ./configure --prefix=/usr \
 	--sysconfdir=/etc \
 	--libexecdir=/usr/lib/xfce4 \

Deleted: thunar-vfs2gio.patch
===================================================================
--- thunar-vfs2gio.patch	2011-01-23 18:02:44 UTC (rev 107339)
+++ thunar-vfs2gio.patch	2011-01-23 18:55:43 UTC (rev 107340)
@@ -1,617 +0,0 @@
-diff -aur thunar-archive-plugin-0.2.4/configure thunar-archive-plugin-0.2.4.new//configure
---- thunar-archive-plugin-0.2.4/configure	2007-01-20 11:44:59.000000000 +0100
-+++ thunar-archive-plugin-0.2.4.new//configure	2010-11-28 17:31:59.000000000 +0100
-@@ -22113,26 +22113,26 @@
-   fi
- 
- 
--  echo "$as_me:$LINENO: checking for thunarx-1 >= 0.4.0" >&5
--echo $ECHO_N "checking for thunarx-1 >= 0.4.0... $ECHO_C" >&6
--  if $PKG_CONFIG "--atleast-version=0.4.0" "thunarx-1" >/dev/null 2>&1; then
--    THUNARX_VERSION=`$PKG_CONFIG --modversion "thunarx-1"`
-+  echo "$as_me:$LINENO: checking for thunarx-2 >= 1.0.1" >&5
-+echo $ECHO_N "checking for thunarx-2 >= 1.0.1... $ECHO_C" >&6
-+  if $PKG_CONFIG "--atleast-version=1.0.1" "thunarx-2" >/dev/null 2>&1; then
-+    THUNARX_VERSION=`$PKG_CONFIG --modversion "thunarx-2"`
-     echo "$as_me:$LINENO: result: $THUNARX_VERSION" >&5
- echo "${ECHO_T}$THUNARX_VERSION" >&6
- 
-     echo "$as_me:$LINENO: checking THUNARX_CFLAGS" >&5
- echo $ECHO_N "checking THUNARX_CFLAGS... $ECHO_C" >&6
--    THUNARX_CFLAGS=`$PKG_CONFIG --cflags "thunarx-1"`
-+    THUNARX_CFLAGS=`$PKG_CONFIG --cflags "thunarx-2"`
-     echo "$as_me:$LINENO: result: $THUNARX_CFLAGS" >&5
- echo "${ECHO_T}$THUNARX_CFLAGS" >&6
- 
-     echo "$as_me:$LINENO: checking THUNARX_LIBS" >&5
- echo $ECHO_N "checking THUNARX_LIBS... $ECHO_C" >&6
--    THUNARX_LIBS=`$PKG_CONFIG --libs "thunarx-1"`
-+    THUNARX_LIBS=`$PKG_CONFIG --libs "thunarx-2"`
-     echo "$as_me:$LINENO: result: $THUNARX_LIBS" >&5
- echo "${ECHO_T}$THUNARX_LIBS" >&6
- 
--    THUNARX_REQUIRED_VERSION=0.4.0
-+    THUNARX_REQUIRED_VERSION=1.0.1
- 
- 
- 
-@@ -22140,15 +22140,15 @@
- 
- 
- 
--  elif $PKG_CONFIG --exists "thunarx-1" >/dev/null 2>&1; then
--    xdt_cv_version=`$PKG_CONFIG --modversion "thunarx-1"`
-+  elif $PKG_CONFIG --exists "thunarx-2" >/dev/null 2>&1; then
-+    xdt_cv_version=`$PKG_CONFIG --modversion "thunarx-2"`
-     echo "$as_me:$LINENO: result: found, but $xdt_cv_version" >&5
- echo "${ECHO_T}found, but $xdt_cv_version" >&6
- 
- 
--      echo "*** The required package thunarx-1 was found on your system,"
-+      echo "*** The required package thunarx-2 was found on your system,"
-       echo "*** but the installed version ($xdt_cv_version) is too old."
--      echo "*** Please upgrade thunarx-1 to atleast version 0.4.0, or adjust"
-+      echo "*** Please upgrade thunarx-2 to atleast version 1.0.1, or adjust"
-       echo "*** the PKG_CONFIG_PATH environment variable if you installed"
-       echo "*** the new version of the package in a nonstandard prefix so"
-       echo "*** pkg-config is able to find it."
-@@ -22159,8 +22159,8 @@
- echo "${ECHO_T}not found" >&6
- 
- 
--      echo "*** The required package thunarx-1 was not found on your system."
--      echo "*** Please install thunarx-1 (atleast version 0.4.0) or adjust"
-+      echo "*** The required package thunarx-2 was not found on your system."
-+      echo "*** Please install thunarx-2 (atleast version 1.0.1) or adjust"
-       echo "*** the PKG_CONFIG_PATH environment variable if you"
-       echo "*** installed the package in a nonstandard prefix so that"
-       echo "*** pkg-config is able to find it."
-@@ -22250,9 +22250,9 @@
-   fi
- 
- 
--  echo "$as_me:$LINENO: checking for thunar-vfs-1 >= 0.4.0" >&5
--echo $ECHO_N "checking for thunar-vfs-1 >= 0.4.0... $ECHO_C" >&6
--  if $PKG_CONFIG "--atleast-version=0.4.0" "thunar-vfs-1" >/dev/null 2>&1; then
-+  echo "$as_me:$LINENO: checking for thunar-vfs-1 >= 1.0.1" >&5
-+echo $ECHO_N "checking for thunar-vfs-1 >= 1.0.1... $ECHO_C" >&6
-+  if $PKG_CONFIG "--atleast-version=1.0.1" "thunar-vfs-1" >/dev/null 2>&1; then
-     THUNAR_VFS_VERSION=`$PKG_CONFIG --modversion "thunar-vfs-1"`
-     echo "$as_me:$LINENO: result: $THUNAR_VFS_VERSION" >&5
- echo "${ECHO_T}$THUNAR_VFS_VERSION" >&6
-@@ -22269,7 +22269,7 @@
-     echo "$as_me:$LINENO: result: $THUNAR_VFS_LIBS" >&5
- echo "${ECHO_T}$THUNAR_VFS_LIBS" >&6
- 
--    THUNAR_VFS_REQUIRED_VERSION=0.4.0
-+    THUNAR_VFS_REQUIRED_VERSION=1.0.1
- 
- 
- 
-@@ -22285,7 +22285,7 @@
- 
-       echo "*** The required package thunar-vfs-1 was found on your system,"
-       echo "*** but the installed version ($xdt_cv_version) is too old."
--      echo "*** Please upgrade thunar-vfs-1 to atleast version 0.4.0, or adjust"
-+      echo "*** Please upgrade thunar-vfs-1 to atleast version 1.0.1, or adjust"
-       echo "*** the PKG_CONFIG_PATH environment variable if you installed"
-       echo "*** the new version of the package in a nonstandard prefix so"
-       echo "*** pkg-config is able to find it."
-@@ -22297,7 +22297,7 @@
- 
- 
-       echo "*** The required package thunar-vfs-1 was not found on your system."
--      echo "*** Please install thunar-vfs-1 (atleast version 0.4.0) or adjust"
-+      echo "*** Please install thunar-vfs-1 (atleast version 1.0.1) or adjust"
-       echo "*** the PKG_CONFIG_PATH environment variable if you"
-       echo "*** installed the package in a nonstandard prefix so that"
-       echo "*** pkg-config is able to find it."
-diff -aur thunar-archive-plugin-0.2.4/configure.in thunar-archive-plugin-0.2.4.new//configure.in
---- thunar-archive-plugin-0.2.4/configure.in	2007-01-20 11:44:45.000000000 +0100
-+++ thunar-archive-plugin-0.2.4.new//configure.in	2010-11-28 17:31:36.000000000 +0100
-@@ -68,8 +68,9 @@
- dnl ***********************************
- dnl *** Check for required packages ***
- dnl ***********************************
--XDT_CHECK_PACKAGE([THUNARX], [thunarx-1], [0.4.0])
--XDT_CHECK_PACKAGE([THUNAR_VFS], [thunar-vfs-1], [0.4.0])
-+XDT_CHECK_PACKAGE([THUNARX], [thunarx-2], [1.0.1])
-+XDT_CHECK_PACKAGE([EXO], [exo-1], [0.5])
-+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.6.0])
- 
- dnl ***********************************
- dnl *** Check for debugging support ***
-diff -aur thunar-archive-plugin-0.2.4/thunar-archive-plugin/Makefile.am thunar-archive-plugin-0.2.4.new//thunar-archive-plugin/Makefile.am
---- thunar-archive-plugin-0.2.4/thunar-archive-plugin/Makefile.am	2007-01-20 11:41:50.000000000 +0100
-+++ thunar-archive-plugin-0.2.4.new//thunar-archive-plugin/Makefile.am	2010-11-28 17:31:36.000000000 +0100
-@@ -9,7 +9,7 @@
- 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"				\
- 	$(PLATFORM_CPPFLAGS)
- 
--extensionsdir = $(libdir)/thunarx-1
-+extensionsdir = $(libdir)/thunarx-2
- extensions_LTLIBRARIES =						\
- 	thunar-archive-plugin.la
- 
-@@ -23,7 +23,8 @@
- thunar_archive_plugin_la_CFLAGS =					\
- 	$(PLATFORM_CFLAGS)						\
- 	$(THUNARX_CFLAGS)						\
--	$(THUNAR_VFS_CFLAGS)
-+	$(EXO_CFLAGS)							\
-+	$(LIBXFCE4UTIL_CFLAGS)
- 
- thunar_archive_plugin_la_LDFLAGS =					\
- 	-avoid-version							\
-diff -aur thunar-archive-plugin-0.2.4/thunar-archive-plugin/tap-backend.c thunar-archive-plugin-0.2.4.new//thunar-archive-plugin/tap-backend.c
---- thunar-archive-plugin-0.2.4/thunar-archive-plugin/tap-backend.c	2007-01-20 11:41:50.000000000 +0100
-+++ thunar-archive-plugin-0.2.4.new//thunar-archive-plugin/tap-backend.c	2010-11-28 17:31:36.000000000 +0100
-@@ -29,36 +29,36 @@
- #include <string.h>
- #endif
- 
--#include <thunar-vfs/thunar-vfs.h>
--
-+#include <exo/exo.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 GAppInfo *tap_backend_mime_ask                   (GList       *mime_applications,
-+                                                         GtkWidget   *parent);
-+static gint      tap_backend_mime_application_compare   (GAppInfo    *a,
-+                                                         GAppInfo    *b);
-+static GList    *tap_backend_mime_applications          (GList       *content_types);
-+static GAppInfo *tap_backend_mime_application           (GList       *content_types,
-+                                                         GtkWidget   *window,
-+                                                         GError     **error);
-+static gchar    *tap_backend_mime_wrapper               (GAppInfo    *mime_application) G_GNUC_MALLOC;
-+static GPid      tap_backend_run                        (const gchar *action,
-+                                                         const gchar *folder,
-+                                                         GList       *files,
-+                                                         GList       *content_types,
-+                                                         GtkWidget   *window,
-+                                                         GError     **error);
- 
- 
- 
--static ThunarVfsMimeApplication*
-+static GAppInfo*
- tap_backend_mime_ask (GList     *mime_applications,
-                       GtkWidget *parent)
- {
--  ThunarVfsMimeApplication *mime_application = NULL;
-+  GAppInfo                 *mime_application = NULL;
-   GtkIconTheme             *icon_theme;
--  const gchar              *icon_name;
-+  GIcon                    *icon;
-   GtkTooltips              *tooltips;
-   GtkWidget                *button;
-   GtkWidget                *dialog;
-@@ -127,7 +127,7 @@
-       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)));
-+      command = g_strdup (g_app_info_get_executable (mp->data));
-       space = strchr (command, ' ');
-       if (G_LIKELY (space != NULL))
-         *space = '\0';
-@@ -140,17 +140,17 @@
-       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))
-+      icon = g_app_info_get_icon (mp->data);
-+      if (G_LIKELY (icon != NULL))
-         {
-           /* add an image */
--          image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
-+          image = gtk_image_new_from_gicon (icon, 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));
-+      label = gtk_label_new (g_app_info_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);
-@@ -178,9 +178,17 @@
- 
- 
- 
-+static gint
-+tap_backend_mime_application_compare (GAppInfo *a,
-+                                      GAppInfo *b)
-+{
-+  return g_app_info_equal (a, b)?0:1;
-+}
-+
-+
-+
- static GList*
--tap_backend_mime_applications (ThunarVfsMimeDatabase *mime_database,
--                               GList                 *mime_infos)
-+tap_backend_mime_applications (GList *content_types)
- {
-   GList *mime_applications = NULL;
-   GList *list;
-@@ -190,14 +198,14 @@
-   gchar *s;
- 
-   /* determine the set of applications that can handle all mime types */
--  for (lp = mime_infos; lp != NULL; lp = lp->next)
-+  for (lp = content_types; 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);
-+      list = g_app_info_get_all_for_type (lp->data);
-       if (G_UNLIKELY (mime_applications == NULL))
-         {
-           /* first file, so just use the applications list */
-@@ -212,7 +220,7 @@
-               next = ap->next;
- 
-               /* check if the application is present in list */
--              if (g_list_find (list, ap->data) == NULL)
-+              if (g_list_find_custom (list, ap->data, (GCompareFunc) tap_backend_mime_application_compare) == NULL)
-                 {
-                   /* drop our reference on the application */
-                   g_object_unref (G_OBJECT (ap->data));
-@@ -256,24 +264,19 @@
- 
- 
- 
--static ThunarVfsMimeApplication*
--tap_backend_mime_application (GList     *mime_infos,
-+static GAppInfo*
-+tap_backend_mime_application (GList     *content_types,
-                               GtkWidget *window,
-                               GError   **error)
- {
--  ThunarVfsMimeApplication *mime_application = NULL;
--  ThunarVfsMimeDatabase    *mime_database;
--  const gchar * const      *mime_types;
--  ThunarVfsMimeInfo        *mime_info;
-+  GAppInfo                 *mime_application = NULL;
-+  GAppInfo                 *app_info;
-   GError                   *err = NULL;
-   GList                    *mime_applications;
--  guint                     n;
--
--  /* grab a reference on the mime database */
--  mime_database = thunar_vfs_mime_database_get_default ();
-+  GList                    *lp;
- 
-   /* determine the mime applications that can handle the mime types */
--  mime_applications = tap_backend_mime_applications (mime_database, mime_infos);
-+  mime_applications = tap_backend_mime_applications (content_types);
-   if (G_UNLIKELY (mime_applications == NULL))
-     {
-       /* tell the user that we cannot handle the specified mime types */
-@@ -290,28 +293,29 @@
-       /* 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)
-+      for (lp = content_types; lp != NULL; lp = lp->next)
-         {
-           /* 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);
-+          app_info = g_app_info_get_default_for_type (lp->data, FALSE);
-+
-+          /* no default applications for this mime type */
-+          if (app_info == NULL)
-+            break;
- 
-           /* check if our expected default application is also the default here */
--          if (mime_applications->data != mime_application)
-+          if (!g_app_info_equal (app_info, mime_applications->data))
-             {
-               /* no, have to ask the user */
--              g_object_unref (G_OBJECT (mime_application));
-+              g_object_unref (app_info);
-               break;
-             }
- 
-           /* yep, next one please... */
--          g_object_unref (G_OBJECT (mime_application));
-+          g_object_unref (app_info);
-         }
- 
-       /* check if we have found a suitable one */
--      if (G_LIKELY (mime_types[n] == NULL))
-+      if (G_LIKELY (lp == NULL))
-         {
-           /* use the first available archive manager */
-           mime_application = g_object_ref (G_OBJECT (mime_applications->data));
-@@ -325,20 +329,17 @@
-               /* 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)
-+              for (lp = content_types; lp != NULL; lp = lp->next)
-                 {
-                   /* 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))
-+                  if (!g_app_info_set_as_default_for_type (mime_application, lp->data, &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_app_info_get_name (mime_application),
-+                                 (char*) lp->data, err->message);
-                       g_clear_error (&err);
-                     }
--                  thunar_vfs_mime_info_unref (mime_info);
-                 }
-             }
-         }
-@@ -348,16 +349,13 @@
-       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)
-+tap_backend_mime_wrapper (GAppInfo *mime_application)
- {
-   const gchar *desktop_id;
-   gchar       *basename;
-@@ -365,7 +363,7 @@
-   gchar       *dot;
- 
-   /* determine the basename of the .desktop file */
--  desktop_id = thunar_vfs_mime_application_get_desktop_id (mime_application);
-+  desktop_id = g_app_info_get_id (mime_application);
-   basename = g_path_get_basename (desktop_id);
-   dot = strrchr (basename, '.');
-   if (G_LIKELY (dot != NULL))
-@@ -394,12 +392,12 @@
- tap_backend_run (const gchar *action,
-                  const gchar *folder,
-                  GList       *files,
--                 GList       *mime_infos,
-+                 GList       *content_types,
-                  GtkWidget   *window,
-                  GError     **error)
- {
--  ThunarVfsMimeApplication *mime_application;
--  ThunarVfsInfo            *info;
-+  GAppInfo                 *mime_application;
-+  gchar                    *mime_type;
-   GdkScreen                *screen;
-   gchar                    *wrapper;
-   gchar                   **argv;
-@@ -409,19 +407,19 @@
-   gint                      n;
- 
-   /* determine the mime infos on-demand */
--  if (G_LIKELY (mime_infos == NULL))
-+  if (G_LIKELY (content_types == 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);
-+          mime_type = thunarx_file_info_get_mime_type (THUNARX_FILE_INFO (lp->data));
-+          content_types = g_list_append (content_types, g_content_type_from_mime_type (mime_type));
-+          g_free (mime_type);
-         }
-     }
- 
-   /* determine the mime application to use */
--  mime_application = tap_backend_mime_application (mime_infos, window, error);
-+  mime_application = tap_backend_mime_application (content_types, window, error);
-   if (G_LIKELY (mime_application != NULL))
-     {
-       /* determine the wrapper script for the application */
-@@ -463,7 +461,8 @@
-     }
- 
-   /* cleanup */
--  thunar_vfs_mime_info_list_free (mime_infos);
-+  g_list_foreach (content_types, (GFunc) g_free, NULL);
-+  g_list_free (content_types);
- 
-   return pid;
- }
-@@ -493,24 +492,21 @@
-                             GtkWidget   *window,
-                             GError     **error)
- {
--  ThunarVfsMimeDatabase *mime_database;
--  GList                 *mime_infos = NULL;
-+  GList *content_types = 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));
-+  /* determine the content types for zip and tar files (all supported archives must be able to handle them) */
-+  content_types = g_list_append (content_types, g_content_type_from_mime_type ("application/x-compressed-tar"));
-+  content_types = g_list_append (content_types, g_content_type_from_mime_type ("application/x-tar"));
-+  content_types = g_list_append (content_types, g_content_type_from_mime_type ("application/x-zip"));
-+  content_types = g_list_append (content_types, g_content_type_from_mime_type ("application/zip"));
- 
-   /* run the action, the mime infos will be freed by the _run() method */
--  return tap_backend_run ("create", folder, files, mime_infos, window, error);
-+  return tap_backend_run ("create", folder, files, content_types, window, error);
- }
- 
- 
-diff -aur thunar-archive-plugin-0.2.4/thunar-archive-plugin/tap-provider.c thunar-archive-plugin-0.2.4.new//thunar-archive-plugin/tap-provider.c
---- thunar-archive-plugin-0.2.4/thunar-archive-plugin/tap-provider.c	2007-01-20 11:41:50.000000000 +0100
-+++ thunar-archive-plugin-0.2.4.new//thunar-archive-plugin/tap-provider.c	2010-11-28 17:31:36.000000000 +0100
-@@ -26,7 +26,7 @@
- #include <unistd.h>
- #endif
- 
--#include <thunar-vfs/thunar-vfs.h>
-+#include <libxfce4util/libxfce4util.h>
- 
- #include <thunar-archive-plugin/tap-backend.h>
- #include <thunar-archive-plugin/tap-provider.h>
-@@ -419,8 +419,7 @@
-                                GtkWidget           *window,
-                                GList               *files)
- {
--  ThunarVfsPathScheme scheme;
--  ThunarVfsInfo      *info;
-+  gchar              *scheme;
-   TapProvider        *tap_provider = TAP_PROVIDER (menu_provider);
-   GtkAction          *action;
-   GClosure           *closure;
-@@ -434,13 +433,15 @@
-   for (lp = files; lp != NULL; lp = lp->next, ++n_files)
-     {
-       /* check if the file is a local file */
--      info = thunarx_file_info_get_vfs_info (lp->data);
--      scheme = thunar_vfs_path_get_scheme (info->path);
--      thunar_vfs_info_unref (info);
-+      scheme = thunarx_file_info_get_uri_scheme (lp->data);
- 
-       /* unable to handle non-local files */
--      if (G_UNLIKELY (scheme != THUNAR_VFS_PATH_SCHEME_FILE))
--        return NULL;
-+      if (G_UNLIKELY (strcmp (scheme, "file")))
-+        {
-+          g_free (scheme);
-+          return NULL;
-+        }
-+      g_free (scheme);
- 
-       /* check if this file is a supported archive */
-       if (all_archives && !tap_is_archive (lp->data))
-@@ -547,8 +548,7 @@
-                               ThunarxFileInfo     *folder,
-                               GList               *files)
- {
--  ThunarVfsPathScheme scheme;
--  ThunarVfsInfo      *info;
-+  gchar              *scheme;
-   TapProvider        *tap_provider = TAP_PROVIDER (menu_provider);
-   GtkAction          *action;
-   GClosure           *closure;
-@@ -556,25 +556,29 @@
-   gint                n_files = 0;
- 
-   /* check if the folder is a local folder */
--  info = thunarx_file_info_get_vfs_info (folder);
--  scheme = thunar_vfs_path_get_scheme (info->path);
--  thunar_vfs_info_unref (info);
-+  scheme = thunarx_file_info_get_uri_scheme (folder);
- 
-   /* unable to extract to non-local folders */
--  if (G_UNLIKELY (scheme != THUNAR_VFS_PATH_SCHEME_FILE))
--    return NULL;
-+  if (G_UNLIKELY (strcmp (scheme, "file")))
-+    {
-+      g_free (scheme);
-+      return NULL;
-+    }
-+  g_free (scheme);
- 
-   /* check all supplied files */
-   for (lp = files; lp != NULL; lp = lp->next, ++n_files)
-     {
-       /* check if the file is a local file */
--      info = thunarx_file_info_get_vfs_info (lp->data);
--      scheme = thunar_vfs_path_get_scheme (info->path);
--      thunar_vfs_info_unref (info);
-+      scheme = thunarx_file_info_get_uri_scheme (lp->data);
- 
-       /* unable to handle non-local files */
--      if (G_UNLIKELY (scheme != THUNAR_VFS_PATH_SCHEME_FILE))
--        return NULL;
-+      if (G_UNLIKELY (strcmp (scheme, "file")))
-+        {
-+          g_free (scheme);
-+          return NULL;
-+        }
-+      g_free (scheme);
- 
-       /* check if this file is a supported archive */
-       if (G_LIKELY (!tap_is_archive (lp->data)))
-@@ -676,26 +680,26 @@
-                           gint     status,
-                           gpointer user_data)
- {
--  ThunarVfsMonitor  *monitor;
--  ThunarVfsPath     *path;
--  TapProvider       *tap_provider = TAP_PROVIDER (user_data);
-+  //TODO: ThunarVfsMonitor  *monitor;
-+  //TODO: ThunarVfsPath     *path;
-+  //TODO: TapProvider       *tap_provider = TAP_PROVIDER (user_data);
- 
-   GDK_THREADS_ENTER ();
- 
-   /* verify that we still have a valid child_watch_path */
--  if (G_LIKELY (tap_provider->child_watch_path != NULL))
-+  //TODO: if (G_LIKELY (tap_provider->child_watch_path != NULL))
-     {
-       /* determine the corresponding ThunarVfsPath */
--      path = thunar_vfs_path_new (tap_provider->child_watch_path, NULL);
--      if (G_LIKELY (path != NULL))
-+      //TODO: path = thunar_vfs_path_new (tap_provider->child_watch_path, NULL);
-+      //TODO: if (G_LIKELY (path != NULL))
-         {
-           /* schedule a changed notification on the path */
--          monitor = thunar_vfs_monitor_get_default ();
--          thunar_vfs_monitor_feed (monitor, THUNAR_VFS_MONITOR_EVENT_CHANGED, path);
--          g_object_unref (G_OBJECT (monitor));
-+          //TODO: monitor = thunar_vfs_monitor_get_default ();
-+          //TODO: thunar_vfs_monitor_feed (monitor, THUNAR_VFS_MONITOR_EVENT_CHANGED, path);
-+          //TODO: g_object_unref (G_OBJECT (monitor));
- 
-           /* release the ThunarVfsPath */
--          thunar_vfs_path_unref (path);
-+          //TODO: thunar_vfs_path_unref (path);
-         }
-     }
- 
-Only in thunar-archive-plugin-0.2.4.new//thunar-archive-plugin: tap-provider.c.orig



More information about the arch-commits mailing list