Index: fr-archive.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-archive.c,v
retrieving revision 1.55
diff -u -d -r1.55 fr-archive.c
--- fr-archive.c	8 Apr 2006 21:10:27 -0000	1.55
+++ fr-archive.c	16 Apr 2006 19:30:07 -0000
@@ -1516,6 +1516,28 @@
 
 	fr_command_set_n_files (command, g_list_length (file_list));
 
+	/* gather extraction status information */
+	
+	command->yet_extracted_size = 0;
+	command->extraction_size = 0;
+	command->files_to_extract = g_queue_new ();
+	for (scan = command->file_list; scan; scan = scan->next) {
+			FileData *fdata = scan->data;
+			if (file_list != NULL) {
+				GList *scan2 = file_list;
+				while (scan2 && (g_ascii_strcasecmp (shell_escape (fdata->original_path), (gchar*)scan2->data) != 0))
+					scan2 = scan2->next;
+				if (!scan2)
+					continue;
+			}
+			fdata = file_data_copy(scan->data);
+			gchar *extraction_path = g_build_filename (dest_dir, fdata->name, NULL);
+			g_free(fdata->full_path);
+			fdata->full_path = extraction_path;
+			g_queue_push_head (command->files_to_extract, fdata);
+			command->extraction_size = command->extraction_size + fdata->size;
+	}
+
 	if (file_list == NULL) {
 		fr_command_extract (command,
 				    file_list,
Index: fr-command.h
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-command.h,v
retrieving revision 1.11
diff -u -d -r1.11 fr-command.h
--- fr-command.h	27 Nov 2005 16:54:08 -0000	1.11
+++ fr-command.h	16 Apr 2006 19:30:07 -0000
@@ -74,6 +74,12 @@
 	int     n_file;
 	int     n_files;         /* used by the progress signal */
 
+	/* extraction status */
+	
+	int		extraction_size; /* size of all files after extraction */
+	int		yet_extracted_size;	/* size of the files yet extracted */
+	GQueue*	files_to_extract;	/* all files left to extract */
+
 	/*<private>*/
 
 	FRProcess *process;      /* the process object used to execute 
Index: window.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/window.c,v
retrieving revision 1.162
diff -u -d -r1.162 window.c
--- window.c	8 Apr 2006 21:10:27 -0000	1.162
+++ window.c	16 Apr 2006 19:30:15 -0000
@@ -1878,6 +1878,8 @@
 		return;
 
 	case FR_ACTION_EXTRACT:
+		g_queue_free(window->archive->command->files_to_extract);
+		
 		if (window->extracting_dragged_files) 
 			window->extracting_dragged_files = FALSE;
 
@@ -4903,8 +4905,19 @@
 {
 	FRWindow *window = data;
 
-	if (window->activity_ref > 0)
+	if (window->activity_ref > 0) {
 		fr_process_stop (window->archive->process);
+
+		/* free extraction status information */
+		if (window->archive->command->action == FR_ACTION_EXTRACT) {
+			GQueue *queue = window->archive->command->files_to_extract;
+			GList *scan = queue->head;
+			for (; scan; scan = scan->next)
+				file_data_free ((FileData*)scan->data);
+			g_queue_free (queue);
+			window->archive->command->files_to_extract = NULL;
+		}
+	}
 }
 
 
@@ -5245,7 +5258,36 @@
 activity_cb (gpointer data)
 {
 	FRWindow *window = data;
-	
+	FRCommand *command = window->archive->command;
+
+	/* set progressbar to the extraction status */
+	if ((command->action == FR_ACTION_EXTRACT) && (command->files_to_extract != NULL) 
+	&& !g_queue_is_empty (command->files_to_extract)) {
+		gdouble fraction;
+		GnomeVFSFileInfo* file_info = gnome_vfs_file_info_new ();
+		FileData *file = g_queue_peek_head (command->files_to_extract);
+
+		if (gnome_vfs_get_file_info (file->full_path,
+				file_info, GNOME_VFS_FILE_INFO_DEFAULT) != GNOME_VFS_OK)
+				return TRUE;
+
+		if (file_info->size == file->size) {
+			file_data_free(file);
+			g_queue_pop_head (command->files_to_extract);
+			command->yet_extracted_size = command->yet_extracted_size + file->size;
+			fraction = (gdouble)command->yet_extracted_size / (gdouble)command->extraction_size;
+		} else
+			fraction = (gdouble)(command->yet_extracted_size + file_info->size) / (gdouble)command->extraction_size;
+n+		g_free (file_info);
+
+		if (window->pd_progress_bar != NULL)
+			gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (window->pd_progress_bar), fraction);
+		gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (window->progress_bar), fraction);
+
+		return TRUE;
+	}
+
 	if ((window->pd_progress_bar != NULL) && window->progress_pulse)
 		gtk_progress_bar_pulse (GTK_PROGRESS_BAR (window->pd_progress_bar)); 
 	if (window->progress_pulse)
