[file-roller] extract here is just extract to the parent folder



commit 49eafccfea6776a9e62eef29c4da0e791cb21aaa
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sat Dec 19 16:26:23 2015 +0100

    extract here is just extract to the parent folder
    
    this allows to ask for overwrite confirmation even when using
    'extract here'.

 src/fr-window.c |   40 +++++++++++-----------------------------
 1 files changed, 11 insertions(+), 29 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index 6942682..5da3dc0 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -6793,37 +6793,19 @@ fr_window_archive_extract_here (FrWindow   *window,
                                gboolean    junk_paths,
                                gboolean    ask_to_open_destination)
 {
-       ExtractData *edata;
-
-       edata = extract_data_new (window,
-                                 NULL,
-                                 NULL,
-                                 NULL,
-                                 skip_older,
-                                 overwrite,
-                                 junk_paths,
-                                 TRUE,
-                                 ask_to_open_destination);
-       fr_window_set_current_batch_action (window,
-                                           FR_BATCH_ACTION_EXTRACT,
-                                           edata,
-                                           (GFreeFunc) extract_data_free);
-
-       if (archive_is_encrypted (window, NULL) && (window->priv->password == NULL)) {
-               dlg_ask_password (window);
-               return;
-       }
+       GFile *destination;
 
-       _archive_operation_started (window, FR_ACTION_EXTRACTING_FILES);
+       destination = g_file_get_parent (fr_archive_get_file (window->archive));
+       fr_window_archive_extract (window,
+                                  NULL,
+                                  destination,
+                                  NULL,
+                                  skip_older,
+                                  overwrite,
+                                  junk_paths,
+                                  ask_to_open_destination);
 
-       fr_archive_extract_here (window->archive,
-                                edata->skip_older,
-                                edata->overwrite,
-                                edata->junk_paths,
-                                window->priv->password,
-                                window->priv->cancellable,
-                                archive_extraction_ready_cb,
-                                edata);
+       g_object_unref (destination);
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]