[Xfce4-commits] <squeeze:master> Fix compile-errors in libsqueeze

Stephan Arts noreply at xfce.org
Sat Aug 20 14:56:02 CEST 2011


Updating branch refs/heads/master
         to a47e5a11992aba2b2666456c989c626e8c9e4133 (commit)
       from ca03ff1638abf01e77ba9af1d250eaf158f85611 (commit)

commit a47e5a11992aba2b2666456c989c626e8c9e4133
Author: Stephan Arts <stephan at xfce.org>
Date:   Sat Aug 20 14:04:22 2011 +0200

    Fix compile-errors in libsqueeze

 libsqueeze/Makefile.am         |    3 +-
 libsqueeze/archive-command.c   |    2 +-
 libsqueeze/archive-iter-pool.c |   10 +++-
 libsqueeze/archive-iter.c      |   25 ++++++---
 libsqueeze/archive-tempfs.c    |    4 +-
 libsqueeze/archive.c           |  116 ++++++++++-----------------------------
 libsqueeze/archive.h           |    9 ++--
 libsqueeze/command-queue.c     |    5 ++-
 libsqueeze/internals.c         |   29 ++++-------
 libsqueeze/internals.h         |   10 +---
 libsqueeze/libsqueeze.c        |   28 ++++------
 libsqueeze/libsqueeze.h        |    5 +-
 libsqueeze/parser-context.c    |    5 ++-
 libsqueeze/parser.c            |    5 ++-
 libsqueeze/scanf-parser.c      |    5 ++-
 libsqueeze/slist.c             |    4 +-
 libsqueeze/support-factory.c   |    4 +-
 libsqueeze/support-reader.c    |    4 +-
 libsqueeze/support-template.c  |    5 ++-
 libsqueeze/support-template.h  |    2 +-
 20 files changed, 118 insertions(+), 162 deletions(-)

diff --git a/libsqueeze/Makefile.am b/libsqueeze/Makefile.am
index 5d86366..419501a 100644
--- a/libsqueeze/Makefile.am
+++ b/libsqueeze/Makefile.am
@@ -28,7 +28,8 @@ libsqueeze_1_la_CFLAGS = \
 	-DDATADIR=\"$(datadir)\" \
 	$(GLIB_CFLAGS)  \
 	$(DBUS_CFLAGS)  \
-	$(THUNAR_VFS_CFLAGS)
+	$(GIO_CFLAGS)   \
+    $(LIBXFCE4UTIL_CFLAGS)
 
 libsqueeze_1_la_LIBADD =
 
diff --git a/libsqueeze/archive-command.c b/libsqueeze/archive-command.c
index e753add..d12fb3e 100644
--- a/libsqueeze/archive-command.c
+++ b/libsqueeze/archive-command.c
@@ -22,7 +22,7 @@
 #include <signal.h>
 #include <sys/wait.h>
 #include <sys/types.h>
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
 
 #include "libsqueeze-archive.h"
 #include "libsqueeze-command.h"
diff --git a/libsqueeze/archive-iter-pool.c b/libsqueeze/archive-iter-pool.c
index 0200bf5..0dc6c99 100644
--- a/libsqueeze/archive-iter-pool.c
+++ b/libsqueeze/archive-iter-pool.c
@@ -18,12 +18,16 @@
 #include <string.h>
 #include <glib.h>
 #include <glib-object.h> 
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
+
 #include "libsqueeze.h"
 #include "libsqueeze-view.h"
 
 
 
