[Xfce4-commits] r25937 - in squeeze/trunk: libsqueeze src

Stephan Arts stephan at xfce.org
Sat Jul 28 15:10:25 CEST 2007


Author: stephan
Date: 2007-07-28 13:10:25 +0000 (Sat, 28 Jul 2007)
New Revision: 25937

Added:
   squeeze/trunk/libsqueeze/archive-iter-pool.c
   squeeze/trunk/libsqueeze/archive-iter-pool.h
   squeeze/trunk/libsqueeze/support-template.c
   squeeze/trunk/libsqueeze/support-template.h
Removed:
   squeeze/trunk/libsqueeze/libsqueeze-archive.h
   squeeze/trunk/libsqueeze/libsqueeze-command.h
   squeeze/trunk/libsqueeze/libsqueeze-mime-support.h
   squeeze/trunk/libsqueeze/mime-support.c
   squeeze/trunk/libsqueeze/mime-support.h
Modified:
   squeeze/trunk/libsqueeze/Makefile.am
   squeeze/trunk/libsqueeze/archive-iter.c
   squeeze/trunk/libsqueeze/archive-iter.h
   squeeze/trunk/libsqueeze/archive-tempfs.c
   squeeze/trunk/libsqueeze/archive.c
   squeeze/trunk/libsqueeze/archive.h
   squeeze/trunk/libsqueeze/internals.c
   squeeze/trunk/libsqueeze/libsqueeze.c
   squeeze/trunk/libsqueeze/libsqueeze.h
   squeeze/trunk/libsqueeze/slist.c
   squeeze/trunk/libsqueeze/support-factory.c
   squeeze/trunk/libsqueeze/support-factory.h
   squeeze/trunk/libsqueeze/support-reader.c
   squeeze/trunk/src/application.c
   squeeze/trunk/src/main_window.c
   squeeze/trunk/src/new_dialog.c
Log:
moved some code around

Modified: squeeze/trunk/libsqueeze/Makefile.am
===================================================================
--- squeeze/trunk/libsqueeze/Makefile.am	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/Makefile.am	2007-07-28 13:10:25 UTC (rev 25937)
@@ -3,15 +3,11 @@
 libsqueeze_1_la_SOURCES =  \
 	internals.c internals.h \
 	libsqueeze.c libsqueeze.h \
-	libsqueeze-archive.h \
-	libsqueeze-view.h \
-	libsqueeze-command.h \
-	libsqueeze-module.h \
-	libsqueeze-mime-support.h \
 	slist.c slist.h \
-	mime-support.c mime-support.h \
+	support-template.c support-template.h \
 	archive.c archive.h \
 	archive-iter.c archive-iter.h \
+	archive-iter-pool.c archive-iter-pool.h \
 	archive-tempfs.c archive-tempfs.h \
 	support-factory.c support-factory.h \
 	support-reader.c support-reader.h

Added: squeeze/trunk/libsqueeze/archive-iter-pool.c
===================================================================
--- squeeze/trunk/libsqueeze/archive-iter-pool.c	                        (rev 0)
+++ squeeze/trunk/libsqueeze/archive-iter-pool.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -0,0 +1,202 @@
+/*
+ *  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 Library 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.
+ */
+
+#include <config.h>
+#include <string.h>
+#include <glib.h>
+#include <glib-object.h> 
+#include <thunar-vfs/thunar-vfs.h>
+#include "libsqueeze.h"
+#include "libsqueeze-view.h"
+
+
+
+struct _LSQArchiveIterPool
+{
+	LSQArchiveIter **pool;
+	guint size;
+	guint reserved;
+};
+
+LSQArchiveIterPool *
+lsq_archive_iter_pool_new()
+{
+    return g_new0(LSQArchiveIterPool, 1);
+}
+
+void
+lsq_archive_iter_pool_free(LSQArchiveIterPool *pool)
+{
+	/* lsq_archive_iter_pool_print();*/
+	/* free the pool of iters */
+	guint i;
+	for(i = 0; i < pool->size; ++i)
+	{
+		lsq_archive_iter_unref(pool->pool[i]);
+	}
+	for(i = 0; i < pool->size; ++i)
+	{
+#ifdef USE_LSQITER_SLICES
+		/* Cleaning up the whole pool */
+		/* Now we can free the iters  */
+#ifdef USE_GSLICES
+		g_slice_free(LSQArchiveIter, pool->pool[i]);
+#else
+		g_free(pool->pool[i]);
+#endif
+#elif USE_GSLICES
+		g_slice_free(LSQArchiveIter, pool->pool[i]);
+#else
+		g_free(pool->pool[i]);
+#endif
+	}
+#ifdef USE_LSQITER_SLICES
+	for(; i < pool->reserved; ++i)
+	{
+		/* Cleaning up the whole pool */
+		/* Now we can free the iters  */
+		if(!pool->pool[i])
+			break;
+#ifdef USE_GSLICES
+		g_slice_free(LSQArchiveIter, pool->pool[i]);
+#else
+		g_free(pool->pool[i]);
+#endif
+	}
+#endif
+	g_free(pool->pool);
+	g_free(pool);
+}
+
+gboolean
+lsq_archive_iter_pool_find_iter(LSQArchiveIterPool *ipool, LSQArchiveEntry *entry, LSQArchiveIter **ret_iter, guint *ret_pos)
+{
+	/* binary search */
+	LSQArchiveIter **pool = ipool->pool;
+	guint size = ipool->size;
+	guint pos;
+	guint off = 0;
+	gint cmp;
+	while(size)
+	{
+		pos = size / 2;
+		cmp = (gint)entry - (gint)pool[off+pos]->entry;
+		if(cmp == 0)
+		{
+			if(ret_iter)
+				(*ret_iter) = pool[off+pos];
+			if(ret_pos)
+				(*ret_pos) = off+pos;
+			return TRUE;
+		}
+		if(cmp > 0)
+		{
+			size -= ++pos;
+			off += pos;
+		}
+		if(cmp < 0)
+		{
+			size = pos;
+		}
+	}
+	if(ret_pos)
+		(*ret_pos) = off;
+	return FALSE;
+}
+
+void
+lsq_archive_iter_pool_insert_iter(LSQArchiveIterPool *ipool, LSQArchiveIter *iter, guint pos)
+{
+	LSQArchiveIter **pool, **old_pool = pool = ipool->pool;
+	guint i;
+
+	/* make space for new iter */
+	if(ipool->size >= ipool->reserved)
+	{
+		pool = g_new(LSQArchiveIter*, ipool->reserved + ipool->size + 1);
+		for(i = 0; i < pos; ++i)
+		{
+			pool[i] = old_pool[i];
+		}
+	}
+
+	/* move all behind the iter */
+	for(i = ipool->size; i > pos; --i)
+	{
+		pool[i] = old_pool[i-1];
+	}
+
+	/* finish up the new pool */
+	ipool->size++;
+	if(ipool->size > ipool->reserved)
+	{
+		ipool->reserved += ipool->size;
+		ipool->pool = pool;
+		g_free(old_pool);
+#ifdef USE_LSQITER_SLICES
+		/* We need to know if there are still allocations left */
+		/* Make all unallocated NULL                           */
+		for(i = ipool->size; i < ipool->reserved; ++i)
+		{
+			pool[i] = NULL;
+		}
+#endif
+	}
+
+	/* insert the iter */
+	pool[pos] = iter;
+}
+
+void
+lsq_archive_iter_pool_remove_iter(LSQArchiveIterPool *ipool, LSQArchiveIter *iter)
+{
+	LSQArchiveIter **pool = ipool->pool;
+	guint pos;
+
+	/* iter has been found (should allways) */
+	if(G_LIKELY(lsq_archive_iter_pool_find_iter(ipool, iter->entry, NULL, &pos)))
+	{
+		ipool->size--;
+
+		for(; pos < ipool->size; ++pos)
+		{
+			pool[pos] = pool[pos+1];
+		}
+#ifdef USE_LSQITER_SLICES
+		/* We don't free the pointer so move it */
+		/* Place it at the end om the pool      */
+		pool[ipool->size] = iter;
+#endif
+	}
+}
+
+gint
+lsq_archive_iter_pool_get_size(LSQArchiveIterPool *pool)
+{
+    return pool->size;
+}
+
+gint
+lsq_archive_iter_pool_get_reserved(LSQArchiveIterPool *pool)
+{
+    return pool->reserved;
+}
+
+LSQArchiveIter *
+lsq_archive_iter_pool_get_iter(LSQArchiveIterPool *pool, gint index)
+{
+    return pool->pool[index];
+}

