From 8d957d2962c84c293c00c9445f5fce296eb90aed Mon Sep 17 00:00:00 2001 From: ZenWalker Date: Mon, 22 May 2017 01:54:43 +0200 Subject: Add the button "Show the Files and Quit" in the progress dialog New feature Fixes #146 --- src/fr-window.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/fr-window.c') diff --git a/src/fr-window.c b/src/fr-window.c index 0b9a171..79e16ab 100644 --- a/src/fr-window.c +++ b/src/fr-window.c @@ -166,6 +166,7 @@ typedef enum { DIALOG_RESPONSE_NONE = 1, DIALOG_RESPONSE_OPEN_ARCHIVE, DIALOG_RESPONSE_OPEN_DESTINATION_FOLDER, + DIALOG_RESPONSE_OPEN_DESTINATION_FOLDER_AND_QUIT, DIALOG_RESPONSE_QUIT } DialogResponse; @@ -364,6 +365,7 @@ struct _FrWindowPrivateData { GtkWidget *pd_close_button; GtkWidget *pd_open_archive_button; GtkWidget *pd_open_destination_button; + GtkWidget *pd_open_destination_and_quit_button; GtkWidget *pd_quit_button; GtkWidget *pd_icon; gboolean progress_pulse; @@ -2309,6 +2311,11 @@ progress_dialog_response (GtkDialog *dialog, fr_window_view_extraction_destination_folder (window); close_progress_dialog (window, TRUE); break; + case DIALOG_RESPONSE_OPEN_DESTINATION_FOLDER_AND_QUIT: + fr_window_view_extraction_destination_folder (window); + close_progress_dialog (window, TRUE); + fr_window_close (window); + break; case DIALOG_RESPONSE_QUIT: fr_window_close (window); break; @@ -2521,6 +2528,7 @@ create_the_progress_dialog (FrWindow *window) window->priv->pd_quit_button = gtk_dialog_add_button (GTK_DIALOG (window->priv->progress_dialog), GTK_STOCK_QUIT, DIALOG_RESPONSE_QUIT); window->priv->pd_open_archive_button = gtk_dialog_add_button (GTK_DIALOG (window->priv->progress_dialog), _("_Open the Archive"), DIALOG_RESPONSE_OPEN_ARCHIVE); window->priv->pd_open_destination_button = gtk_dialog_add_button (GTK_DIALOG (window->priv->progress_dialog), _("_Show the Files"), DIALOG_RESPONSE_OPEN_DESTINATION_FOLDER); + window->priv->pd_open_destination_and_quit_button = gtk_dialog_add_button (GTK_DIALOG (window->priv->progress_dialog), _("Show the _Files and Quit"), DIALOG_RESPONSE_OPEN_DESTINATION_FOLDER_AND_QUIT); window->priv->pd_close_button = gtk_dialog_add_button (GTK_DIALOG (window->priv->progress_dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); window->priv->pd_cancel_button = gtk_dialog_add_button (GTK_DIALOG (window->priv->progress_dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); @@ -2670,6 +2678,7 @@ open_progress_dialog (FrWindow *window, gtk_widget_show (window->priv->pd_cancel_button); gtk_widget_hide (window->priv->pd_open_archive_button); gtk_widget_hide (window->priv->pd_open_destination_button); + gtk_widget_hide (window->priv->pd_open_destination_and_quit_button); gtk_widget_hide (window->priv->pd_quit_button); gtk_widget_hide (window->priv->pd_close_button); @@ -2750,6 +2759,7 @@ open_progress_dialog_with_open_destination (FrWindow *window) gtk_widget_hide (window->priv->pd_cancel_button); gtk_widget_hide (window->priv->pd_open_archive_button); gtk_widget_show (window->priv->pd_open_destination_button); + gtk_widget_show (window->priv->pd_open_destination_and_quit_button); gtk_widget_show (window->priv->pd_quit_button); gtk_widget_show (window->priv->pd_close_button); display_progress_dialog (window); @@ -2773,6 +2783,7 @@ open_progress_dialog_with_open_archive (FrWindow *window) create_the_progress_dialog (window); gtk_widget_hide (window->priv->pd_cancel_button); gtk_widget_hide (window->priv->pd_open_destination_button); + gtk_widget_hide (window->priv->pd_open_destination_and_quit_button); gtk_widget_show (window->priv->pd_open_archive_button); gtk_widget_show (window->priv->pd_close_button); display_progress_dialog (window); -- cgit v1.2.1