a9a4ddd6f2
Add upstream bug fix patches OBS-URL: https://build.opensuse.org/request/show/459017 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/file-roller?expand=0&rev=235
120 lines
4.8 KiB
Diff
120 lines
4.8 KiB
Diff
From 347a917c0504a9c5ccfd0b8041e40d56ec9bd74a Mon Sep 17 00:00:00 2001
|
|
From: Paolo Bacchilega <paobac@src.gnome.org>
|
|
Date: Sat, 18 Feb 2017 09:24:18 +0100
|
|
Subject: show the 'open destination' dialog only when using --notify
|
|
|
|
and only for the last extracted archive
|
|
---
|
|
src/fr-application.c | 13 ++++++++-----
|
|
src/fr-window.c | 10 ++++++----
|
|
src/fr-window.h | 8 +++++---
|
|
3 files changed, 19 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/src/fr-application.c b/src/fr-application.c
|
|
index 98aac18..025c775 100644
|
|
--- a/src/fr-application.c
|
|
+++ b/src/fr-application.c
|
|
@@ -296,7 +296,7 @@ handle_method_call (GDBusConnection *connection,
|
|
g_signal_connect (window, "ready", G_CALLBACK (window_ready_cb), invocation);
|
|
|
|
fr_window_batch_new (FR_WINDOW (window), C_("Window title", "Extract archive"));
|
|
- fr_window_batch__extract (FR_WINDOW (window), archive, destination);
|
|
+ fr_window_batch__extract (FR_WINDOW (window), archive, destination, use_progress_dialog);
|
|
fr_window_batch_append_action (FR_WINDOW (window), FR_BATCH_ACTION_QUIT, NULL, NULL);
|
|
fr_window_batch_start (FR_WINDOW (window));
|
|
|
|
@@ -322,7 +322,7 @@ handle_method_call (GDBusConnection *connection,
|
|
g_signal_connect (window, "ready", G_CALLBACK (window_ready_cb), invocation);
|
|
|
|
fr_window_batch_new (FR_WINDOW (window), C_("Window title", "Extract archive"));
|
|
- fr_window_batch__extract_here (FR_WINDOW (window), archive);
|
|
+ fr_window_batch__extract_here (FR_WINDOW (window), archive, use_progress_dialog);
|
|
fr_window_batch_append_action (FR_WINDOW (window), FR_BATCH_ACTION_QUIT, NULL, NULL);
|
|
fr_window_batch_start (FR_WINDOW (window));
|
|
|
|
@@ -604,13 +604,16 @@ fr_application_command_line (GApplication *application,
|
|
|
|
fr_window_batch_new (FR_WINDOW (window), C_("Window title", "Extract archive"));
|
|
while ((archive = remaining_args[i++]) != NULL) {
|
|
- GFile *file;
|
|
+ GFile *file;
|
|
+ gboolean last_archive;
|
|
|
|
file = g_application_command_line_create_file_for_arg (command_line, archive);
|
|
+ last_archive = (remaining_args[i] == NULL);
|
|
+
|
|
if (arg_extract_here == 1)
|
|
- fr_window_batch__extract_here (FR_WINDOW (window), file);
|
|
+ fr_window_batch__extract_here (FR_WINDOW (window), file, arg_notify && last_archive);
|
|
else
|
|
- fr_window_batch__extract (FR_WINDOW (window), file, extraction_destination);
|
|
+ fr_window_batch__extract (FR_WINDOW (window), file, extraction_destination, arg_notify && last_archive);
|
|
|
|
g_object_unref (file);
|
|
}
|
|
diff --git a/src/fr-window.c b/src/fr-window.c
|
|
index 1fd803b..bbddde7 100644
|
|
--- a/src/fr-window.c
|
|
+++ b/src/fr-window.c
|
|
@@ -9819,7 +9819,8 @@ fr_window_batch_get_title (FrWindow *window)
|
|
|
|
void
|
|
fr_window_batch__extract_here (FrWindow *window,
|
|
- GFile *archive)
|
|
+ GFile *archive,
|
|
+ gboolean ask_to_open_destination)
|
|
{
|
|
g_return_if_fail (window != NULL);
|
|
g_return_if_fail (archive != NULL);
|
|
@@ -9837,7 +9838,7 @@ fr_window_batch__extract_here (FrWindow *window,
|
|
FALSE,
|
|
FR_OVERWRITE_ASK,
|
|
FALSE,
|
|
- _fr_window_get_ask_to_open_destination (window),
|
|
+ ask_to_open_destination,
|
|
TRUE),
|
|
(GFreeFunc) extract_data_free);
|
|
fr_window_batch_append_action (window,
|
|
@@ -9850,7 +9851,8 @@ fr_window_batch__extract_here (FrWindow *window,
|
|
void
|
|
fr_window_batch__extract (FrWindow *window,
|
|
GFile *archive,
|
|
- GFile *destination)
|
|
+ GFile *destination,
|
|
+ gboolean ask_to_open_destination)
|
|
{
|
|
g_return_if_fail (window != NULL);
|
|
g_return_if_fail (archive != NULL);
|
|
@@ -9869,7 +9871,7 @@ fr_window_batch__extract (FrWindow *window,
|
|
FALSE,
|
|
FR_OVERWRITE_ASK,
|
|
FALSE,
|
|
- _fr_window_get_ask_to_open_destination (window),
|
|
+ ask_to_open_destination,
|
|
FALSE),
|
|
(GFreeFunc) extract_data_free);
|
|
else
|
|
diff --git a/src/fr-window.h b/src/fr-window.h
|
|
index 4ea0f4e..7bbffec 100644
|
|
--- a/src/fr-window.h
|
|
+++ b/src/fr-window.h
|
|
@@ -306,10 +306,12 @@ void fr_window_batch_resume (FrWindow *window);
|
|
gboolean fr_window_is_batch_mode (FrWindow *window);
|
|
void fr_window_batch__extract (FrWindow *window,
|
|
GFile *archive,
|
|
- GFile *destination);
|
|
+ GFile *destination,
|
|
+ gboolean ask_to_open_destination);
|
|
void fr_window_batch__extract_here (FrWindow *window,
|
|
- GFile *archive);
|
|
-void fr_window_batch__add_files (FrWindow *window,
|
|
+ GFile *archive,
|
|
+ gboolean ask_to_open_destination);
|
|
+void fr_window_batch__add_files (FrWindow *window,
|
|
GFile *archive,
|
|
GList *file_list);
|
|
void fr_window_destroy_with_error_dialog (FrWindow *window);
|
|
--
|
|
cgit v0.12
|
|
|