Added: squeeze/trunk/libsqueeze/archive-iter-pool.h
===================================================================
--- squeeze/trunk/libsqueeze/archive-iter-pool.h	                        (rev 0)
+++ squeeze/trunk/libsqueeze/archive-iter-pool.h	2007-07-28 13:10:25 UTC (rev 25937)
@@ -0,0 +1,60 @@
+/*
+ *  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 Library 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.  
+ */
+
+#ifndef __ARCHIVE_ITER_POOL_H__
+#define __ARCHIVE_ITER_POOL_H__ 
+G_BEGIN_DECLS
+
+#define LSQ_TYPE_ARCHIVE lsq_archive_get_type()
+
+#define LSQ_ARCHIVE(obj)         ( \
+		G_TYPE_CHECK_INSTANCE_CAST ((obj),    \
+			LSQ_TYPE_ARCHIVE,      \
+			LSQArchive))
+
+#define LSQ_IS_ARCHIVE(obj)      ( \
+		G_TYPE_CHECK_INSTANCE_TYPE ((obj),    \
+			LSQ_TYPE_ARCHIVE))
+
+#define LSQ_ARCHIVE_CLASS(class) ( \
+		G_TYPE_CHECK_CLASS_CAST ((class),     \
+			LSQ_TYPE_ARCHIVE,      \
+			LSQArchiveClass))
+
+#define LSQ_IS_ARCHIVE_CLASS(class) ( \
+		G_TYPE_CHECK_CLASS_TYPE ((class),        \
+			LSQ_TYPE_ARCHIVE))
+
+typedef struct _LSQArchiveIter LSQArchiveIter;
+typedef struct _LSQArchiveEntry LSQArchiveEntry;
+typedef struct _LSQArchiveIterPool LSQArchiveIterPool;
+
+LSQArchiveIterPool *lsq_archive_iter_pool_new();
+void                lsq_archive_iter_pool_free(LSQArchiveIterPool *pool);
+
+gint                lsq_archive_iter_pool_get_size(LSQArchiveIterPool *);
+gint                lsq_archive_iter_pool_get_reserved(LSQArchiveIterPool *);
+LSQArchiveIter     *lsq_archive_iter_pool_get_iter(LSQArchiveIterPool *, gint index);
+
+gboolean
+lsq_archive_iter_pool_find_iter(LSQArchiveIterPool *ipool, LSQArchiveEntry *entry, LSQArchiveIter **ret_iter, guint *ret_pos);
+void
+lsq_archive_iter_pool_insert_iter(LSQArchiveIterPool *ipool, LSQArchiveIter *iter, guint pos);
+void
+lsq_archive_iter_pool_remove_iter(LSQArchiveIterPool *ipool, LSQArchiveIter *iter);
+
+G_END_DECLS
+
+#endif /* __ARCHIVE_H__ */

Modified: squeeze/trunk/libsqueeze/archive-iter.c
===================================================================
--- squeeze/trunk/libsqueeze/archive-iter.c	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/archive-iter.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -21,13 +21,8 @@
 #include <thunar-vfs/thunar-vfs.h>
 
 #include "libsqueeze.h"
-#include "libsqueeze-archive.h"
 #include "libsqueeze-view.h"
-#include "libsqueeze-command.h"
-#include "archive-iter.h"
-#include "archive-command.h"
 #include "support-factory.h"
-#include "archive.h"
 #include "slist.h"
 
 #include "internals.h"
@@ -96,28 +91,7 @@
 	LSQSList *buffer;
 };
 
-struct _LSQArchiveIter
-{
-	LSQArchive *archive;
-	LSQArchiveEntry *entry;
-	LSQArchiveIter *parent;
-	guint ref_count;
-};
 
-/****************************
- * LSQArchiveIterPool stuff *
- ****************************/
-
-inline static void
-lsq_archive_iter_pool_free(LSQArchiveIterPool *pool);
-
-struct _LSQArchiveIterPool
-{
-	LSQArchiveIter **pool;
-	guint size;
-	guint reserved;
-};
-
 /**************
  * Init stuff *
  **************/
