Author: colossus
Date: 2006-07-12 13:30:54 +0000 (Wed, 12 Jul 2006)
New Revision: 22421
Modified:
xarchiver/trunk/src/7zip.c
xarchiver/trunk/src/archive.h
xarchiver/trunk/src/arj.c
xarchiver/trunk/src/bzip2.c
xarchiver/trunk/src/callbacks.c
xarchiver/trunk/src/gzip.c
xarchiver/trunk/src/interface.c
xarchiver/trunk/src/interface.h
xarchiver/trunk/src/iso.c
xarchiver/trunk/src/rar.c
xarchiver/trunk/src/rpm.c
xarchiver/trunk/src/tar.c
xarchiver/trunk/src/zip.c
Log:
Added the archive format type in the archive properties window.
Modified: xarchiver/trunk/src/7zip.c
===================================================================
--- xarchiver/trunk/src/7zip.c 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/7zip.c 2006-07-12 13:30:54 UTC (rev 22421)
@@ -25,6 +25,7 @@
archive->dummy_size = 0;
archive->nr_of_files = 0;
archive->nr_of_dirs = 0;
+ archive->format ="7-ZIP";
archive->parse_output = SevenZipOpen;
SpawnAsyncProcess ( archive , command , 0, 0);
g_free ( command );
Modified: xarchiver/trunk/src/archive.h
===================================================================
--- xarchiver/trunk/src/archive.h 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/archive.h 2006-07-12 13:30:54 UTC (rev 22421)
@@ -57,6 +57,7 @@
gchar *path;
gchar *escaped_path;
gchar *tmp;
+ gchar *format;
gboolean has_passwd;
gboolean add_recurse;
gboolean overwrite;
Modified: xarchiver/trunk/src/arj.c
===================================================================
--- xarchiver/trunk/src/arj.c 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/arj.c 2006-07-12 13:30:54 UTC (rev 22421)
@@ -27,6 +27,7 @@
archive->nr_of_files = 0;
archive->nr_of_dirs = 0;
archive->parse_output = ArjOpen;
+ archive->format ="ARJ";
SpawnAsyncProcess ( archive , command , 0, 0);
g_free ( command );
if ( archive->child_pid == 0 )
Modified: xarchiver/trunk/src/bzip2.c
===================================================================
--- xarchiver/trunk/src/bzip2.c 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/bzip2.c 2006-07-12 13:30:54 UTC (rev 22421)
@@ -33,17 +33,18 @@
{
if ( g_str_has_suffix ( archive->escaped_path , ".tar.bz2") ||
g_str_has_suffix ( archive->escaped_path , ".tar.bz") || g_str_has_suffix (
archive->escaped_path , ".tbz") || g_str_has_suffix ( archive->escaped_path ,
".tbz2" ) )
{
- gchar *command;
- gchar *tar;
+ gchar *command;
+ gchar *tar;
- tar = g_find_program_in_path ("gtar");
- if (tar == NULL)
- tar = g_strdup ("tar");
+ tar = g_find_program_in_path ("gtar");
+ if (tar == NULL)
+ tar = g_strdup ("tar");
- command = g_strconcat (tar, " tfjv " , archive->escaped_path, NULL );
- archive->dummy_size = 0;
+ command = g_strconcat (tar, " tfjv " , archive->escaped_path,
NULL );
+ archive->dummy_size = 0;
archive->nr_of_files = 0;
archive->nr_of_dirs = 0;
+ archive->format = "TAR.BZIP2";
archive->parse_output = TarOpen;
SpawnAsyncProcess ( archive , command , 0, 0);
@@ -59,8 +60,11 @@
xa_create_liststore ( 6, names , (GType *)types );
archive->type = XARCHIVETYPE_TAR_BZ2;
}
- else
+ else
+ {
Bzip2Extract ( archive , 0 );
+ archive->format ="BZIP2";
+ }
}
void Bzip2Extract ( XArchive *archive , gboolean flag )
Modified: xarchiver/trunk/src/callbacks.c
===================================================================
--- xarchiver/trunk/src/callbacks.c 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/callbacks.c 2006-07-12 13:30:54 UTC (rev 22421)
@@ -1298,6 +1298,8 @@
gtk_entry_set_text ( GTK_ENTRY (path_data), utf8_string );
g_free ( utf8_string );
g_free ( dummy_string );
+ //Type
+ gtk_entry_set_text ( GTK_ENTRY (type_data), archive->format );
//Modified Date
strftime (date, 64, "%c", localtime (&my_stat.st_mtime) );
t = g_locale_to_utf8 ( date, -1, 0, 0, 0);
Modified: xarchiver/trunk/src/gzip.c
===================================================================
--- xarchiver/trunk/src/gzip.c 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/gzip.c 2006-07-12 13:30:54 UTC (rev 22421)
@@ -34,10 +34,11 @@
if (tar == NULL)
tar = g_strdup ("tar");
- command = g_strconcat (tar, " tzvf " , archive->escaped_path, NULL );
- archive->dummy_size = 0;
+ command = g_strconcat (tar, " tzvf " , archive->escaped_path,
NULL );
+ archive->dummy_size = 0;
archive->nr_of_files = 0;
archive->nr_of_dirs = 0;
+ archive->format ="TAR.GZIP";
archive->parse_output = TarOpen;
SpawnAsyncProcess ( archive , command , 0, 0);
@@ -54,7 +55,10 @@
archive->type = XARCHIVETYPE_TAR_GZ;
}
else
+ {
+ archive->format ="GZIP";
Bzip2Extract ( archive , 1 );
+ }
}
Modified: xarchiver/trunk/src/interface.c
===================================================================
--- xarchiver/trunk/src/interface.c 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/interface.c 2006-07-12 13:30:54 UTC (rev 22421)
@@ -495,7 +495,7 @@
gtk_window_set_modal (GTK_WINDOW (archive_properties_window), TRUE);
gtk_window_set_type_hint (GTK_WINDOW (archive_properties_window),
GDK_WINDOW_TYPE_HINT_UTILITY);
- table1 = gtk_table_new (8, 2, TRUE);
+ table1 = gtk_table_new (9, 2, TRUE);
gtk_widget_show (table1);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG
(archive_properties_window)->vbox), table1);
gtk_table_set_row_spacings (GTK_TABLE (table1), 6);
@@ -517,10 +517,18 @@
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
0, 0);
gtk_misc_set_alignment (GTK_MISC (path_label), 0.99, 0.5);
+ type_label = gtk_label_new ("");
+ set_label ( type_label , _("Type:"));
+ gtk_widget_show (type_label);
+ gtk_table_attach (GTK_TABLE (table1), type_label, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
0, 0);
+ gtk_misc_set_alignment (GTK_MISC (type_label), 0.99, 0.5);
+
modified_label = gtk_label_new ("");
set_label ( modified_label , _("Modified on:"));
gtk_widget_show (modified_label);
- gtk_table_attach (GTK_TABLE (table1), modified_label, 0, 1, 2, 3,
+ gtk_table_attach (GTK_TABLE (table1), modified_label, 0, 1, 3, 4,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
0, 0);
gtk_misc_set_alignment (GTK_MISC (modified_label), 0.99, 0.5);
@@ -528,7 +536,7 @@
size_label = gtk_label_new ("");
set_label ( size_label , _("Archive size:"));
gtk_widget_show (size_label);
- gtk_table_attach (GTK_TABLE (table1), size_label, 0, 1, 3, 4,
+ gtk_table_attach (GTK_TABLE (table1), size_label, 0, 1, 4, 5,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
0, 0);
gtk_misc_set_alignment (GTK_MISC (size_label), 0.99, 0.5);
@@ -536,7 +544,7 @@
content_label = gtk_label_new ("");
set_label ( content_label , _("Content size:"));
gtk_widget_show (content_label);
- gtk_table_attach (GTK_TABLE (table1), content_label, 0, 1, 4, 5,
+ gtk_table_attach (GTK_TABLE (table1), content_label, 0, 1, 5, 6,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
0, 0);
gtk_misc_set_alignment (GTK_MISC (content_label), 0.99, 0.5);
@@ -544,7 +552,7 @@
compression_label = gtk_label_new ("");
set_label ( compression_label , _("Compression ratio:"));
gtk_widget_show (compression_label);
- gtk_table_attach (GTK_TABLE (table1), compression_label, 0, 1, 7, 8,
+ gtk_table_attach (GTK_TABLE (table1), compression_label, 0, 1, 8, 9,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
0, 0);
gtk_misc_set_alignment (GTK_MISC (compression_label), 0.99, 0.5);
@@ -552,7 +560,7 @@
number_of_files_label = gtk_label_new ("");
set_label ( number_of_files_label , _("Number of files:"));
gtk_widget_show (number_of_files_label);
- gtk_table_attach (GTK_TABLE (table1), number_of_files_label, 0, 1, 5, 6,
+ gtk_table_attach (GTK_TABLE (table1), number_of_files_label, 0, 1, 6, 7,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
0, 0);
gtk_misc_set_alignment (GTK_MISC (number_of_files_label), 0.99, 0.5);
@@ -560,7 +568,7 @@
number_of_dirs_label = gtk_label_new ("");
set_label ( number_of_dirs_label , _("Number of dirs:"));
gtk_widget_show (number_of_dirs_label);
- gtk_table_attach (GTK_TABLE (table1), number_of_dirs_label, 0, 1, 6, 7,
+ gtk_table_attach (GTK_TABLE (table1), number_of_dirs_label, 0, 1, 7, 8,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
0, 0);
gtk_misc_set_alignment (GTK_MISC (number_of_dirs_label), 0.99, 0.5);
@@ -569,7 +577,7 @@
gtk_editable_set_editable (GTK_EDITABLE (compression_data), FALSE);
gtk_entry_set_has_frame (GTK_ENTRY (compression_data), FALSE);
gtk_widget_show (compression_data);
- gtk_table_attach (GTK_TABLE (table1), compression_data, 1, 2, 7, 8,
+ gtk_table_attach (GTK_TABLE (table1), compression_data, 1, 2, 8, 9,
(GtkAttachOptions) (GTK_FILL | GTK_EXPAND),
(GtkAttachOptions) (0), 0, 0);
@@ -577,7 +585,7 @@
gtk_editable_set_editable (GTK_EDITABLE (number_of_dirs_data), FALSE);
gtk_entry_set_has_frame (GTK_ENTRY (number_of_dirs_data), FALSE);
gtk_widget_show (number_of_dirs_data);
- gtk_table_attach (GTK_TABLE (table1), number_of_dirs_data, 1, 2, 6, 7,
+ gtk_table_attach (GTK_TABLE (table1), number_of_dirs_data, 1, 2, 7, 8,
(GtkAttachOptions) (GTK_FILL | GTK_EXPAND),
(GtkAttachOptions) (0), 0, 0);
@@ -585,7 +593,7 @@
gtk_editable_set_editable (GTK_EDITABLE (number_of_files_data), FALSE);
gtk_entry_set_has_frame (GTK_ENTRY (number_of_files_data), FALSE);
gtk_widget_show (number_of_files_data);
- gtk_table_attach (GTK_TABLE (table1), number_of_files_data, 1, 2, 5, 6,
+ gtk_table_attach (GTK_TABLE (table1), number_of_files_data, 1, 2, 6, 7,
(GtkAttachOptions) (GTK_FILL | GTK_EXPAND),
(GtkAttachOptions) (0), 0, 0);
@@ -593,7 +601,7 @@
gtk_editable_set_editable (GTK_EDITABLE (content_data), FALSE);
gtk_entry_set_has_frame (GTK_ENTRY (content_data), FALSE);
gtk_widget_show (content_data);
- gtk_table_attach (GTK_TABLE (table1), content_data, 1, 2, 4, 5,
+ gtk_table_attach (GTK_TABLE (table1), content_data, 1, 2, 5, 6,
(GtkAttachOptions) (GTK_FILL | GTK_EXPAND),
(GtkAttachOptions) (0), 0, 0);
@@ -601,18 +609,26 @@
gtk_editable_set_editable (GTK_EDITABLE (size_data), FALSE);
gtk_entry_set_has_frame (GTK_ENTRY (size_data), FALSE);
gtk_widget_show (size_data);
- gtk_table_attach (GTK_TABLE (table1), size_data, 1, 2, 3, 4,
+ gtk_table_attach (GTK_TABLE (table1), size_data, 1, 2, 4, 5,
(GtkAttachOptions) (GTK_FILL | GTK_EXPAND),
(GtkAttachOptions) (0), 0, 0);
modified_data = gtk_entry_new ();
gtk_widget_show (modified_data);
- gtk_table_attach (GTK_TABLE (table1), modified_data, 1, 2, 2, 3,
+ gtk_table_attach (GTK_TABLE (table1), modified_data, 1, 2, 3, 4,
(GtkAttachOptions) (GTK_FILL | GTK_EXPAND),
(GtkAttachOptions) (0), 0, 0);
gtk_editable_set_editable (GTK_EDITABLE (modified_data), FALSE);
gtk_entry_set_has_frame (GTK_ENTRY (modified_data), FALSE);
+ type_data = gtk_entry_new ();
+ gtk_editable_set_editable (GTK_EDITABLE (type_data), FALSE);
+ gtk_entry_set_has_frame (GTK_ENTRY (type_data), FALSE);
+ gtk_widget_show (type_data);
+ gtk_table_attach (GTK_TABLE (table1), type_data, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_FILL | GTK_EXPAND),
+ (GtkAttachOptions) (0), 0, 0);
+
path_data = gtk_entry_new ();
gtk_editable_set_editable (GTK_EDITABLE (path_data), FALSE);
gtk_entry_set_has_frame (GTK_ENTRY (path_data), FALSE);
Modified: xarchiver/trunk/src/interface.h
===================================================================
--- xarchiver/trunk/src/interface.h 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/interface.h 2006-07-12 13:30:54 UTC (rev 22421)
@@ -44,6 +44,7 @@
GtkWidget *number_of_files_label;
GtkWidget *number_of_dirs_label;
GtkWidget *name_label;
+GtkWidget *type_label;
GtkWidget *compression_data;
GtkWidget *number_of_files_data;
GtkWidget *number_of_dirs_data;
@@ -51,6 +52,7 @@
GtkWidget *size_data;
GtkWidget *modified_data;
GtkWidget *path_data;
+GtkWidget *type_data;
GtkWidget *name_data;
GtkWidget *separatormenuitem1;
GtkWidget *separatormenuitem2;
Modified: xarchiver/trunk/src/iso.c
===================================================================
--- xarchiver/trunk/src/iso.c 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/iso.c 2006-07-12 13:30:54 UTC (rev 22421)
@@ -554,6 +554,7 @@
archive->dummy_size = 0;
archive->nr_of_files = 0;
archive->nr_of_dirs = 0;
+ archive->format ="ISO";
char *names[]=
{(_("Filename")),(_("Permission")),(_("Size")),(_("Date")),(_("Offset"))};
GType types[]=
{G_TYPE_STRING,G_TYPE_STRING,G_TYPE_UINT64,G_TYPE_STRING,G_TYPE_UINT64};
xa_create_liststore ( 5, names , (GType *)types );
Modified: xarchiver/trunk/src/rar.c
===================================================================
--- xarchiver/trunk/src/rar.c 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/rar.c 2006-07-12 13:30:54 UTC (rev 22421)
@@ -26,6 +26,7 @@
archive->nr_of_files = 0;
archive->nr_of_dirs = 0;
archive->parse_output = RarOpen;
+ archive->format ="RAR";
SpawnAsyncProcess ( archive , command , 0, 0);
g_free ( command );
if ( archive->child_pid == 0 )
Modified: xarchiver/trunk/src/rpm.c
===================================================================
--- xarchiver/trunk/src/rpm.c 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/rpm.c 2006-07-12 13:30:54 UTC (rev 22421)
@@ -49,6 +49,7 @@
archive->dummy_size = 0;
archive->nr_of_files = 0;
archive->nr_of_dirs = 0;
+ archive->format ="RPM";
char *names[]= {(_("Filename")),(_("Permission")),(_("Hard
Link")),(_("Owner")),(_("Group")),(_("Size"))};
GType types[]=
{G_TYPE_STRING,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_UINT64};
xa_create_liststore ( 6, names , (GType *)types );
Modified: xarchiver/trunk/src/tar.c
===================================================================
--- xarchiver/trunk/src/tar.c 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/tar.c 2006-07-12 13:30:54 UTC (rev 22421)
@@ -23,16 +23,17 @@
void OpenTar ( XArchive *archive )
{
gchar *command;
- gchar *tar;
+ gchar *tar;
- tar = g_find_program_in_path ("gtar");
- if (tar == NULL)
- tar = g_strdup ("tar");
+ tar = g_find_program_in_path ("gtar");
+ if (tar == NULL)
+ tar = g_strdup ("tar");
- command = g_strconcat (tar, " tfv " , archive->escaped_path, NULL);
+ command = g_strconcat (tar, " tfv " , archive->escaped_path, NULL);
archive->dummy_size = 0;
- archive->nr_of_files = 0;
- archive->nr_of_dirs = 0;
+ archive->nr_of_files = 0;
+ archive->nr_of_dirs = 0;
+ archive->format ="TAR";
archive->parse_output = TarOpen;
SpawnAsyncProcess ( archive , command , 0, 0);
Modified: xarchiver/trunk/src/zip.c
===================================================================
--- xarchiver/trunk/src/zip.c 2006-07-12 12:54:19 UTC (rev 22420)
+++ xarchiver/trunk/src/zip.c 2006-07-12 13:30:54 UTC (rev 22421)
@@ -26,6 +26,7 @@
archive->nr_of_files = 0;
archive->nr_of_dirs = 0;
archive->parse_output = ZipOpen;
+ archive->format ="ZIP";
SpawnAsyncProcess ( archive , command , 0, 0);
g_free ( command );
if ( archive->child_pid == 0 )
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits