[Xfce4-commits] r26479 - in xarchiver/trunk: . src
Giuseppe Torelli
colossus at xfce.org
Fri Dec 14 14:55:15 CET 2007
Author: colossus
Date: 2007-12-14 13:55:15 +0000 (Fri, 14 Dec 2007)
New Revision: 26479
Modified:
xarchiver/trunk/ChangeLog
xarchiver/trunk/src/7zip.c
xarchiver/trunk/src/archive.c
xarchiver/trunk/src/archive.h
xarchiver/trunk/src/arj.c
xarchiver/trunk/src/bzip2.c
xarchiver/trunk/src/gzip.c
xarchiver/trunk/src/lha.c
xarchiver/trunk/src/mime.c
xarchiver/trunk/src/rar.c
xarchiver/trunk/src/rpm.c
xarchiver/trunk/src/tar.c
xarchiver/trunk/src/window.c
xarchiver/trunk/src/zip.c
Log:
Added mime icons detection for bzip2 and gzip files.
Fixed missed icon when opening gzip files and bzip2 files.
Fixed missed reloading when deleting from tar archives.
Removed unused gboolean value in xa_set_archive_entries_for_each_row().
Modified: xarchiver/trunk/ChangeLog
===================================================================
--- xarchiver/trunk/ChangeLog 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/ChangeLog 2007-12-14 13:55:15 UTC (rev 26479)
@@ -1,9 +1,9 @@
Xarchiver changelog:
-xx/01/07 - 0.5:
- - Implemented archive navigation within directories.
- - Each archive's entry has now its own mime icon.
- - Added a preferences dialog to set Xarchiver's options.
+xx/01/08 - 0.5:
+ - Archive directories are now browsable just like a file managers.
+ - Mime icon for each of the archive entries.
+ - Preferences dialog to set Xarchiver's options.
- The cmd-line output window now displays each archiver's output.
- The cmd-line output window has a close button and a better layout.
- Tabs are now reorderable.
Modified: xarchiver/trunk/src/7zip.c
===================================================================
--- xarchiver/trunk/src/7zip.c 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/7zip.c 2007-12-14 13:55:15 UTC (rev 26479)
@@ -158,7 +158,7 @@
g_free (filename);
filename = filename_with_slash;
}
- entry = xa_set_archive_entries_for_each_row (archive,filename,FALSE,item);
+ entry = xa_set_archive_entries_for_each_row (archive,filename,item);
g_free(filename);
}
Modified: xarchiver/trunk/src/archive.c
===================================================================
--- xarchiver/trunk/src/archive.c 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/archive.c 2007-12-14 13:55:15 UTC (rev 26479)
@@ -376,7 +376,7 @@
return xa_find_child_entry(entry->next, string);
}
-XEntry *xa_set_archive_entries_for_each_row (XArchive *archive,gchar *filename,gboolean encrypted,gpointer *items)
+XEntry *xa_set_archive_entries_for_each_row (XArchive *archive,gchar *filename,gpointer *items)
{
XEntry *new_entry= NULL;
XEntry *last_entry = archive->root_entry;
Modified: xarchiver/trunk/src/archive.h
===================================================================
--- xarchiver/trunk/src/archive.h 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/archive.h 2007-12-14 13:55:15 UTC (rev 26479)
@@ -128,7 +128,7 @@
XEntry *xa_alloc_memory_for_each_row ( guint nc,GType column_types[]);
void xa_free_entry (XArchive *archive,XEntry *entry);
XEntry *xa_find_child_entry(XEntry *entry, gchar *string);
-XEntry *xa_set_archive_entries_for_each_row (XArchive *archive,gchar *filename,gboolean encrypted,gpointer *items);
+XEntry *xa_set_archive_entries_for_each_row (XArchive *archive,gchar *filename,gpointer *items);
gpointer *xa_fill_archive_entry_columns_for_each_row (XArchive *archive,XEntry *entry,gpointer *items);
void xa_update_window_with_archive_entries (XArchive *archive,XEntry *entry);
XEntry* xa_find_entry_from_path (XEntry *root_entry,const gchar *fullpathname);
Modified: xarchiver/trunk/src/arj.c
===================================================================
--- xarchiver/trunk/src/arj.c 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/arj.c 2007-12-14 13:55:15 UTC (rev 26479)
@@ -141,7 +141,7 @@
/* BPMGS */
line[78] = '\0';
encrypted = (g_ascii_strcasecmp (line+76, "11") == 0);
- entry = xa_set_archive_entries_for_each_row (archive,filename,encrypted,item);
+ entry = xa_set_archive_entries_for_each_row (archive,filename,item);
if (entry != NULL)
entry->is_encrypted = encrypted;
g_free(filename);
Modified: xarchiver/trunk/src/bzip2.c
===================================================================
--- xarchiver/trunk/src/bzip2.c 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/bzip2.c 2007-12-14 13:55:15 UTC (rev 26479)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Giuseppe Torelli <colossus73 at gmail.com>
+ * Copyright (C) 2007 Giuseppe Torelli - <colossus73 at gmail.com>
*
* 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
@@ -60,7 +60,6 @@
archive->nc = 7;
archive->parse_output = xa_get_tar_line_content;
xa_spawn_async_process (archive,command);
-
g_free (command);
g_free (tar);
@@ -79,14 +78,14 @@
{
archive->can_add = archive->has_test = archive->has_sfx = FALSE;
archive->has_properties = archive->can_extract = TRUE;
- archive->nc = 2;
+ archive->nc = 3;
archive->nr_of_files = 1;
archive->nr_of_dirs = 0;
archive->format = "BZIP2";
- GType types[]= {G_TYPE_STRING,G_TYPE_STRING,G_TYPE_UINT64,G_TYPE_UINT64};
+ GType types[]= {GDK_TYPE_PIXBUF,G_TYPE_STRING,G_TYPE_UINT64,G_TYPE_UINT64,G_TYPE_POINTER};
archive->column_types = g_malloc0(sizeof(types));
- for (i = 0; i < 4; i++)
+ for (i = 0; i < 5; i++)
archive->column_types[i] = types[i];
char *names[]= {(_("Compressed")),(_("Size"))};
@@ -149,7 +148,7 @@
archive->dummy_size = my_stat.st_size;
item[1] = size;
- entry = xa_set_archive_entries_for_each_row (archive,filename,FALSE,item);
+ entry = xa_set_archive_entries_for_each_row (archive,filename,item);
g_free(compressed);
g_free(size);
g_free(filename);
@@ -237,9 +236,6 @@
gtk_widget_hide ( viewport2 );
Update_StatusBar ( _("Operation canceled."));
}
- //TODO:
- /*else
- xa_watch_child (archive->child_pid, 0, archive);*/
}
void xa_add_delete_tar_bzip2_gzip ( GString *list , XArchive *archive , gboolean dummy , gboolean add )
@@ -247,6 +243,7 @@
gchar *command, *msg, *tar,*temp_name,*file_ext;
gboolean result;
+ archive->status = XA_ARCHIVESTATUS_DELETE;
if ( ! cli )
{
gtk_widget_show (viewport2);
@@ -256,7 +253,6 @@
}
/* Let's copy the archive to /tmp first */
-
//TODO: replace /tmp with the user chosen dir in the pref dialog
temp_name = g_strconcat ( " /tmp", g_strrstr (archive->escaped_path , "/"), NULL);
command = g_strconcat ("cp -ar " ,archive->escaped_path,temp_name,NULL);
Modified: xarchiver/trunk/src/gzip.c
===================================================================
--- xarchiver/trunk/src/gzip.c 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/gzip.c 2007-12-14 13:55:15 UTC (rev 26479)
@@ -64,15 +64,15 @@
{
archive->can_add = archive->has_test = archive->has_sfx = FALSE;
archive->has_properties = archive->can_extract = TRUE;
- archive->nc = 3;
+ archive->nc = 4;
archive->parse_output = xa_get_gzip_line_content;
archive->nr_of_files = 1;
archive->nr_of_dirs = 0;
archive->format = "GZIP";
- GType types[]= {G_TYPE_STRING,G_TYPE_STRING,G_TYPE_UINT64,G_TYPE_UINT64,G_TYPE_STRING};
+ GType types[]= {GDK_TYPE_PIXBUF,G_TYPE_STRING,G_TYPE_UINT64,G_TYPE_UINT64,G_TYPE_STRING,G_TYPE_POINTER};
archive->column_types = g_malloc0(sizeof(types));
- for (i = 0; i < 5; i++)
+ for (i = 0; i < 6; i++)
archive->column_types[i] = types[i];
char *names[]= {(_("Compressed")),(_("Size")),(_("Ratio"))};
@@ -132,6 +132,6 @@
if (basename == NULL)
basename = g_strdup(filename);
- entry = xa_set_archive_entries_for_each_row (archive,basename,FALSE,item);
+ entry = xa_set_archive_entries_for_each_row (archive,basename,item);
g_free(basename);
}
Modified: xarchiver/trunk/src/lha.c
===================================================================
--- xarchiver/trunk/src/lha.c 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/lha.c 2007-12-14 13:55:15 UTC (rev 26479)
@@ -116,7 +116,7 @@
line[(linesize- 1)] = '\0';
filename = line + 51;
- entry = xa_set_archive_entries_for_each_row (archive,filename,FALSE,item);
+ entry = xa_set_archive_entries_for_each_row (archive,filename,item);
}
gboolean isLha ( FILE *ptr )
Modified: xarchiver/trunk/src/mime.c
===================================================================
--- xarchiver/trunk/src/mime.c 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/mime.c 2007-12-14 13:55:15 UTC (rev 26479)
@@ -48,7 +48,8 @@
else if (strcmp(mime,"application/zip") == 0 || strcmp(mime,"application/x-rar") == 0 || strcmp(mime,"application/x-tar") == 0
|| strcmp(mime,"application/x-7z-compressed") == 0 || strcmp(mime,"application/x-bzip-compressed-tar") == 0
|| strcmp (mime,"application/x-compressed-tar") == 0 || strcmp (mime,"application/x-lha") == 0
- || strcmp (mime,"application/x-rpm") == 0 || strcmp (mime,"application/x-deb") == 0 )
+ || strcmp (mime,"application/x-rpm") == 0 || strcmp (mime,"application/x-deb") == 0
+ || strcmp (mime,"application/x-bzip") == 0 || strcmp (mime,"application/x-gzip") == 0)
icon_name = "package";
else if (strcmp(mime,"application/x-shockwave-flash") == 0 || strcmp(mime,"video/mpeg") == 0 || strcmp(mime,"video/quicktime") == 0
|| strcmp(mime,"video/x-msvideo") == 0 || strcmp(mime,"application/x-flash-video") == 0)
Modified: xarchiver/trunk/src/rar.c
===================================================================
--- xarchiver/trunk/src/rar.c 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/rar.c 2007-12-14 13:55:15 UTC (rev 26479)
@@ -195,7 +195,7 @@
g_free (filename);
filename = filename_with_slash;
}
- entry = xa_set_archive_entries_for_each_row (archive,filename,encrypted,item);
+ entry = xa_set_archive_entries_for_each_row (archive,filename,item);
if (entry != NULL)
entry->is_encrypted = encrypted;
g_free(filename);
Modified: xarchiver/trunk/src/rpm.c
===================================================================
--- xarchiver/trunk/src/rpm.c 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/rpm.c 2007-12-14 13:55:15 UTC (rev 26479)
@@ -249,7 +249,7 @@
filename = g_strdup(line + n);
}
- entry = xa_set_archive_entries_for_each_row (archive,filename,FALSE,item);
+ entry = xa_set_archive_entries_for_each_row (archive,filename,item);
g_free (filename);
}
Modified: xarchiver/trunk/src/tar.c
===================================================================
--- xarchiver/trunk/src/tar.c 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/tar.c 2007-12-14 13:55:15 UTC (rev 26479)
@@ -144,7 +144,7 @@
filename = g_strdup(line + n);
}
- entry = xa_set_archive_entries_for_each_row (archive,filename,FALSE,item);
+ entry = xa_set_archive_entries_for_each_row (archive,filename,item);
g_free(filename);
}
Modified: xarchiver/trunk/src/window.c
===================================================================
--- xarchiver/trunk/src/window.c 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/window.c 2007-12-14 13:55:15 UTC (rev 26479)
@@ -1962,7 +1962,7 @@
if (strlen(browser_path) == 0)
{
response = xa_show_message_dialog (GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_INFO,GTK_BUTTONS_OK,
- _("You didn't set which web browser to use!"),_("Please go to Preferences->Advanced and set it."));
+ _("You didn't set which browser to use!"),_("Please go to Preferences->Advanced and set it."));
g_free (browser_path);
return;
}
@@ -1982,14 +1982,14 @@
argv[2] = NULL;
screen = gtk_widget_get_screen (GTK_WIDGET (MainWindow));
- if (!gdk_spawn_on_screen (screen, NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error))
+ if (!gdk_spawn_on_screen (screen,NULL,argv,NULL,G_SPAWN_SEARCH_PATH,NULL,NULL,NULL,&error))
{
message = gtk_message_dialog_new (GTK_WINDOW (MainWindow),
GTK_DIALOG_MODAL
| GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
- _("Failed to launch the program!"));
+ _("Failed to launch the application!"));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message), "%s.", error->message);
gtk_dialog_run (GTK_DIALOG (message));
gtk_widget_destroy (message);
Modified: xarchiver/trunk/src/zip.c
===================================================================
--- xarchiver/trunk/src/zip.c 2007-12-14 10:21:25 UTC (rev 26478)
+++ xarchiver/trunk/src/zip.c 2007-12-14 13:55:15 UTC (rev 26479)
@@ -167,7 +167,7 @@
line[linesize-1] = '\0';
filename = line + n;
- entry = xa_set_archive_entries_for_each_row (archive,filename,encrypted,item);
+ entry = xa_set_archive_entries_for_each_row (archive,filename,item);
if (entry != NULL)
{
if (dir)
More information about the Xfce4-commits
mailing list