@@ -126,7 +100,7 @@
 void
 lsq_archive_init_iter(LSQArchive *archive)
 {
-	pool = archive->pool = g_new0(LSQArchiveIterPool, 1);
+	pool = archive->pool = lsq_archive_iter_pool_new();
 	archive->root_entry = g_new0(LSQArchiveEntry, 1);
 }
 
@@ -137,175 +111,6 @@
 	lsq_archive_entry_free(archive, archive->root_entry);
 }
 
-/****************************
- * LSQArchiveIterPool stuff *
- ****************************/
-
-void lsq_archive_iter_pool_print()
-{
-	guint i;
-	for(i = 0; i < pool->size; ++i)
-	{
-		if(pool->pool[i]->parent)
-			printf("%d %d %p %s\t%p %s\n", i, pool->pool[i]->ref_count, pool->pool[i]->entry, pool->pool[i]->entry?pool->pool[i]->entry->filename:"(no entry)", pool->pool[i]->parent->entry, pool->pool[i]->parent->entry?pool->pool[i]->parent->entry->filename:"(no parent)");
-		else
-			printf("%d %d %p %s\t(no parent)\n", i, pool->pool[i]->ref_count, pool->pool[i]->entry, pool->pool[i]->entry?pool->pool[i]->entry->filename:"(no entry)");
-	}
-#ifdef USE_LSQITER_SLICES
-	for(; i < pool->reserved; ++i)
-	{
-		printf("%d %p\n", i, pool->pool[i]);
-	}
-#endif
-}
-
-inline static void
-lsq_archive_iter_pool_free(LSQArchiveIterPool *pool)
-{
-	lsq_archive_iter_pool_print();
-	/* free the pool of iters */
-	guint i;
-	for(i = 0; i < pool->size; ++i)
-	{
-		if(!lsq_archive_iter_is_real(pool->pool[i]))
-			lsq_archive_entry_free(pool->pool[i]->archive, pool->pool[i]->entry);
-	}
-	for(i = 0; i < pool->size; ++i)
-	{
-#ifdef USE_LSQITER_SLICES
-		/* Cleaning up the whole pool */
-		/* Now we can free the iters  */
-#ifdef USE_GSLICES
-		g_slice_free(LSQArchiveIter, pool->pool[i]);
-#else
-		g_free(pool->pool[i]);
-#endif
-#elif USE_GSLICES
-		g_slice_free(LSQArchiveIter, pool->pool[i]);
-#else
-		g_free(pool->pool[i]);
-#endif
-	}
-#ifdef USE_LSQITER_SLICES
-	for(; i < pool->reserved; ++i)
-	{
-		/* Cleaning up the whole pool */
-		/* Now we can free the iters  */
-		if(!pool->pool[i])
-			break;
-#ifdef USE_GSLICES
-		g_slice_free(LSQArchiveIter, pool->pool[i]);
-#else
-		g_free(pool->pool[i]);
-#endif
-	}
-#endif
-	g_free(pool->pool);
-	g_free(pool);
-}
-
-static gboolean
-lsq_archive_iter_pool_find_iter(LSQArchiveIterPool *ipool, LSQArchiveEntry *entry, LSQArchiveIter **ret_iter, guint *ret_pos)
-{
-	/* binary search */
-	LSQArchiveIter **pool = ipool->pool;
-	guint size = ipool->size;
-	guint pos;
-	guint off = 0;
-	gint cmp;
-	while(size)
-	{
-		pos = size / 2;
-		cmp = (gint)entry - (gint)pool[off+pos]->entry;
-		if(cmp == 0)
-		{
-			if(ret_iter)
-				(*ret_iter) = pool[off+pos];
-			if(ret_pos)
-				(*ret_pos) = off+pos;
-			return TRUE;
-		}
-		if(cmp > 0)
-		{
-			size -= ++pos;
-			off += pos;
-		}
-		if(cmp < 0)
-		{
-			size = pos;
-		}
-	}
-	if(ret_pos)
-		(*ret_pos) = off;
-	return FALSE;
-}
-
-static void
-lsq_archive_iter_pool_insert_iter(LSQArchiveIterPool *ipool, LSQArchiveIter *iter, guint pos)
-{
-	LSQArchiveIter **pool, **old_pool = pool = ipool->pool;
-	guint i;
-
-	/* make space for new iter */
-	if(ipool->size >= ipool->reserved)
-	{
-		pool = g_new(LSQArchiveIter*, ipool->reserved + ipool->size + 1);
-		for(i = 0; i < pos; ++i)
-		{
-			pool[i] = old_pool[i];
-		}
-	}
-
-	/* move all behind the iter */
-	for(i = ipool->size; i > pos; --i)
-	{
-		pool[i] = old_pool[i-1];
-	}
-
-	/* finish up the new pool */
-	ipool->size++;
-	if(ipool->size > ipool->reserved)
-	{
-		ipool->reserved += ipool->size;
-		ipool->pool = pool;
-		g_free(old_pool);
-#ifdef USE_LSQITER_SLICES
-		/* We need to know if there are still allocations left */
-		/* Make all unallocated NULL                           */
-		for(i = ipool->size; i < ipool->reserved; ++i)
-		{
-			pool[i] = NULL;
-		}
-#endif
-	}
-
-	/* insert the iter */
-	pool[pos] = iter;
-}
-
-static void
-lsq_archive_iter_pool_remove_iter(LSQArchiveIterPool *ipool, LSQArchiveIter *iter)
-{
-	LSQArchiveIter **pool = ipool->pool;
-	guint pos;
-
-	/* iter has been found (should allways) */
-	if(G_LIKELY(lsq_archive_iter_pool_find_iter(ipool, iter->entry, NULL, &pos)))
-	{
-		ipool->size--;
-
-		for(; pos < ipool->size; ++pos)
-		{
-			pool[pos] = pool[pos+1];
-		}
-#ifdef USE_LSQITER_SLICES
-		/* We don't free the pointer so move it */
-		/* Place it at the end om the pool      */
-		pool[ipool->size] = iter;
-#endif
-	}
-}
-
 /************************
  * LSQArchiveIter stuff *
  ************************/
@@ -317,7 +122,8 @@
 	LSQArchiveIter *iter;
 #ifdef USE_LSQITER_SLICES
 	/* Lets see if there is an iter we can use */
