[file-roller] respect the --notify option when the extraction is complete



commit f26f6593aa06bc6b4cc15d343745cc924d200b57
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Nov 14 09:24:37 2012 +0100

    respect the --notify option when the extraction is complete

 src/fr-window.c |    6 ++++--
 src/main.c      |    5 ++++-
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index f1edda9..abcf821 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -6429,8 +6429,10 @@ archive_extraction_ready_cb (GObject      *source_object,
 	fr_archive_operation_finish (FR_ARCHIVE (source_object), result, &error);
 	_archive_operation_completed (window, FR_ACTION_EXTRACTING_FILES, error);
 
-	if ((error == NULL) && ask_to_open_destination)
+	if ((error == NULL) && ask_to_open_destination) {
+		window->priv->quit_with_progress_dialog = window->priv->batch_mode;
 		open_progress_dialog_with_open_destination (window);
+	}
 	else if ((error == NULL) && ! batch_mode && ! gtk_window_has_toplevel_focus (GTK_WINDOW (window->priv->progress_dialog)))
 		gtk_window_present (GTK_WINDOW (window));
 
@@ -9257,7 +9259,7 @@ fr_window_exec_batch_action (FrWindow      *window,
 					   edata->skip_older,
 					   edata->overwrite,
 					   edata->junk_paths,
-					   TRUE);
+					   ! window->priv->batch_mode || window->priv->notify);
 		break;
 
 	case FR_BATCH_ACTION_EXTRACT_HERE:
diff --git a/src/main.c b/src/main.c
index 539ddfa..5602b31 100644
--- a/src/main.c
+++ b/src/main.c
@@ -826,7 +826,10 @@ fr_application_command_line (GApplication            *application,
 
 			g_object_unref (file);
 		}
-		fr_window_append_batch_action (FR_WINDOW (window), FR_BATCH_ACTION_QUIT, NULL, NULL);
+		if (! arg_notify)
+			fr_window_append_batch_action (FR_WINDOW (window), FR_BATCH_ACTION_QUIT, NULL, NULL);
+		else
+			fr_window_set_notify (FR_WINDOW (window), TRUE);
 
 		fr_window_start_batch (FR_WINDOW (window));
 	}



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