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

Stephan Arts stephan at xfce.org
Fri Mar 23 16:48:51 CET 2007


Author: stephan
Date: 2007-03-23 15:48:50 +0000 (Fri, 23 Mar 2007)
New Revision: 25268

Modified:
   squeeze/trunk/libsqueeze/archive.c
   squeeze/trunk/squeeze.desktop.in
   squeeze/trunk/src/main.c
Log:
fixed bug 2771

Modified: squeeze/trunk/libsqueeze/archive.c
===================================================================
--- squeeze/trunk/libsqueeze/archive.c	2007-03-23 11:20:50 UTC (rev 25267)
+++ squeeze/trunk/libsqueeze/archive.c	2007-03-23 15:48:50 UTC (rev 25268)
@@ -484,4 +484,5 @@
 	g_debug("COMMAND TERMINATED");
 #endif
 	lsq_archive_refreshed(archive);
+	g_signal_emit(G_OBJECT(archive), lsq_archive_signals[LSQ_ARCHIVE_SIGNAL_COMMAND_TERMINATED], 0, error, NULL);
 }

Modified: squeeze/trunk/squeeze.desktop.in
===================================================================
--- squeeze/trunk/squeeze.desktop.in	2007-03-23 11:20:50 UTC (rev 25267)
+++ squeeze/trunk/squeeze.desktop.in	2007-03-23 15:48:50 UTC (rev 25268)
@@ -11,4 +11,4 @@
 X-MultipleArgs=false
 Categories=GTK;Archiving;Utility;
 StartupNotify=true
-MimeType=application/x-bzip-compressed-tar;application/x-bzip2-compressed-tar;application/x-compressed-tar;application/x-tar;application/x-tarz;application/x-tzo;application/x-zip;application/x-zip-compressed;application/zip;
+MimeType=application/x-bzip-compressed-tar;application/x-bzip2-compressed-tar;application/x-compressed-tar;application/x-tar;application/x-tarz;application/x-tzo;application/x-zip;application/x-zip-compressed;application/zip;application/x-rar;application/x-gzip;application/x-bzip;application/x-lzop;application/x-compress

Modified: squeeze/trunk/src/main.c
===================================================================
--- squeeze/trunk/src/main.c	2007-03-23 11:20:50 UTC (rev 25267)
+++ squeeze/trunk/src/main.c	2007-03-23 15:48:50 UTC (rev 25268)
@@ -15,6 +15,7 @@
  */
 
 #include <config.h>
+#include <string.h>
 #include <glib.h>
 #include <glib-object.h>
 #include <gtk/gtk.h>
@@ -97,6 +98,8 @@
 			return 1;
 		}
 	}
+	gchar *current_dir = g_get_current_dir();
+	g_debug(current_dir);
 
 	thunar_vfs_init();
 	lsq_init();
@@ -134,13 +137,35 @@
 	{
 		GSList *files = NULL;
 
+		/*
+		 * Remove prefix if it is the pwd
+		 */
 		for(i = 1; i < argc; i++)
 		{
-			files = g_slist_prepend(files, argv[i]);
+			gchar *filename;
+			if(g_str_has_prefix(argv[i], current_dir))
+			{
+				filename = g_strdup(&(argv[i][strlen(current_dir)+1]));
+			}
+			else
+				filename = g_strdup(argv[i]);
+			files = g_slist_prepend(files, filename);
 		}
 
+		/*
+		 * Remove prefix if it is the pwd
+		 */
 		if(new_archive)
-			files = g_slist_prepend(files, new_archive);
+		{
+			gchar *filename;
+			if(g_str_has_prefix(new_archive, current_dir))
+			{
+				filename = g_strdup(&(new_archive[strlen(current_dir)+1]));
+			}
+			else
+				filename = g_strdup(new_archive);
+			files = g_slist_prepend(files, filename);
+		}
 
 		if(sq_application_new_archive(sq_app, add_archive_path, files))
 			return 1;



More information about the Xfce4-commits mailing list