-	if(archive->pool->size >= archive->pool->reserved || !(iter = archive->pool->pool[archive->pool->size]))
+	if(lsq_archive_iter_pool_get_size(archive->pool) >= lsq_archive_iter_pool_get_reserved(archive->pool) || 
+       !(iter = lsq_archive_iter_pool_get_iter(archive->pool, lsq_archive_iter_pool_get_size(archive->pool))))
 	{
 		/* No iter found, make a new one */
 #ifdef USE_GSLICES

Modified: squeeze/trunk/libsqueeze/archive-iter.h
===================================================================
--- squeeze/trunk/libsqueeze/archive-iter.h	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/archive-iter.h	2007-07-28 13:10:25 UTC (rev 25937)
@@ -1,4 +1,5 @@
 /*
+ *
  *  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
@@ -17,15 +18,34 @@
 #define __LIBSQUEEZE_ARCHIVE_ITER_H__ 
 G_BEGIN_DECLS
 
-typedef struct _LSQArchiveIterPool LSQArchiveIterPool;
 
+struct _LSQArchiveIter
+{
+	LSQArchive *archive;
+	LSQArchiveEntry *entry;
+	LSQArchiveIter *parent;
+	guint ref_count;
+};
+
 void     lsq_archive_init_iter(LSQArchive *);
 void     lsq_archive_free_iter(LSQArchive *);
 
-gboolean lsq_archive_remove_file(LSQArchive *, const gchar *);
 
 void     lsq_archive_iter_remove(LSQArchiveIter *, gboolean);
 
+#ifdef DEBUG
+LSQArchiveIter *_lsq_archive_iter_ref(LSQArchiveIter *iter, const gchar*, int);
+void            _lsq_archive_iter_unref(LSQArchiveIter *iter, const gchar*, int);
+/*
+#define lsq_archive_iter_ref(iter) _lsq_archive_iter_ref(iter, __FILE__, __LINE__)
+#define lsq_archive_iter_unref(iter) _lsq_archive_iter_unref(iter, __FILE__, __LINE__)
+*/
+#endif
+
+LSQArchiveIter *lsq_archive_iter_ref(LSQArchiveIter *iter);
+void            lsq_archive_iter_unref(LSQArchiveIter *iter);
+
+
 G_END_DECLS
 
 #endif /* __LIBSQUEEZE_ARCHIVE_ITER_H__ */

Modified: squeeze/trunk/libsqueeze/archive-tempfs.c
===================================================================
--- squeeze/trunk/libsqueeze/archive-tempfs.c	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/archive-tempfs.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -27,7 +27,6 @@
 #include <thunar-vfs/thunar-vfs.h>
 
 #include "libsqueeze.h"
-#include "libsqueeze-archive.h"
 #include "archive-iter.h"
 #include "support-factory.h"
 #include "archive.h"

Modified: squeeze/trunk/libsqueeze/archive.c
===================================================================
--- squeeze/trunk/libsqueeze/archive.c	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/archive.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -25,13 +25,13 @@
 #include <thunar-vfs/thunar-vfs.h>
 
 #include "libsqueeze.h"
-#include "archive-iter.h"
+#include "libsqueeze-view.h"
+#include "support-template.h"
 #include "support-factory.h"
-#include "archive.h"
+
 #include "slist.h"
 #include "archive-tempfs.h"
 
-#include "mime-support.h"
 
 #include "internals.h"
 
@@ -43,11 +43,6 @@
 #define LSQ_MIME_DIRECTORY "inode/directory"
 #endif
 
-struct _LSQArchiveClass
-{
-	GObjectClass parent;
-};
-
 static void
 lsq_archive_class_init(LSQArchiveClass *archive_class);
 
@@ -158,34 +153,33 @@
 	if(path)
 	{
 		if(g_path_is_absolute(path))
-			archive->path_info = thunar_vfs_path_new(path, NULL);
+			archive->priv->path_info = thunar_vfs_path_new(path, NULL);
 		else
-			archive->path_info = thunar_vfs_path_relative(lsq_relative_base_path, path);
-		archive->path = thunar_vfs_path_dup_string(archive->path_info);
+			archive->priv->path_info = thunar_vfs_path_relative(lsq_relative_base_path, path);
 	}
 	else
-		archive->path_info = NULL;
+		archive->priv->path_info = NULL;
 
 
-	archive->file_info = thunar_vfs_info_new_for_path(archive->path_info, NULL);
-	if(archive->file_info)
+	archive->priv->file_info = thunar_vfs_info_new_for_path(archive->priv->path_info, NULL);
+	if(archive->priv->file_info)
 	{
-		archive->mime_info = archive->file_info->mime_info;
-		thunar_vfs_mime_info_ref(archive->mime_info);
+		archive->priv->mime_info = archive->priv->file_info->mime_info;
+		thunar_vfs_mime_info_ref(archive->priv->mime_info);
 	}
 	else
 	{
 		if(mime)
-			archive->mime_info = thunar_vfs_mime_database_get_info(lsq_mime_database, mime);
+			archive->priv->mime_info = thunar_vfs_mime_database_get_info(lsq_mime_database, mime);
 		else
 		{
 			base = g_path_get_basename(path);
-			archive->mime_info = thunar_vfs_mime_database_get_info_for_file(lsq_mime_database, path, base);
+			archive->priv->mime_info = thunar_vfs_mime_database_get_info_for_file(lsq_mime_database, path, base);
 			g_free(base);
 		}
 	}
 #ifdef DEBUG
-	g_debug("%s\n", thunar_vfs_mime_info_get_name(archive->mime_info));
+	g_debug("%s\n", thunar_vfs_mime_info_get_name(archive->priv->mime_info));
 #endif
 
 	return archive;
@@ -251,24 +245,26 @@
 
 /*
  * lsq_archive_get_filename:
+ * @archive: LSQArchive object
  *
- * @archive: LSQArchive object
+ * Return value: filename string
  */
-gchar *
+const gchar *
 lsq_archive_get_filename(const LSQArchive *archive)
 {
-	return g_path_get_basename(archive->path);
+	return thunar_vfs_path_get_name(archive->priv->path_info);
 }
 
 /*
  * lsq_archive_get_path:
+ * @archive: LSQArchive object
  *
- * @archive: LSQArchive object
+ * Return value: newly allocated path string
  */
-const gchar *
+gchar *
 lsq_archive_get_path(const LSQArchive *archive)
 {
-	return archive->path;
+	return thunar_vfs_path_dup_string(archive->priv->path_info);
 }
 
 /*
@@ -279,7 +275,7 @@
 const gchar *
 lsq_archive_get_mimetype(const LSQArchive *archive)
 {
-	return thunar_vfs_mime_info_get_name(archive->mime_info);
+	return thunar_vfs_mime_info_get_name(archive->priv->mime_info);
 }
 
 /*
@@ -290,15 +286,11 @@
 gboolean
 lsq_archive_exists(const LSQArchive *archive)
 {
-	if(archive->file_info)
+	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;
-	
-	if(g_file_test(archive->path, G_FILE_TEST_EXISTS))
-	{
-		if(!g_file_test(archive->path, G_FILE_TEST_IS_DIR))
-			return TRUE;
-			/* TODO: should file_info be created */
-	}
 
 	return FALSE;
 }
