[Goodies-commits] r1821 - in thunar-archive-plugin/trunk: . thunar-archive-plugin

Benedikt Meurer benny at xfce.org
Mon Jul 31 15:45:08 CEST 2006


Author: benny
Date: 2006-07-31 13:45:07 +0000 (Mon, 31 Jul 2006)
New Revision: 1821

Modified:
   thunar-archive-plugin/trunk/ChangeLog
   thunar-archive-plugin/trunk/thunar-archive-plugin/tap-provider.c
Log:
2006-07-31	Benedikt Meurer <benny at xfce.org>

	* thunar-archive-plugin/tap-provider.c(tap_provider_get_file_actions):
	  Provide actions only for local files.




Modified: thunar-archive-plugin/trunk/ChangeLog
===================================================================
--- thunar-archive-plugin/trunk/ChangeLog	2006-07-31 06:47:34 UTC (rev 1820)
+++ thunar-archive-plugin/trunk/ChangeLog	2006-07-31 13:45:07 UTC (rev 1821)
@@ -1,3 +1,8 @@
+2006-07-31	Benedikt Meurer <benny at xfce.org>
+
+	* thunar-archive-plugin/tap-provider.c(tap_provider_get_file_actions):
+	  Provide actions only for local files.
+
 2006-07-04	Benedikt Meurer <benny at xfce.org>
 
 	* configure.in.in: Post-release version bump.

Modified: thunar-archive-plugin/trunk/thunar-archive-plugin/tap-provider.c
===================================================================
--- thunar-archive-plugin/trunk/thunar-archive-plugin/tap-provider.c	2006-07-31 06:47:34 UTC (rev 1820)
+++ thunar-archive-plugin/trunk/thunar-archive-plugin/tap-provider.c	2006-07-31 13:45:07 UTC (rev 1821)
@@ -380,14 +380,18 @@
                                GtkWidget           *window,
                                GList               *files)
 {
-  TapProvider *tap_provider = TAP_PROVIDER (menu_provider);
-  GtkAction   *action;
-  GClosure    *closure;
-  gboolean     all_archives = TRUE;
-  gboolean     can_write = TRUE;
-  GList       *actions = NULL;
-  GList       *lp;
-  gint         n_files = 0;
+#if THUNAR_VFS_CHECK_VERSION(0,3,3)
+  ThunarVfsPathScheme scheme;
+  ThunarVfsInfo      *info;
+#endif
+  TapProvider        *tap_provider = TAP_PROVIDER (menu_provider);
+  GtkAction          *action;
+  GClosure           *closure;
+  gboolean            all_archives = TRUE;
+  gboolean            can_write = TRUE;
+  GList              *actions = NULL;
+  GList              *lp;
+  gint                n_files = 0;
 
   /* verify that atleast one file is given */
   if (G_UNLIKELY (files == NULL))
@@ -396,6 +400,17 @@
   /* check all supplied files */
   for (lp = files; lp != NULL; lp = lp->next, ++n_files)
     {
+#if THUNAR_VFS_CHECK_VERSION(0,3,3)
+      /* 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);
+
+      /* unable to handle non-local files */
+      if (G_UNLIKELY (scheme != THUNAR_VFS_PATH_SCHEME_FILE))
+        return NULL;
+#endif
+
       /* check if this file is a supported archive */
       if (all_archives && !tap_is_archive (lp->data))
         all_archives = FALSE;




More information about the Goodies-commits mailing list