summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-05-22 01:54:43 +0200
committerZenWalker <[email protected]>2017-05-22 01:54:43 +0200
commit8d957d2962c84c293c00c9445f5fce296eb90aed (patch)
tree806ebd9b8bd82c6b1e9592ceacbee12bfba9f475 /src
parent7ba30abc3387cd0c6615475fdd7617426bac8fc3 (diff)
downloadengrampa-8d957d2962c84c293c00c9445f5fce296eb90aed.tar.bz2
engrampa-8d957d2962c84c293c00c9445f5fce296eb90aed.tar.xz
Add the button "Show the Files and Quit" in the progress dialog
New feature Fixes #146
Diffstat (limited to 'src')
-rw-r--r--src/fr-window.c11
1 files changed, 11 insertions, 0 deletions
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);