@@ -333,33 +325,18 @@
 {
 	lsq_opened_archive_list = g_slist_remove(lsq_opened_archive_list, archive);
 
-	if(archive->path)
-		g_free(archive->path);
-	if(archive->path_info)
-		thunar_vfs_path_unref(archive->path_info);
-	if(archive->file_info)
-		thunar_vfs_info_unref(archive->file_info);
-	if(archive->mime_info)
-		thunar_vfs_mime_info_unref(archive->mime_info);
+	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);
 
 	lsq_archive_stop(archive);
 	g_object_unref(archive);
 }
 
 gboolean
-lsq_archive_operate(LSQArchive *archive, LSQCommandType type, const gchar *dest_path, GSList *files, GError **error)
-{
-	return FALSE;
-}
-
-
-LSQSupportType
-lsq_archive_get_support_mask(const LSQArchive *archive)
-{
-	return archive->support->support_mask;
-}
-
-gboolean
 lsq_archive_can_stop(const LSQArchive *archive)
 {
 	return FALSE;
@@ -376,3 +353,27 @@
 {
 	return NULL;
 }
+
+/**
+ * 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)
+{
+    return archive->priv->s_template->support_mask;
+}
+
+gboolean
+lsq_archive_operate(LSQArchive *archive, LSQCommandType type)
+{
+    return FALSE;
+}

Modified: squeeze/trunk/libsqueeze/archive.h
===================================================================
--- squeeze/trunk/libsqueeze/archive.h	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/archive.h	2007-07-28 13:10:25 UTC (rev 25937)
@@ -17,33 +17,94 @@
 #define __ARCHIVE_H__ 
 G_BEGIN_DECLS
 
-typedef struct _LSQArchiveEntry LSQArchiveEntry;
+#define LSQ_TYPE_ARCHIVE lsq_archive_get_type()
 
-struct _LSQArchive
+#define LSQ_ARCHIVE(obj)         ( \
+		G_TYPE_CHECK_INSTANCE_CAST ((obj),    \
+			LSQ_TYPE_ARCHIVE,      \
+			LSQArchive))
+
+#define LSQ_IS_ARCHIVE(obj)      ( \
+		G_TYPE_CHECK_INSTANCE_TYPE ((obj),    \
+			LSQ_TYPE_ARCHIVE))
+
+#define LSQ_ARCHIVE_CLASS(class) ( \
+		G_TYPE_CHECK_CLASS_CAST ((class),     \
+			LSQ_TYPE_ARCHIVE,      \
+			LSQArchiveClass))
+
+#define LSQ_IS_ARCHIVE_CLASS(class) ( \
+		G_TYPE_CHECK_CLASS_TYPE ((class),        \
+			LSQ_TYPE_ARCHIVE))
+
+enum
 {
-	GObject parent;
-	gchar              *path;
+	LSQ_ARCHIVE_PROP_FILENAME = 0,
+	LSQ_ARCHIVE_PROP_MIME_TYPE,
+	LSQ_ARCHIVE_PROP_USER
+};
+
+typedef struct _LSQArchivePrivate LSQArchivePrivate;
+
+struct _LSQArchivePrivate
+{
 	ThunarVfsPath      *path_info;
 	ThunarVfsInfo      *file_info;
 	ThunarVfsMimeInfo  *mime_info;
+
+	LSQSupportTemplate *s_template;
+
+};
+
+
+typedef struct _LSQArchive LSQArchive;
+
+struct _LSQArchive
+{
+	GObject parent;
+    LSQArchivePrivate  *priv;
 	LSQArchiveEntry    *root_entry;
-	LSQMimeSupport     *support;
+	LSQArchiveIterPool *pool;
+	gchar *temp_dir;
+	GSList *monitor_list;
 	struct {
 		guint64 archive_size;
 		guint64 content_size;
 		guint64 n_files;
 		guint64 n_directories;
 	} props;
-	gchar *temp_dir;
-	GSList *monitor_list;
-	LSQArchiveIterPool *pool;
 };
 
+
+typedef struct _LSQArchiveClass LSQArchiveClass;
+
+struct _LSQArchiveClass
+{
+	GObjectClass parent;
+};
+
+
+GType           lsq_archive_get_type(void);
+
+gchar          *lsq_archive_get_path(const LSQArchive *archive);
+const gchar    *lsq_archive_get_filename(const LSQArchive *archive);
+const gchar    *lsq_archive_get_mimetype(const LSQArchive *archive);
+const gchar    *lsq_archive_get_status(const LSQArchive *archive);
+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;
 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 *);
+
+gboolean        lsq_archive_operate(LSQArchive *archive, LSQCommandType type);
+
+
+
 G_END_DECLS
 
 #endif /* __ARCHIVE_H__ */

Modified: squeeze/trunk/libsqueeze/internals.c
===================================================================
--- squeeze/trunk/libsqueeze/internals.c	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/internals.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -20,15 +20,14 @@
 #include <glib-object.h>
 #include <thunar-vfs/thunar-vfs.h>
 
-#include "libsqueeze-archive.h"
-#include "libsqueeze-mime-support.h"
-#include "libsqueeze-view.h"
-#include "libsqueeze-command.h"
-#include "support-factory.h"
-#include "archive-iter.h"
-#include "archive-command.h"
+#include "libsqueeze.h"
+#include "support-template.h"
 #include "archive.h"
+#include "archive-iter.h"
+#include "support-factory.h"
 
+#include "libsqueeze-view.h"
+
 #include "internals.h"
 
 #define __USE_GNU
@@ -83,7 +82,7 @@
 	else
 		path_info = thunar_vfs_path_relative(lsq_relative_base_path, path);
 
-	if(thunar_vfs_path_equal(((LSQArchive *)open_archive)->path_info, path_info))
+	if(thunar_vfs_path_equal(lsq_archive_get_path_info(LSQ_ARCHIVE(open_archive)), path_info))
 	{
 		if(path_info)
 			thunar_vfs_path_unref(path_info);

Deleted: squeeze/trunk/libsqueeze/libsqueeze-archive.h

Deleted: squeeze/trunk/libsqueeze/libsqueeze-command.h

Deleted: squeeze/trunk/libsqueeze/libsqueeze-mime-support.h

Modified: squeeze/trunk/libsqueeze/libsqueeze.c
===================================================================
--- squeeze/trunk/libsqueeze/libsqueeze.c	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/libsqueeze.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -23,19 +23,13 @@
 #include <thunar-vfs/thunar-vfs.h>
 
 #include "libsqueeze.h"
-#include "libsqueeze-command.h"
 #include "support-factory.h"
 #include "support-reader.h"
 #include "archive-iter.h"
-#include "archive-command.h"
 #include "archive.h"
-#include "mime-support.h"
 
 #include "internals.h"
 
-static gint
-lsq_lookup_mime(gconstpointer a, gconstpointer b);
-
 void
 lsq_init()
 {
@@ -170,48 +164,14 @@
 	return 0;
 }
 
-
-GSList *
-lsq_get_supported_mime_types(LSQCommandType type)
-{
-	GSList *m_types = g_slist_copy(lsq_mime_support_list);
-	GSList *_types = m_types;
-	switch(type)
-	{
-		case LSQ_COMMAND_TYPE_ADD:
-			while(_types)
-			{
-				if(((LSQMimeSupport *)(_types->data))->new_cmd_queue == NULL)
-				{
-					m_types = g_slist_remove(m_types, _types);
-				}
-				_types = g_slist_next(_types);
-			}
-			break;
-		default:
-			break;
-	}
-	
-	return m_types;
-}
-
-static gint
-lsq_lookup_mime(gconstpointer a, gconstpointer b)
-{
-	return !thunar_vfs_mime_info_equal((((LSQMimeSupport *)a)->mime_info), b);
-}
-
-
 gboolean
 lsq_is_supported(const gchar *filename)
 {
-	ThunarVfsMimeInfo *mime_info = thunar_vfs_mime_database_get_info_for_name(lsq_mime_database, filename);
-	GSList *result = g_slist_find_custom(lsq_mime_support_list, mime_info, lsq_lookup_mime);
-	thunar_vfs_mime_info_unref(mime_info);
-	if(result)
-	{
-		return TRUE;
-	}
-	return FALSE;
+    return FALSE;
 }
 
+GSList *
+lsq_get_supported_mime_types(LSQCommandType type)
+{
+    return NULL;
+}

Modified: squeeze/trunk/libsqueeze/libsqueeze.h
===================================================================
--- squeeze/trunk/libsqueeze/libsqueeze.h	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/libsqueeze.h	2007-07-28 13:10:25 UTC (rev 25937)
@@ -17,11 +17,13 @@
 #ifndef __LIBSQUEEZE_H__
 #define __LIBSQUEEZE_H__
 
-#include <libsqueeze/libsqueeze-archive.h>
-#include <libsqueeze/libsqueeze-mime-support.h>
+#include <libsqueeze/support-template.h>
+#include <libsqueeze/archive-iter-pool.h>
+#include <libsqueeze/archive.h>
+#include <libsqueeze/archive-iter.h>
+
 #include <libsqueeze/libsqueeze-view.h>
 
-
 G_BEGIN_DECLS
 
 /*

Deleted: squeeze/trunk/libsqueeze/mime-support.c

Deleted: squeeze/trunk/libsqueeze/mime-support.h

Modified: squeeze/trunk/libsqueeze/slist.c
===================================================================
--- squeeze/trunk/libsqueeze/slist.c	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/slist.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -20,10 +20,7 @@
 #include <thunar-vfs/thunar-vfs.h>
 
 #include "libsqueeze.h"
-#include "libsqueeze-archive.h"
 #include "support-factory.h"
-#include "archive-iter.h"
-#include "archive.h"
 #include "internals.h"
 #include "slist.h"
 

Modified: squeeze/trunk/libsqueeze/support-factory.c
===================================================================
--- squeeze/trunk/libsqueeze/support-factory.c	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/support-factory.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -25,16 +25,12 @@
 #include <thunar-vfs/thunar-vfs.h>
 
 #include "libsqueeze.h"
-#include "libsqueeze-archive.h"
 #include "archive-iter.h"
 #include "archive-tempfs.h"
 #include "support-factory.h"
 #include "archive.h"
 #include "internals.h"
 
-/* fixme: */
-#include "mime-support.h"
-
 static void
 lsq_support_factory_class_init(LSQSupportFactoryClass *);
 static void
@@ -117,18 +113,17 @@
 static gint
 lsq_lookup_mime_support(gconstpointer a, gconstpointer b)
 {
-	return !((thunar_vfs_mime_info_equal((((LSQMimeSupport *)a)->mime_info), ((LSQMimeSupport *)b)->mime_info)) &&
-	(!strcmp((((LSQMimeSupport *)a)->id), ((LSQMimeSupport *)b)->id)));
+    return 0;
 }
 
 void
-lsq_support_factory_add_mime(LSQSupportFactory *factory, LSQMimeSupport *mime_support)
+lsq_support_factory_add_template(LSQSupportFactory *factory, LSQSupportTemplate *s_template)
 {
-	GSList *result = g_slist_find_custom(lsq_mime_support_list, mime_support, lsq_lookup_mime_support);
+	GSList *result = g_slist_find_custom(lsq_mime_support_list, s_template, lsq_lookup_mime_support);
 	if(!result)
 	{
-		factory->mime_support = g_slist_prepend(factory->mime_support, mime_support);
-		lsq_mime_support_list = g_slist_prepend(lsq_mime_support_list, mime_support);
+		factory->mime_support = g_slist_prepend(factory->mime_support, s_template);
+		lsq_mime_support_list = g_slist_prepend(lsq_mime_support_list, s_template);
 	}
 
 }

Modified: squeeze/trunk/libsqueeze/support-factory.h
===================================================================
--- squeeze/trunk/libsqueeze/support-factory.h	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/support-factory.h	2007-07-28 13:10:25 UTC (rev 25937)
@@ -40,6 +40,6 @@
 
 GType                lsq_support_factory_get_type(void);
 void                 lsq_support_factory_init_archive(LSQSupportFactory *builder, LSQArchive *archive);
-void                 lsq_support_factory_add_mime(LSQSupportFactory *factory, LSQMimeSupport *mime_support);
+void                 lsq_support_factory_add_template(LSQSupportFactory *factory, LSQSupportTemplate *s_template);
 
 #endif /* __LIBSQUEEZE_SUPPORT_FACTORY_H__ */

Modified: squeeze/trunk/libsqueeze/support-reader.c
===================================================================
--- squeeze/trunk/libsqueeze/support-reader.c	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/libsqueeze/support-reader.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -26,12 +26,10 @@
 #include <libxfce4util/libxfce4util.h>
 
 #include "libsqueeze.h"
-#include "libsqueeze-archive.h"
 #include "support-factory.h"
 #include "archive-iter.h"
 #include "archive.h"
 #include "support-reader.h"
-#include "mime-support.h"
 
 #include "internals.h"
 
@@ -142,13 +140,13 @@
 	gchar **_mime_types = mime_types;
 	for(i = 0; _mime_types[i]; ++i)
 	{
-		LSQMimeSupport *mime_support = g_new(LSQMimeSupport, 1);
+		LSQSupportTemplate *s_template = g_new(LSQSupportTemplate, 1);
 
 		xfce_rc_set_group(rc, _mime_types[i]);
 		/* only add to builder->mime_types if all req. apps are found */
-		mime_support->required_apps = xfce_rc_read_list_entry(rc, "X-Squeeze-Requires", ";");
-		gchar **_iter = mime_support->required_apps;
-		mime_support->supported = TRUE;
+		s_template->required_apps = xfce_rc_read_list_entry(rc, "X-Squeeze-Requires", ";");
+		gchar **_iter = s_template->required_apps;
+		s_template->supported = TRUE;
 		while(*_iter)
 		{
 			gchar *path = g_find_program_in_path(*_iter);
@@ -156,22 +154,22 @@
 				g_free(path);
 			else
 			{
-				mime_support->supported = FALSE;
+				s_template->supported = FALSE;
 				break;
 			}
 			_iter++;
 		}
 
-		mime_support->mime_info = thunar_vfs_mime_database_get_info(lsq_mime_database, _mime_types[i]);
-		mime_support->id = (const gchar *)factory->id;
+		s_template->mime_info = thunar_vfs_mime_database_get_info(lsq_mime_database, _mime_types[i]);
+		s_template->id = (const gchar *)factory->id;
 
-		mime_support->new_cmd_queue     = xfce_rc_read_list_entry(rc, "X-Squeeze-New", ";");
-		mime_support->add_cmd_queue     = xfce_rc_read_list_entry(rc, "X-Squeeze-Add", ";");
-		mime_support->remove_cmd_queue  = xfce_rc_read_list_entry(rc, "X-Squeeze-Remove", ";");
-		mime_support->extract_cmd_queue = xfce_rc_read_list_entry(rc, "X-Squeeze-Extract", ";");
-		mime_support->refresh_cmd_queue = xfce_rc_read_list_entry(rc, "X-Squeeze-Refresh", ";");
+		s_template->new_cmd_queue     = xfce_rc_read_list_entry(rc, "X-Squeeze-New", ";");
+		s_template->add_cmd_queue     = xfce_rc_read_list_entry(rc, "X-Squeeze-Add", ";");
+		s_template->remove_cmd_queue  = xfce_rc_read_list_entry(rc, "X-Squeeze-Remove", ";");
+		s_template->extract_cmd_queue = xfce_rc_read_list_entry(rc, "X-Squeeze-Extract", ";");
+		s_template->refresh_cmd_queue = xfce_rc_read_list_entry(rc, "X-Squeeze-Refresh", ";");
 
-		lsq_support_factory_add_mime(factory, mime_support);
+		lsq_support_factory_add_template(factory, s_template);
 	}
 	 
 	return factory;

Added: squeeze/trunk/libsqueeze/support-template.c
===================================================================
--- squeeze/trunk/libsqueeze/support-template.c	                        (rev 0)
+++ squeeze/trunk/libsqueeze/support-template.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -0,0 +1,24 @@
+/* 
+ *  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 Library 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.
+ */
+
+#include <config.h>
+#include <string.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <glib-object.h> 
+#include <thunar-vfs/thunar-vfs.h>
+
+#include "support-template.h"

Copied: squeeze/trunk/libsqueeze/support-template.h (from rev 25921, squeeze/trunk/libsqueeze/mime-support.h)
===================================================================
--- squeeze/trunk/libsqueeze/support-template.h	                        (rev 0)
+++ squeeze/trunk/libsqueeze/support-template.h	2007-07-28 13:10:25 UTC (rev 25937)
@@ -0,0 +1,56 @@
+/* 
+ *  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 Library 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.
+ */
+
+#ifndef __SUPPORT_TEMPLATE_H__
+#define __SUPPORT_TEMPLATE_H__
+
+typedef enum
+{
+	LSQ_SUPPORT_FILES    = 1 << 0x0,
+	LSQ_SUPPORT_FOLDERS  = 1 << 0x1,
+	LSQ_SUPPORT_MANY     = 1 << 0x2
+} LSQSupportType;
+
+typedef enum
+{
+	LSQ_COMMAND_TYPE_ADD,
+	LSQ_COMMAND_TYPE_REMOVE,
+	LSQ_COMMAND_TYPE_EXTRACT,
+	LSQ_COMMAND_TYPE_REFRESH,
+	LSQ_COMMAND_TYPE_OPEN,
+	LSQ_COMMAND_TYPE_TEST
+} LSQCommandType;
+
+typedef struct _LSQSupportTemplate LSQSupportTemplate;
+
+struct _LSQSupportTemplate
+{
+	const gchar *id;
+	ThunarVfsMimeInfo *mime_info;
+	gchar **required_apps;
+	gboolean supported;
+
+	gchar **new_cmd_queue;
+	gchar **add_cmd_queue;
+	gchar **remove_cmd_queue;
+	gchar **extract_cmd_queue;
+	gchar **refresh_cmd_queue;
+	LSQSupportType   support_mask;
+};
+
+
+#endif /* __SUPPORT_TEMPLATE_H__ */
+

Modified: squeeze/trunk/src/application.c
===================================================================
--- squeeze/trunk/src/application.c	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/src/application.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -182,7 +182,7 @@
 	g_signal_connect(G_OBJECT(lp_archive), "command-terminated", G_CALLBACK(cb_sq_application_archive_command_terminated), app);
 	GtkWidget *message_dialog = sq_message_dialog_new(GTK_WINDOW_TOPLEVEL, lp_archive);
 	gtk_widget_show(message_dialog);
-	if(!lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_EXTRACT, dest_path, NULL, NULL))
+	if(!lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_EXTRACT))
 	{
 		GtkWidget *warning_dialog = gtk_message_dialog_new(NULL, 
 		                                                   GTK_DIALOG_DESTROY_WITH_PARENT, 
@@ -257,7 +257,8 @@
 	g_signal_connect(G_OBJECT(lp_archive), "command-terminated", G_CALLBACK(cb_sq_application_archive_command_terminated), app);
 	GtkWidget *message_dialog = sq_message_dialog_new(GTK_WINDOW_TOPLEVEL, lp_archive);
 	gtk_widget_show(message_dialog);
-	if(!lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_ADD, NULL, files, NULL))
+
+	if(!lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_ADD))
 	{
 		/* FIXME: show warning dialog */
 		GtkWidget *warning_dialog = gtk_message_dialog_new(NULL, 

Modified: squeeze/trunk/src/main_window.c
===================================================================
--- squeeze/trunk/src/main_window.c	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/src/main_window.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -735,6 +735,7 @@
 
 	gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE);
 
+    /*
 	GSList *supported_mime_types = lsq_get_supported_mime_types(0);
 	GSList *_supported_mime_types = supported_mime_types;
 	
@@ -757,6 +758,7 @@
 
 	gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter_all);
 	gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter_all);
+    */
 	
 
 	result = gtk_dialog_run (GTK_DIALOG (dialog) );
@@ -815,7 +817,7 @@
 			lsq_iter_slist_free(filenames);
 			filenames = NULL;
 		}
