Author: colossus
Date: 2007-08-10 20:40:26 +0000 (Fri, 10 Aug 2007)
New Revision: 25963
Modified:
xarchiver/trunk/src/main.c
xarchiver/trunk/src/rar.c
xarchiver/trunk/src/window.c
Log:
Fixed missed display of number of files and content size in rar archives
properties.
Fixed "Gtk-CRITICAL **: gtk_file_system_unix_get_info: assertion
`g_path_is_absolute (filename)' failed" error.
Fixed missed archive path in archive properties dialog when the path is
../filename.xxx
Modified: xarchiver/trunk/src/main.c
===================================================================
--- xarchiver/trunk/src/main.c 2007-08-10 20:14:11 UTC (rev 25962)
+++ xarchiver/trunk/src/main.c 2007-08-10 20:40:26 UTC (rev 25963)
@@ -244,6 +244,11 @@
{
gchar *dummy = g_strdup(argv[1]);
current_open_directory = g_path_get_dirname (dummy);
+ if (strcmp(current_open_directory,"..") == 0)
+ {
+ g_free (current_open_directory);
+ current_open_directory = g_get_current_dir();
+ }
xa_open_archive ( NULL , dummy );
}
#ifdef HAVE_SOCKET
Modified: xarchiver/trunk/src/rar.c
===================================================================
--- xarchiver/trunk/src/rar.c 2007-08-10 20:14:11 UTC (rev 25962)
+++ xarchiver/trunk/src/rar.c 2007-08-10 20:40:26 UTC (rev 25963)
@@ -113,6 +113,7 @@
for(; n < linesize && line[n] != ' '; n++);
line[n]='\0';
item[i] = line + a;
+ archive->dummy_size += strtoll(item[i],NULL,0);
i++;
n++;
@@ -159,6 +160,8 @@
line[n] = '\0';
if ((line+a)[0] == 'd')
dir = TRUE;
+ else
+ archive->nr_of_files++;
item[i] = line + a;
i++;
n++;
Modified: xarchiver/trunk/src/window.c
===================================================================
--- xarchiver/trunk/src/window.c 2007-08-10 20:14:11 UTC (rev 25962)
+++ xarchiver/trunk/src/window.c 2007-08-10 20:40:26 UTC (rev 25963)
@@ -1554,13 +1554,14 @@
g_free (utf8_string);
//Path
dummy_string = remove_level_from_path (archive[idx]->path);
- if ( strlen(dummy_string) != 0)
+ if (strlen(dummy_string) == 0 || strcmp(dummy_string,"..") == 0)
+ utf8_string = g_filename_display_name (g_get_current_dir ());
+ else
utf8_string = g_filename_display_name (dummy_string);
- else
- utf8_string = g_filename_display_name ( g_get_current_dir () );
+ g_free ( dummy_string );
+
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[idx]->format );
//Modified Date
@@ -2203,7 +2204,7 @@
gint current_page;
gint idx;
- parent = xa_get_parent_dir ((const gchar*)gtk_entry_get_text(entry));
+ parent = xa_get_parent_dir (gtk_entry_get_text(entry));
current_page = gtk_notebook_get_current_page(notebook);
idx = xa_find_archive_index (current_page);
g_print ("parent: %s\t loc.entry:
%s\n",parent,archive[idx]->location_entry_path);
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits