[Xfce4-commits] r26109 - in xarchiver/trunk: . src

Giuseppe Torelli colossus at xfce.org
Tue Sep 25 11:51:34 CEST 2007


Author: colossus
Date: 2007-09-25 09:51:34 +0000 (Tue, 25 Sep 2007)
New Revision: 26109

Modified:
   xarchiver/trunk/ChangeLog
   xarchiver/trunk/src/gzip.c
Log:
Changed the order of the columns in gzip.c
Updated Changelog.


Modified: xarchiver/trunk/ChangeLog
===================================================================
--- xarchiver/trunk/ChangeLog	2007-09-25 09:35:51 UTC (rev 26108)
+++ xarchiver/trunk/ChangeLog	2007-09-25 09:51:34 UTC (rev 26109)
@@ -8,8 +8,8 @@
 		- The cmd-line output window has a close button and a better layout.
 		- Tabs are now reorderable.
 		- Better menu layout.
-		- Fixed bugs #2045,#2614, #2616, #2620, #2626, #2627, #2799.
-		- Fixed valgrind's messages 'Invalid read of size 4'.
+		- Fixed bugs #2045,#2614, #2616, #2620, #2626, #2627, #2799, #3422, #3542, #3548. 
+		- Fixed several memory leaks thanks to valgrind.
 
 27/11/06 - 0.4.6:
 		- Fixed code in support.c to load the images when installing the software.

Modified: xarchiver/trunk/src/gzip.c
===================================================================
--- xarchiver/trunk/src/gzip.c	2007-09-25 09:35:51 UTC (rev 26108)
+++ xarchiver/trunk/src/gzip.c	2007-09-25 09:51:34 UTC (rev 26109)
@@ -71,12 +71,12 @@
 		archive->nr_of_dirs = 0;
 		archive->format = "GZIP";
 
-		GType types[]= {G_TYPE_STRING,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_UINT64,G_TYPE_UINT64};
+		GType types[]= {G_TYPE_STRING,G_TYPE_STRING,G_TYPE_UINT64,G_TYPE_UINT64,G_TYPE_STRING};
 		archive->column_types = g_malloc0(sizeof(types));
 		for (i = 0; i < 5; i++)
 			archive->column_types[i] = types[i];
 
-		char *names[]= {(_("Ratio")),(_("Compressed")),(_("Size"))};
+		char *names[]= {(_("Compressed")),(_("Size")),(_("Ratio"))};
 		xa_create_liststore (archive,names);
 		
 		command = g_strconcat ("gzip -l ",archive->escaped_path,NULL);
@@ -106,7 +106,7 @@
 	a = n;
 	for(; n < linesize && line[n] != ' '; n++);
 	line[n]='\0';
-	item[2] = line + a;
+	item[0] = line + a;
 	n++;
 
 	/* Compressed */
@@ -123,13 +123,16 @@
 	a = n;
 	for(; n < linesize && line[n] != ' '; n++);
 	line[n] = '\0';
-	item[0] = line + a;
+	item[2] = line + a;
 	n++;
 	
 	line[linesize-1] = '\0';
 	filename = line+n;
 	
 	basename = g_path_get_basename(filename);
+	if (basename == NULL)
+		basename = g_strdup(filename);
+
 	entry = xa_set_archive_entries_for_each_row (archive,basename,FALSE,item);
 	g_free(basename);
 }



More information about the Xfce4-commits mailing list