-		if(!lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_EXTRACT, extract_archive_path, filenames, NULL))
+		if(!lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_EXTRACT))
 		{
 			GtkWidget *warning_dialog = gtk_message_dialog_new(GTK_WINDOW(window), 
 			                                                   GTK_DIALOG_DESTROY_WITH_PARENT, 
@@ -863,7 +865,7 @@
 		filenames = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog));
 		if(filenames)
 		{
-			if(!lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_ADD, NULL, filenames, NULL))
+			if(!lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_ADD))
 			{
 				GtkWidget *warning_dialog = gtk_message_dialog_new(GTK_WINDOW(window), 
 																													 GTK_DIALOG_DESTROY_WITH_PARENT, 
@@ -905,7 +907,7 @@
 		filenames = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog));
 		if(filenames)
 		{
-			if(!lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_ADD, NULL, filenames, NULL))
+			if(!lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_ADD))
 			{
 				GtkWidget *warning_dialog = gtk_message_dialog_new(GTK_WINDOW(window),
 				                      GTK_DIALOG_DESTROY_WITH_PARENT, 
@@ -939,7 +941,7 @@
 			gtk_widget_hide(dialog);
 			sq_notebook_get_active_archive(SQ_NOTEBOOK(window->notebook), &lp_archive);
 			/* gtk_tree_view_set_model(sq_notebook_get_active_tree_view(SQ_NOTEBOOK(window->notebook)), NULL); */
-			if(!lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_REMOVE, NULL, filenames, NULL))
+			if(!lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_REMOVE))
 			{
 				GtkWidget *warning_dialog = gtk_message_dialog_new(GTK_WINDOW(window), 
 																													 GTK_DIALOG_DESTROY_WITH_PARENT, 
@@ -1226,7 +1228,7 @@
 	{
 		case GTK_RESPONSE_OK: /* VIEW */
 			sq_notebook_get_active_archive(SQ_NOTEBOOK(notebook), &lp_archive);
-			if(lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_OPEN, NULL, files, NULL))
+			if(lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_OPEN))
 			{
 				GtkWidget *warning_dialog = gtk_message_dialog_new(window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE, _("Squeeze cannot view this file.\nthe application to support this is missing."));
 				if(warning_dialog)
@@ -1249,7 +1251,7 @@
 					g_slist_free(files);
 					files = NULL;
 				}
-				if(lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_EXTRACT, extract_archive_path, files, NULL))
+				if(lsq_archive_operate(lp_archive, LSQ_COMMAND_TYPE_EXTRACT))
 				{
 					GtkWidget *warning_dialog = gtk_message_dialog_new(GTK_WINDOW(window), 
 																	 GTK_DIALOG_DESTROY_WITH_PARENT, 

Modified: squeeze/trunk/src/new_dialog.c
===================================================================
--- squeeze/trunk/src/new_dialog.c	2007-07-27 12:56:55 UTC (rev 25936)
+++ squeeze/trunk/src/new_dialog.c	2007-07-28 13:10:25 UTC (rev 25937)
@@ -80,6 +80,7 @@
 	gtk_file_filter_set_name(dialog->file_filter, _("Archives"));
 	while(_supported_mime_types)
 	{
+        /*
 		gtk_combo_box_append_text(GTK_COMBO_BOX(dialog->archive_types_combo),
 		        lsq_mime_support_get_comment((LSQMimeSupport *)(_supported_mime_types->data)));
 
@@ -87,6 +88,7 @@
 		        lsq_mime_support_get_name((LSQMimeSupport *)(_supported_mime_types->data)));
 
 		_supported_mime_types = g_slist_next(_supported_mime_types);
+        */
 	}
 
 	gtk_box_pack_end(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, TRUE, 0);
@@ -132,7 +134,7 @@
 		{
 			_supported_mime_types = g_slist_next(_supported_mime_types);
 		}
-		const gchar *mime_type = lsq_mime_support_get_name(((LSQMimeSupport *)_supported_mime_types->data));
+		const gchar *mime_type = ""; //lsq_mime_support_get_name(((LSQMimeSupport *)_supported_mime_types->data));
 		gchar *suffix = NULL;
 		if(!strcmp(mime_type, "application/x-tar")) suffix = ".tar";
 		if(!strcmp(mime_type, "application/x-compressed-tar")) suffix = ".tar.gz";



More information about the Xfce4-commits mailing list