[Xfce4-commits] r24509 - in squeeze/trunk: docs/reference/libsqueeze/tmpl icons/scalable libsqueeze

Stephan Arts stephan at xfce.org
Tue Jan 16 19:19:50 CET 2007


Author: stephan
Date: 2007-01-16 18:19:50 +0000 (Tue, 16 Jan 2007)
New Revision: 24509

Modified:
   squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support.sgml
   squeeze/trunk/docs/reference/libsqueeze/tmpl/archive.sgml
   squeeze/trunk/docs/reference/libsqueeze/tmpl/libsqueeze-unused.sgml
   squeeze/trunk/icons/scalable/Makefile.am
   squeeze/trunk/libsqueeze/archive-support-gnu-tar.c
   squeeze/trunk/libsqueeze/archive-support.c
Log:
Fixed Add function of GnuTar (CRITICAL)
Please update to at least this version, or you can go look for your tarballs in /tmp.



Modified: squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support.sgml
===================================================================
--- squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support.sgml	2007-01-16 17:27:23 UTC (rev 24508)
+++ squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support.sgml	2007-01-16 18:19:50 UTC (rev 24509)
@@ -27,7 +27,7 @@
 @blurb: 
 @icon: 
 @func: 
- at post_func: 
+ at callback: 
 @support: 
 @user_data: 
 
@@ -47,6 +47,7 @@
 
 @support: 
 @Param2: 
+ at Param3: 
 @user_data: 
 @Returns: 
 
@@ -70,6 +71,7 @@
 @id: 
 @mime: 
 @custom_action: 
+ at max_n_files: 
 @add: 
 @extract: 
 @remove: 
@@ -292,6 +294,5 @@
 @Param1: 
 @Param2: 
 @Param3: 
- at Param4: 
 
 

Modified: squeeze/trunk/docs/reference/libsqueeze/tmpl/archive.sgml
===================================================================
--- squeeze/trunk/docs/reference/libsqueeze/tmpl/archive.sgml	2007-01-16 17:27:23 UTC (rev 24508)
+++ squeeze/trunk/docs/reference/libsqueeze/tmpl/archive.sgml	2007-01-16 18:19:50 UTC (rev 24509)
@@ -326,27 +326,6 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION lsq_archive_set_property_type ##### -->
-<para>
-
-</para>
-
- at Param1: 
- at Param2: 
- at Param3: 
- at Param4: 
-
-
-<!-- ##### FUNCTION lsq_archive_set_property_typesv ##### -->
-<para>
-
-</para>
-
- at Param1: 
- at Param2: 
- at Param3: 
-
-
 <!-- ##### FUNCTION lsq_archive_n_property ##### -->
 <para>
 

Modified: squeeze/trunk/docs/reference/libsqueeze/tmpl/libsqueeze-unused.sgml
===================================================================
--- squeeze/trunk/docs/reference/libsqueeze/tmpl/libsqueeze-unused.sgml	2007-01-16 17:27:23 UTC (rev 24508)
+++ squeeze/trunk/docs/reference/libsqueeze/tmpl/libsqueeze-unused.sgml	2007-01-16 18:19:50 UTC (rev 24509)
@@ -6,6 +6,25 @@
 @entry: 
 @next: 
 
+<!-- ##### FUNCTION lsq_archive_set_property_type ##### -->
+<para>
+
+</para>
+
+ at Param1: 
+ at Param2: 
+ at Param3: 
+ at Param4: 
+
+<!-- ##### FUNCTION lsq_archive_set_property_typesv ##### -->
+<para>
+
+</para>
+
+ at Param1: 
+ at Param2: 
+ at Param3: 
+
 <!-- ##### FUNCTION lsq_concat_filenames ##### -->
 <para>
 

Modified: squeeze/trunk/icons/scalable/Makefile.am
===================================================================
--- squeeze/trunk/icons/scalable/Makefile.am	2007-01-16 17:27:23 UTC (rev 24508)
+++ squeeze/trunk/icons/scalable/Makefile.am	2007-01-16 18:19:50 UTC (rev 24509)
@@ -1,8 +1,11 @@
 
 # Inspired by Makefile.am from the Thunar file-manager
 
+appiconsdir = $(datadir)/icons/hicolor/scalable/apps/squeeze
+appicons_DATA = add-archive.svg extract-archive.svg
+
 iconsdir = $(datadir)/icons/hicolor/scalable/apps
 icons_DATA = squeeze.svg
 	
 
-EXTRA_DIST = $(icons_DATA)
+EXTRA_DIST = $(appicons_DATA)

Modified: squeeze/trunk/libsqueeze/archive-support-gnu-tar.c
===================================================================
--- squeeze/trunk/libsqueeze/archive-support-gnu-tar.c	2007-01-16 17:27:23 UTC (rev 24508)
+++ squeeze/trunk/libsqueeze/archive-support-gnu-tar.c	2007-01-16 18:19:50 UTC (rev 24509)
@@ -52,7 +52,7 @@
 void
 lsq_archive_support_gnu_tar_compress_watch(GPid pid, gint status, gpointer data);
 void
-lsq_archive_support_gnu_tar_decompress_watch(GPid pid, gint status, gpointer data);
+lsq_archive_support_gnu_tar_passive_watch(GPid pid, gint status, gpointer data);
 
 gboolean
 lsq_archive_support_gnu_tar_refresh_parse_output(GIOChannel *ioc, GIOCondition cond, gpointer data);
@@ -317,9 +317,8 @@
 				g_free(archive_path);
 				return 0;
 			}
