[file-roller] Nautilus extension "Compress" doesn't offer .gz anymore
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] Nautilus extension "Compress" doesn't offer .gz anymore
- Date: Mon, 27 Aug 2012 19:05:12 +0000 (UTC)
commit 93bc11895780050d02ff84dd47234f24cf33267f
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Aug 27 20:58:13 2012 +0200
Nautilus extension "Compress" doesn't offer .gz anymore
[bug #682807]
src/dlg-batch-add.c | 2 +-
src/fr-new-archive-dialog.c | 6 +++++-
src/fr-new-archive-dialog.h | 3 ++-
src/fr-window.c | 2 +-
4 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/dlg-batch-add.c b/src/dlg-batch-add.c
index cd24d5a..bc96fe4 100644
--- a/src/dlg-batch-add.c
+++ b/src/dlg-batch-add.c
@@ -80,7 +80,7 @@ dlg_batch_add_files (FrWindow *window,
dialog = fr_new_archive_dialog_new (_("Compress"),
NULL,
- FR_NEW_ARCHIVE_ACTION_NEW,
+ ((file_list->next == NULL) ? FR_NEW_ARCHIVE_ACTION_NEW_SINGLE_FILE : FR_NEW_ARCHIVE_ACTION_NEW_MANY_FILES),
parent,
filename);
g_signal_connect (dialog,
diff --git a/src/fr-new-archive-dialog.c b/src/fr-new-archive-dialog.c
index 43c96c5..67a42ff 100644
--- a/src/fr-new-archive-dialog.c
+++ b/src/fr-new-archive-dialog.c
@@ -218,10 +218,14 @@ _fr_new_archive_dialog_construct (FrNewArchiveDialog *self,
gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
switch (action) {
- case FR_NEW_ARCHIVE_ACTION_NEW:
+ case FR_NEW_ARCHIVE_ACTION_NEW_MANY_FILES:
self->priv->supported_types = create_type;
gtk_dialog_add_button (GTK_DIALOG (self), FR_STOCK_CREATE_ARCHIVE, GTK_RESPONSE_OK);
break;
+ case FR_NEW_ARCHIVE_ACTION_NEW_SINGLE_FILE:
+ self->priv->supported_types = single_file_save_type;
+ gtk_dialog_add_button (GTK_DIALOG (self), FR_STOCK_CREATE_ARCHIVE, GTK_RESPONSE_OK);
+ break;
case FR_NEW_ARCHIVE_ACTION_SAVE_AS:
self->priv->supported_types = save_type;
gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_SAVE, GTK_RESPONSE_OK);
diff --git a/src/fr-new-archive-dialog.h b/src/fr-new-archive-dialog.h
index e431703..e9c12ac 100644
--- a/src/fr-new-archive-dialog.h
+++ b/src/fr-new-archive-dialog.h
@@ -25,7 +25,8 @@
#include <gtk/gtk.h>
typedef enum {
- FR_NEW_ARCHIVE_ACTION_NEW,
+ FR_NEW_ARCHIVE_ACTION_NEW_MANY_FILES,
+ FR_NEW_ARCHIVE_ACTION_NEW_SINGLE_FILE,
FR_NEW_ARCHIVE_ACTION_SAVE_AS
} FrNewArchiveAction;
diff --git a/src/fr-window.c b/src/fr-window.c
index 264215e..e6f54a4 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -7122,7 +7122,7 @@ fr_window_action_new_archive (FrWindow *window)
dialog = fr_new_archive_dialog_new (_("New Archive"),
GTK_WINDOW (window),
- FR_NEW_ARCHIVE_ACTION_NEW,
+ FR_NEW_ARCHIVE_ACTION_NEW_MANY_FILES,
fr_window_get_open_default_dir (window),
NULL);
if ((fr_window_archive_is_present (window) && ! fr_window_is_batch_mode (window) ? NULL : GTK_WINDOW (window)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]