+
 struct _LSQArchiveIterPool
 {
 	LSQArchiveIter **pool;
@@ -93,7 +97,9 @@ lsq_archive_iter_pool_find_iter(LSQArchiveIterPool *ipool, LSQArchiveEntry *entr
 	while(size)
 	{
 		pos = size / 2;
-		cmp = (gint)entry - (gint)pool[off+pos]->entry;
+        /* FIXME */
+		//cmp = entry - pool[off+pos]->entry;
+        cmp = 0;
 		if(cmp == 0)
 		{
 			if(ret_iter)
diff --git a/libsqueeze/archive-iter.c b/libsqueeze/archive-iter.c
index 41e6a08..abd95fa 100644
--- a/libsqueeze/archive-iter.c
+++ b/libsqueeze/archive-iter.c
@@ -18,7 +18,9 @@
 #include <string.h>
 #include <glib.h>
 #include <glib-object.h> 
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
 
 #include "libsqueeze.h"
 #include "libsqueeze-view.h"
@@ -85,7 +87,7 @@ lsq_archive_entry_set_propsva(const LSQArchive *, LSQArchiveEntry *, va_list);
 struct _LSQArchiveEntry
 {
 	gchar *filename;
-	ThunarVfsMimeInfo *mime_info;
+    gchar *content_type;
 	gpointer props;
 	LSQArchiveEntry **children;
 	LSQSList *buffer;
@@ -852,11 +854,12 @@ lsq_archive_entry_new(const gchar *filename)
 	if(pos)
 	{
 		entry->filename = g_strndup(filename, (gsize)(pos - filename));
-		entry->mime_info = thunar_vfs_mime_database_get_info(lsq_mime_database, LSQ_MIME_DIRECTORY);
+		/*entry->mime_info = thunar_vfs_mime_database_get_info(lsq_mime_database, LSQ_MIME_DIRECTORY);*/
 	}
 	else
 	{
 		entry->filename = g_strdup(filename);
+        /*
 		if(g_utf8_validate (filename, -1, NULL))
 		{
 			entry->mime_info = thunar_vfs_mime_database_get_info_for_name(lsq_mime_database, entry->filename);
@@ -867,6 +870,7 @@ lsq_archive_entry_new(const gchar *filename)
 			entry->mime_info = thunar_vfs_mime_database_get_info_for_name(lsq_mime_database, utf8_file);
 			g_free(utf8_file);
 		}
+        */
 	}
 
 	return entry;
@@ -970,8 +974,11 @@ lsq_archive_entry_free(const LSQArchive *archive, LSQArchiveEntry *entry)
 	lsq_archive_entry_props_free(archive, entry);
 
 	/* free the mime info */
-	if(entry->mime_info)
-		thunar_vfs_mime_info_unref(entry->mime_info);
+	if(entry->content_type)
+    {
+        g_free (entry->content_type);
+        entry->content_type = NULL;
+    }
 
 	/* free the entry */
 	g_free(entry->filename);
@@ -987,9 +994,7 @@ lsq_archive_entry_get_filename(const LSQArchiveEntry *entry)
 inline static const gchar *
 lsq_archive_entry_get_mimetype(const LSQArchiveEntry *entry)
 {
-	if(entry->mime_info)
-		return thunar_vfs_mime_info_get_name(entry->mime_info);
-	return NULL;
+	return entry->content_type;
 }
 
 inline static guint
@@ -1153,9 +1158,11 @@ lsq_archive_entry_add_child(LSQArchiveEntry *parent, const gchar *filename)
 
 	if(!mime || strcmp(mime, LSQ_MIME_DIRECTORY))
 	{
-		if(parent->mime_info)
+        /*
+		if(parent->content_type)
 			thunar_vfs_mime_info_unref(parent->mime_info);
 		parent->mime_info = thunar_vfs_mime_database_get_info(lsq_mime_database, LSQ_MIME_DIRECTORY);
+        */
 	}
 
 	parent->buffer = lsq_slist_insert_sorted_single(parent->buffer, child, (GCompareFunc)lsq_archive_entry_filename_compare);
diff --git a/libsqueeze/archive-tempfs.c b/libsqueeze/archive-tempfs.c
index 5429a60..2f33fb2 100644
--- a/libsqueeze/archive-tempfs.c
+++ b/libsqueeze/archive-tempfs.c
@@ -24,7 +24,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <errno.h>
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
 
 #include "libsqueeze.h"
 #include "archive-iter.h"
diff --git a/libsqueeze/archive.c b/libsqueeze/archive.c
index fcaa9f5..bae643a 100644
--- a/libsqueeze/archive.c
+++ b/libsqueeze/archive.c
@@ -22,7 +22,9 @@
 #include <signal.h>
 #include <sys/wait.h>
 #include <sys/types.h>
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
 
 #include "libsqueeze.h"
 #include "libsqueeze-view.h"
@@ -153,40 +155,30 @@ lsq_archive_finalize(GObject *object)
  *
  */
 LSQArchive *
-lsq_archive_new(gchar *path, const gchar *mime)
+lsq_archive_new (GFile *file)
 {
 	LSQArchive *archive;
-	gchar *base = NULL;
+    GFileInfo *file_info;
+    const gchar *content_type;
 
 	archive = g_object_new(lsq_archive_get_type(), NULL);
 
-	if(path)
+	if(file)
 	{
-		if(g_path_is_absolute(path))
-			archive->priv->path_info = thunar_vfs_path_new(path, NULL);
-		else
-			archive->priv->path_info = thunar_vfs_path_relative(lsq_relative_base_path, path);
+        archive->priv->file = file;
+        g_object_ref (archive->priv->file);
 	}
 	else
-		archive->priv->path_info = NULL;
+    {
+		archive->priv->file= NULL;
+    }
 
 
-	archive->priv->file_info = thunar_vfs_info_new_for_path(archive->priv->path_info, NULL);
-	if(archive->priv->file_info)
-	{
-		archive->priv->mime_info = archive->priv->file_info->mime_info;
-		thunar_vfs_mime_info_ref(archive->priv->mime_info);
-	}
-	else
+    file_info = g_file_query_info (file, "standard::content-type,standard::type", 0, NULL, NULL);
+	if(file_info)
 	{
-		if(mime)
-			archive->priv->mime_info = thunar_vfs_mime_database_get_info(lsq_mime_database, mime);
-		else
-		{
-			base = g_path_get_basename(path);
-			archive->priv->mime_info = thunar_vfs_mime_database_get_info_for_file(lsq_mime_database, path, base);
-			g_free(base);
-		}
+        content_type = g_file_info_get_attribute_string (file_info, "standard::content-type");
+        archive->priv->content_type = g_strdup (content_type); 
 	}
 #ifdef DEBUG
 	g_debug("mime: %s\n", thunar_vfs_mime_info_get_name(archive->priv->mime_info));
@@ -195,7 +187,7 @@ lsq_archive_new(gchar *path, const gchar *mime)
   GSList *iter;
   for(iter = lsq_mime_support_list; iter; iter = iter->next)
   {
-    if(((LSQSupportTemplate*)iter->data)->mime_info == archive->priv->mime_info)
+    if(0 == strcmp(((LSQSupportTemplate*)iter->data)->content_type, archive->priv->content_type))
     {
 #ifdef DEBUG
       g_debug("found template");
@@ -272,50 +264,10 @@ lsq_archive_get_entry_property_name(const LSQArchive *archive, guint n)
  *
  * Return value: filename string
  */
-const gchar *
-lsq_archive_get_filename(const LSQArchive *archive)
-{
-	return thunar_vfs_path_get_name(archive->priv->path_info);
-}
-
-/*
- * lsq_archive_get_path:
- * @archive: LSQArchive object
- *
- * Return value: newly allocated path string
- */
-gchar *
-lsq_archive_get_path(const LSQArchive *archive)
-{
-	return thunar_vfs_path_dup_string(archive->priv->path_info);
-}
-
-/*
- * lsq_archive_get_mimetype:
- *
- * @archive: LSQArchive object
- */
-const gchar *
-lsq_archive_get_mimetype(const LSQArchive *archive)
-{
-	return thunar_vfs_mime_info_get_name(archive->priv->mime_info);
-}
-
-/*
- * lsq_archive_exists:
- *
- * @archive: LSQArchive object
- */
-gboolean
-lsq_archive_exists(const LSQArchive *archive)
+GFile *
+lsq_archive_get_file (LSQArchive *archive)
 {
-	if(!archive->priv->file_info)
-		archive->priv->file_info = thunar_vfs_info_new_for_path(archive->priv->path_info, NULL);
-
-	if(archive->priv->file_info)
-		return TRUE;
-
-	return FALSE;
+	return archive->priv->file;
 }
 
 void
@@ -349,12 +301,16 @@ lsq_close_archive(LSQArchive *archive)
 {
 	lsq_opened_archive_list = g_slist_remove(lsq_opened_archive_list, archive);
 
-	if(archive->priv->path_info)
-		thunar_vfs_path_unref(archive->priv->path_info);
-	if(archive->priv->file_info)
-		thunar_vfs_info_unref(archive->priv->file_info);
-	if(archive->priv->mime_info)
-		thunar_vfs_mime_info_unref(archive->priv->mime_info);
+	if(archive->priv->file)
+    {
+		g_object_unref (archive->priv->file);
+        archive->priv->file = NULL;
+    }
+	if(archive->priv->content_type)
+    {
+		g_free (archive->priv->content_type);
+        archive->priv->content_type = NULL;
+    }
 
 	lsq_archive_stop(archive);
 	g_object_unref(archive);
@@ -384,18 +340,6 @@ lsq_archive_get_state(const LSQArchive *archive)
     return archive->priv->state;
 }
 
-/**
- * lsq_archive_get_path_info:
- * @archive: the archive
- *
- * Return value: the ThunarVfsPath information of the archive.
- */
-ThunarVfsPath *
-lsq_archive_get_path_info(LSQArchive *archive)
-{
-	return archive->priv->path_info;
-}
-
 LSQSupportType
 lsq_archive_get_support_mask(const LSQArchive *archive)
 {
diff --git a/libsqueeze/archive.h b/libsqueeze/archive.h
index da0e627..bb61f58 100644
--- a/libsqueeze/archive.h
+++ b/libsqueeze/archive.h
@@ -54,9 +54,8 @@ typedef struct _LSQArchivePrivate LSQArchivePrivate;
 
 struct _LSQArchivePrivate
 {
-	ThunarVfsPath	  *path_info;
-	ThunarVfsInfo	  *file_info;
-	ThunarVfsMimeInfo  *mime_info;
+    GFile *file;
+    gchar *content_type;
 
 	LSQSupportTemplate *s_template;
 
@@ -101,12 +100,12 @@ gboolean		lsq_archive_exists(const LSQArchive *archive);
 LSQSupportType  lsq_archive_get_support_mask(const LSQArchive *archive);
 
 
-LSQArchive		 *lsq_archive_new(gchar *, const gchar *) G_GNUC_INTERNAL;
+LSQArchive		 *lsq_archive_new(GFile *) G_GNUC_INTERNAL;
 void				lsq_archive_state_changed(const LSQArchive *archive) G_GNUC_INTERNAL;
 void				lsq_archive_add_children(GSList *files);
 gboolean			lsq_archive_remove_file(LSQArchive *, const gchar *);
 
-ThunarVfsPath	  *lsq_archive_get_path_info(LSQArchive *);
+GFile *lsq_archive_get_file(LSQArchive *);
 
 gboolean		lsq_archive_operate(LSQArchive *archive, LSQCommandType type, const gchar **, const gchar *);
 
diff --git a/libsqueeze/command-queue.c b/libsqueeze/command-queue.c
index ca39d4a..4772101 100644
--- a/libsqueeze/command-queue.c
+++ b/libsqueeze/command-queue.c
@@ -20,7 +20,10 @@
 #include <signal.h>
 #include <string.h>
 
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
+
 #include "libsqueeze.h"
 #include "archive-tempfs.h"
 #include "parser-context.h"
diff --git a/libsqueeze/internals.c b/libsqueeze/internals.c
index b4f1ee8..7aede37 100644
--- a/libsqueeze/internals.c
+++ b/libsqueeze/internals.c
@@ -18,7 +18,9 @@
 #include <stdlib.h>
 #include <glib.h>
 #include <glib-object.h>
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
 
 #include "libsqueeze.h"
 #include "support-template.h"
@@ -30,8 +32,6 @@
 
 #include "internals.h"
 
-#define __USE_GNU
-
 #include <unistd.h>
 #include <stdio.h>
 #include <string.h>
@@ -71,27 +71,18 @@ lsq_opened_archive_get_archive(gchar *path)
 
 
 static gint
-lsq_opened_archives_lookup_archive(gconstpointer open_archive, gconstpointer path)
+lsq_opened_archives_lookup_archive(gconstpointer open_archive, gconstpointer uri)
 {
 #ifdef DEBUG
 	g_return_val_if_fail(open_archive, 1);
 #endif
-	ThunarVfsPath *path_info = NULL;
-	if(g_path_is_absolute(path))
-		path_info = thunar_vfs_path_new(path, NULL);
-	else
-		path_info = thunar_vfs_path_relative(lsq_relative_base_path, path);
-
-	if(thunar_vfs_path_equal(lsq_archive_get_path_info(LSQ_ARCHIVE(open_archive)), path_info))
+    GFile *file = g_file_new_for_path (uri);
+    
+	if(g_file_is_equal (lsq_archive_get_file(LSQ_ARCHIVE(open_archive)), file))
 	{
-		if(path_info)
-			thunar_vfs_path_unref(path_info);
+        g_object_unref (file);
 		return 0;
 	}
-	else
-	{
-		if(path_info)
-			thunar_vfs_path_unref(path_info);
-		return 1;
-	}
+    g_object_unref (file);
+    return 1;
 }
diff --git a/libsqueeze/internals.h b/libsqueeze/internals.h
index ff7958c..52bb301 100644
--- a/libsqueeze/internals.h
+++ b/libsqueeze/internals.h
@@ -17,15 +17,7 @@
 GSList				 *support_factory_list;
 GSList				 *lsq_mime_support_list;
 GSList				 *lsq_opened_archive_list;
-ThunarVfsPath		  *lsq_relative_base_path;
-
-/*
- * gint
- * lsq_execute(gchar *command)
- *
- * general function for executing child-apps
- */
-ThunarVfsMimeDatabase  *lsq_mime_database;
+gchar                *lsq_relative_base_uri;
 
 gchar *
 lsq_concat_filenames(GSList *filenames);
diff --git a/libsqueeze/libsqueeze.c b/libsqueeze/libsqueeze.c
index 97e1b88..ce11392 100644
--- a/libsqueeze/libsqueeze.c
+++ b/libsqueeze/libsqueeze.c
@@ -20,7 +20,9 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 #include <glib-object.h>
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
 
 #include "libsqueeze.h"
 #include "support-factory.h"
@@ -36,13 +38,8 @@ lsq_init()
 	support_factory_list = NULL;
 
 	const gchar *filename = NULL;
-	gchar *current_dir = g_get_current_dir();
-
-	lsq_mime_database = thunar_vfs_mime_database_get_default();
 
-	lsq_relative_base_path = thunar_vfs_path_new(current_dir, NULL);
 	lsq_opened_archive_list = NULL;
-	g_free(current_dir);
 
 	gchar *data_squeeze = g_strconcat(DATADIR, "/squeeze", NULL);
 	GDir *data_dir = g_dir_open(data_squeeze, 0, NULL);
@@ -74,9 +71,6 @@ void
 lsq_shutdown()
 {
 	g_slist_foreach(lsq_opened_archive_list, (GFunc)lsq_close_archive, NULL);
-
-	g_object_unref(lsq_mime_database);
-	thunar_vfs_path_unref(lsq_relative_base_path);
 }
 
 /*
@@ -84,18 +78,20 @@ lsq_shutdown()
  *
  */
 gint
-lsq_new_archive(gchar *path, gboolean overwrite, gchar *mime, LSQArchive **lp_archive)
+lsq_new_archive(GFile *file, gboolean overwrite, LSQArchive **lp_archive)
 {
 	if(overwrite)
-		g_unlink(path);
+    {
+        g_file_unlink (file);
+    }
 
-	if(g_file_test(path, G_FILE_TEST_EXISTS))
+	if(g_file_exists(file, NULL))
 	{
 		(*lp_archive) = NULL;
 		return 1;
 	}
 
-	LSQArchive *archive = lsq_archive_new(path, mime);
+	LSQArchive *archive = lsq_archive_new(file);
 	(*lp_archive) = archive;
 	if(!archive)
 		return 1;
@@ -108,9 +104,9 @@ lsq_new_archive(gchar *path, gboolean overwrite, gchar *mime, LSQArchive **lp_ar
  *
  */
 gint
-lsq_open_archive(gchar *path, LSQArchive **lp_archive)
+lsq_open_archive(GFile *file, LSQArchive **lp_archive)
 {
-	if(!g_file_test(path, G_FILE_TEST_EXISTS))
+	if(!g_file_exists (file, NULL))
 	{
 		(*lp_archive) = NULL;
 		return 1;
@@ -119,7 +115,7 @@ lsq_open_archive(gchar *path, LSQArchive **lp_archive)
 	LSQArchive *archive = NULL; /*lsq_opened_archive_get_archive(path); */
 	if(!archive)
 	{
-		archive = lsq_archive_new(path, NULL);
+		archive = lsq_archive_new(file);
 		if(archive)
 			lsq_opened_archive_list = g_slist_prepend(lsq_opened_archive_list, archive);
 	}
diff --git a/libsqueeze/libsqueeze.h b/libsqueeze/libsqueeze.h
index 1824a0b..3b71bb5 100644
--- a/libsqueeze/libsqueeze.h
+++ b/libsqueeze/libsqueeze.h
@@ -50,9 +50,8 @@ void lsq_shutdown();
  * 0 -- success
  */
 gint
-lsq_new_archive( gchar *path,
+lsq_new_archive( GFile *,
 				 gboolean overwrite,
-				 gchar *mime,
 				 LSQArchive **lp_archive);
 
 /*
@@ -64,7 +63,7 @@ lsq_new_archive( gchar *path,
  * 0 -- success
  */
 gint
-lsq_open_archive( gchar *path, 
+lsq_open_archive( GFile *, 
 				  LSQArchive **lp_archive);
 
 /*
diff --git a/libsqueeze/parser-context.c b/libsqueeze/parser-context.c
index 844a5c1..286ca7d 100644
--- a/libsqueeze/parser-context.c
+++ b/libsqueeze/parser-context.c
@@ -19,7 +19,10 @@
 #include <glib-object.h> 
 #include <signal.h>
 
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
+
 #include "libsqueeze.h"
 
 #include "archive.h"
diff --git a/libsqueeze/parser.c b/libsqueeze/parser.c
index c2ce90e..420330b 100644
--- a/libsqueeze/parser.c
+++ b/libsqueeze/parser.c
@@ -19,7 +19,10 @@
 #include <glib-object.h> 
 #include <signal.h>
 
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
+
 #include "libsqueeze.h"
 
 #include "parser-context.h"
diff --git a/libsqueeze/scanf-parser.c b/libsqueeze/scanf-parser.c
index 05c9a3e..22496f5 100644
--- a/libsqueeze/scanf-parser.c
+++ b/libsqueeze/scanf-parser.c
@@ -20,7 +20,10 @@
 #include <glib/gstdio.h>
 #include <glib-object.h> 
 
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
+
 #include "libsqueeze.h"
 #include "archive-iter.h"
 #include "parser-context.h"
diff --git a/libsqueeze/slist.c b/libsqueeze/slist.c
index 6ade3ec..1f02db2 100644
--- a/libsqueeze/slist.c
+++ b/libsqueeze/slist.c
@@ -17,7 +17,9 @@
 #include <string.h>
 #include <glib.h>
 #include <glib-object.h>
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
 
 #include "libsqueeze.h"
 #include "support-factory.h"
diff --git a/libsqueeze/support-factory.c b/libsqueeze/support-factory.c
index b736bf7..1ae954a 100644
--- a/libsqueeze/support-factory.c
+++ b/libsqueeze/support-factory.c
@@ -22,7 +22,9 @@
 #include <signal.h>
 #include <sys/wait.h>
 #include <sys/types.h>
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
 
 #include "libsqueeze.h"
 #include "archive-iter.h"
diff --git a/libsqueeze/support-reader.c b/libsqueeze/support-reader.c
index 1e6b13a..841119f 100644
--- a/libsqueeze/support-reader.c
+++ b/libsqueeze/support-reader.c
@@ -22,7 +22,7 @@
 #include <signal.h>
 #include <sys/wait.h>
 #include <sys/types.h>
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
 #include <libxfce4util/libxfce4util.h>
 
 #include "libsqueeze.h"
@@ -210,7 +210,7 @@ lsq_support_reader_parse_file(const gchar *filename)
 		else
 			s_template->supported = FALSE;
 
-		s_template->mime_info = thunar_vfs_mime_database_get_info(lsq_mime_database, _mime_types[i]);
+		s_template->content_type = g_strdup (_mime_types[i]);
 		s_template->id = (const gchar *)factory->id;
 
         const gchar *new_str_queue = xfce_rc_read_entry(rc, "X-Squeeze-New", NULL);
diff --git a/libsqueeze/support-template.c b/libsqueeze/support-template.c
index 9eb6c25..71ee13f 100644
--- a/libsqueeze/support-template.c
+++ b/libsqueeze/support-template.c
@@ -19,7 +19,10 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 #include <glib-object.h> 
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
+
 #include "libsqueeze.h"
 #include "parser-context.h"
 #include "parser.h"
diff --git a/libsqueeze/support-template.h b/libsqueeze/support-template.h
index 8bf8e49..62493c8 100644
--- a/libsqueeze/support-template.h
+++ b/libsqueeze/support-template.h
@@ -46,9 +46,9 @@ typedef struct _LSQSupportTemplate LSQSupportTemplate;
 struct _LSQSupportTemplate
 {
 	const gchar *id;
-	ThunarVfsMimeInfo *mime_info;
 	gchar **required_apps;
 	gboolean supported;
+    gchar *content_type;
 
 	guint n_properties;
 	gchar **property_names;


More information about the Xfce4-commits mailing list