summaryrefslogtreecommitdiff
path: root/src/fr-command-rar.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-21 16:35:18 +0100
committerinfirit <[email protected]>2014-11-22 20:25:30 +0100
commit37badab513ccac69db427207c1cd38ee57997449 (patch)
tree7cffd3a0579d28eb631923a2c561119a2084fc00 /src/fr-command-rar.c
parent012914111652a7ee64abe08f457cd9eb77bc5f35 (diff)
downloadengrampa-37badab513ccac69db427207c1cd38ee57997449.tar.bz2
engrampa-37badab513ccac69db427207c1cd38ee57997449.tar.xz
progress dialog: show the number of remaining files to complete the operation
instead of the name of the file added/removed/extracted. Based on FR commit: bf2b5d2352cfcd9d4345dda7976208672838dce1 From: Paolo Bacchilega <[email protected]>
Diffstat (limited to 'src/fr-command-rar.c')
-rw-r--r--src/fr-command-rar.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/src/fr-command-rar.c b/src/fr-command-rar.c
index bc84229..a2236b1 100644
--- a/src/fr-command-rar.c
+++ b/src/fr-command-rar.c
@@ -349,43 +349,14 @@ fr_command_rar_list (FrCommand *comm)
}
-static char Progress_Message[4196];
-static char Progress_Filename[4096];
-
-
static void
parse_progress_line (FrCommand *comm,
const char *prefix,
const char *message_prefix,
const char *line)
{
- int prefix_len;
-
- prefix_len = strlen (prefix);
- if (strncmp (line, prefix, prefix_len) == 0) {
- double fraction;
- int len;
- char *b_idx;
-
- strcpy (Progress_Filename, line + prefix_len);
-
- /* when a new volume is created a sequence of backspaces is
- * issued, remove the backspaces from the filename */
- b_idx = strchr (Progress_Filename, '\x08');
- if (b_idx != NULL)
- *b_idx = 0;
-
- /* remove the OK at the end of the filename */
- len = strlen (Progress_Filename);
- if ((len > 5) && (strncmp (Progress_Filename + len - 5, " OK ", 5) == 0))
- Progress_Filename[len - 5] = 0;
-
- sprintf (Progress_Message, "%s%s", message_prefix, file_name_from_path (Progress_Filename));
- fr_command_message (comm, Progress_Message);
-
- fraction = (double) ++comm->n_file / (comm->n_files + 1);
- fr_command_progress (comm, fraction);
- }
+ if (strncmp (line, prefix, strlen (prefix)) == 0)
+ fr_command_progress (comm, (double) ++comm->n_file / (comm->n_files + 1));
}