-			archive->tmp_file = g_strconcat(lsq_tmp_dir, "/squeeze-XXXXXX" , NULL);
+			archive->tmp_file = g_strconcat(lsq_tmp_dir, "/squeeze-XXXXXX.tar" , NULL);
 			g_mkstemp(archive->tmp_file);
-			g_unlink(archive->tmp_file);
 			if(!g_strcasecmp(thunar_vfs_mime_info_get_name(archive->mime_info), "application/x-tarz"))
 				command = g_strconcat("uncompress -c ", archive_path, NULL);
 			if(!g_strcasecmp(thunar_vfs_mime_info_get_name(archive->mime_info), "application/x-compressed-tar"))
@@ -328,7 +327,7 @@
 				command = g_strconcat("bunzip2 -c ", archive_path, NULL);
 			if(!g_strcasecmp(thunar_vfs_mime_info_get_name(archive->mime_info), "application/x-tzo"))
 				command = g_strconcat("lzop -dc ", archive_path, NULL);
-			lsq_execute(command, archive, lsq_archive_support_gnu_tar_decompress_watch, NULL, lsq_archive_support_gnu_tar_decompress_parse_output, NULL);
+			lsq_execute(command, archive, lsq_archive_support_gnu_tar_passive_watch, NULL, lsq_archive_support_gnu_tar_decompress_parse_output, NULL);
 			g_free(command);
 		}
 		g_free(archive_path);
@@ -448,7 +447,6 @@
 			}
 			archive->tmp_file = g_strconcat(lsq_tmp_dir, "/squeeze-XXXXXX" , NULL);
 			g_mkstemp(archive->tmp_file);
-			g_unlink(archive->tmp_file);
 			if(!g_strcasecmp(thunar_vfs_mime_info_get_name(archive->mime_info), "application/x-tarz"))
 				command = g_strconcat("uncompress -c ", archive_path, NULL);
 			if(!g_strcasecmp(thunar_vfs_mime_info_get_name(archive->mime_info), "application/x-compressed-tar"))
@@ -457,7 +455,7 @@
 				command = g_strconcat("bunzip2 -c ", archive_path, NULL);
 			if(!g_strcasecmp(thunar_vfs_mime_info_get_name(archive->mime_info), "application/x-tzo"))
 				command = g_strconcat("lzop -dc ", archive_path, NULL);
-			lsq_execute(command, archive, lsq_archive_support_gnu_tar_decompress_watch, NULL, lsq_archive_support_gnu_tar_decompress_parse_output, NULL);
+			lsq_execute(command, archive, lsq_archive_support_gnu_tar_passive_watch, NULL, lsq_archive_support_gnu_tar_decompress_parse_output, NULL);
 			g_free(command);
 		} else
 		{
@@ -521,7 +519,7 @@
 }
 
 void
-lsq_archive_support_gnu_tar_decompress_watch(GPid pid, gint status, gpointer data)
+lsq_archive_support_gnu_tar_passive_watch(GPid pid, gint status, gpointer data)
 {
 	LSQArchive *archive = data;
 	archive->child_pid = 0;
@@ -542,7 +540,8 @@
 		command = g_strconcat("bzip2 -c ", archive->tmp_file, NULL);
 	if(!g_strcasecmp(thunar_vfs_mime_info_get_name(archive->mime_info), "application/x-tzo"))
 		command = g_strconcat("lzop -c ", archive->tmp_file, NULL);
-	lsq_execute(command, archive, NULL, NULL, lsq_archive_support_gnu_tar_compress_parse_output, NULL);
+	g_unlink(archive->path);
+	lsq_execute(command, archive, lsq_archive_support_gnu_tar_passive_watch, NULL, lsq_archive_support_gnu_tar_compress_parse_output, NULL);
 }
 
 gboolean
@@ -693,13 +692,11 @@
 			switch(archive->status)
 			{
 				case(LSQ_ARCHIVESTATUS_ADD):
-					g_unlink(archive->path);
 					command = g_strconcat(LSQ_ARCHIVE_SUPPORT_GNU_TAR(archive->support)->app_name, " -rf \"", archive->tmp_file, "\" ", archive->files, NULL);
 					lsq_execute(command, archive, lsq_archive_support_gnu_tar_compress_watch, NULL, NULL, NULL);
 					g_free(command);
 					break;
 				case(LSQ_ARCHIVESTATUS_REMOVE):
-					g_unlink(archive->path);
 					command = g_strconcat(LSQ_ARCHIVE_SUPPORT_GNU_TAR(archive->support)->app_name, " -f \"", archive->tmp_file, "\" --delete ", archive->files, NULL);
 					lsq_execute(command, archive, lsq_archive_support_gnu_tar_compress_watch, NULL, NULL, NULL);
 					g_free(command);
@@ -745,6 +742,7 @@
 		g_io_channel_unref (ioc);
 		if(archive->tmp_file)
 			g_unlink(archive->tmp_file);
+		lsq_archive_set_status(archive, LSQ_ARCHIVESTATUS_IDLE);
 		return FALSE;
 	}
 	return TRUE;

Modified: squeeze/trunk/libsqueeze/archive-support.c
===================================================================
--- squeeze/trunk/libsqueeze/archive-support.c	2007-01-16 17:27:23 UTC (rev 24508)
+++ squeeze/trunk/libsqueeze/archive-support.c	2007-01-16 18:19:50 UTC (rev 24509)
@@ -238,7 +238,7 @@
 		while(iter)
 		{
 			path = g_strdup((const gchar*)iter->data);
-			*strrchr(path, '/') = '\0';
+		//	*strrchr(path, '/') = '\0';
 			entry = lsq_archive_get_iter(archive, path);
 			g_free(path);
 			child = lsq_archive_get_iter(archive, (const gchar*)iter->data);



More information about the Xfce4-commits mailing list