From eb81ee771fc210f7800f80cb4fc65c5b98509272 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 06:10:07 +0000 Subject: import file-roller-3.14.2-10.el7 --- diff --git a/SOURCES/file-roller-3.14.2-fix-add-button-sensitivity.patch b/SOURCES/file-roller-3.14.2-fix-add-button-sensitivity.patch new file mode 100644 index 0000000..c25f149 --- /dev/null +++ b/SOURCES/file-roller-3.14.2-fix-add-button-sensitivity.patch @@ -0,0 +1,37 @@ +From f34f684103d16520fd22777377c630a947c7de0c Mon Sep 17 00:00:00 2001 +From: David King +Date: Wed, 4 May 2016 19:43:52 +0100 +Subject: [PATCH] Fix Add Files dialog button sensitivity + +When the Add Files dialog has previously been opened and there are +selected files, the selection is restored for subsequent views of the +dialog. However, the sensitivity of the Add button is only updated when +manually selecting a file, as the dialog only updates the sensitivity +in response to the GtkCellRendererToggle for the selected state being +changed. When setting a list of selected files on the dialog, as done +when restoring the list of selected files on subsequent views of the +dialog, the Add button is only ever set to be insensitive. + +Fix this by updating the Add button sensitivity after the list of files +has been loaded. + +https://bugzilla.gnome.org/show_bug.cgi?id=738177 +--- + src/fr-file-selector-dialog.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/fr-file-selector-dialog.c b/src/fr-file-selector-dialog.c +index 0e87b02..017df88 100644 +--- a/src/fr-file-selector-dialog.c ++++ b/src/fr-file-selector-dialog.c +@@ -882,6 +882,7 @@ get_folder_content_done_cb (GError *error, + + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (GET_WIDGET ("files_liststore")), sort_column_id, sort_order); + set_current_folder (self, load_data->folder); ++ _update_sensitivity (self); + + if (load_data->dialog->priv->current_operation == load_data) + load_data->dialog->priv->current_operation = NULL; +-- +2.8.2 + diff --git a/SOURCES/file-roller-3.14.2-fix-delete-all.patch b/SOURCES/file-roller-3.14.2-fix-delete-all.patch new file mode 100644 index 0000000..1178a2d --- /dev/null +++ b/SOURCES/file-roller-3.14.2-fix-delete-all.patch @@ -0,0 +1,79 @@ +From 3d9bfa9677960c1c03d795c1d5e849fc1ac4e18d Mon Sep 17 00:00:00 2001 +From: Paolo Bacchilega +Date: Sun, 15 Feb 2015 11:52:55 +0100 +Subject: Deleting all files does not work + +only happens when the archive is modified with libarchive + +[bug #738178] +--- + src/fr-archive-libarchive.c | 24 +++++++++++++++++------- + 1 file changed, 17 insertions(+), 7 deletions(-) + +diff --git a/src/fr-archive-libarchive.c b/src/fr-archive-libarchive.c +index 8770f8a..6909b8a 100644 +--- a/src/fr-archive-libarchive.c ++++ b/src/fr-archive-libarchive.c +@@ -1641,6 +1641,7 @@ fr_archive_libarchive_add_files (FrArchive *archive, + + typedef struct { + GHashTable *files_to_remove; ++ gboolean remove_all_files; + int n_files_to_remove; + } RemoveData; + +@@ -1648,7 +1649,8 @@ typedef struct { + static void + remove_data_free (RemoveData *remove_data) + { +- g_hash_table_unref (remove_data->files_to_remove); ++ if (remove_data->files_to_remove != NULL) ++ g_hash_table_unref (remove_data->files_to_remove); + g_free (remove_data); + } + +@@ -1662,7 +1664,7 @@ _remove_files_begin (SaveData *save_data, + + fr_archive_progress_set_total_files (load_data->archive, remove_data->n_files_to_remove); + fr_archive_progress_set_total_bytes (load_data->archive, +- FR_ARCHIVE_LIBARCHIVE (load_data->archive)->priv->uncompressed_size); ++ FR_ARCHIVE_LIBARCHIVE (load_data->archive)->priv->uncompressed_size); + } + + +@@ -1676,6 +1678,9 @@ _remove_files_entry_action (SaveData *save_data, + WriteAction action; + const char *pathname; + ++ if (remove_data->remove_all_files) ++ return WRITE_ACTION_SKIP_ENTRY; ++ + action = WRITE_ACTION_WRITE_ENTRY; + pathname = archive_entry_pathname (w_entry); + if (g_hash_table_lookup (remove_data->files_to_remove, pathname) != NULL) { +@@ -1701,12 +1706,17 @@ fr_archive_libarchive_remove_files (FrArchive *archive, + GList *scan; + + remove_data = g_new0 (RemoveData, 1); +- remove_data->files_to_remove = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); +- remove_data->n_files_to_remove = 0; +- for (scan = file_list; scan; scan = scan->next) { +- g_hash_table_insert (remove_data->files_to_remove, g_strdup (scan->data), GINT_TO_POINTER (1)); +- remove_data->n_files_to_remove++; ++ remove_data->remove_all_files = (file_list == NULL); ++ if (! remove_data->remove_all_files) { ++ remove_data->files_to_remove = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); ++ remove_data->n_files_to_remove = 0; ++ for (scan = file_list; scan; scan = scan->next) { ++ g_hash_table_insert (remove_data->files_to_remove, g_strdup (scan->data), GINT_TO_POINTER (1)); ++ remove_data->n_files_to_remove++; ++ } + } ++ else ++ remove_data->n_files_to_remove = archive->files->len; + + _fr_archive_libarchive_save (archive, + FALSE, +-- +cgit v0.12 + diff --git a/SOURCES/file-roller-3.14.2-fix-password-protected-rename.patch b/SOURCES/file-roller-3.14.2-fix-password-protected-rename.patch new file mode 100644 index 0000000..f9716bf --- /dev/null +++ b/SOURCES/file-roller-3.14.2-fix-password-protected-rename.patch @@ -0,0 +1,49 @@ +From d309d278bf298d0fe7241b0c5cf2548e322b80a0 Mon Sep 17 00:00:00 2001 +From: David King +Date: Tue, 10 May 2016 13:13:50 +0100 +Subject: [PATCH] Fix renaming files in a password-protected archive + +When opening a password-protected archive, and renaming a file within, +the password dialog takes user input, sets the password for the archive +and then restarts the rename action. As part of doing so, it frees the +existing action and replaces it with a duplicate. However, pointers to +fields inside the original (now freed) action struct are used to +provide the old and new filenames, among other arguments. This leads to +the file being deleted (although accessing freed memory is undefined, +so other outcomes are possible). + +Fix the rename operation by always using the fields from the new +struct, which exists for the lifetime of the rename action. + +https://bugzilla.redhat.com/show_bug.cgi?id=1233853 +https://bugzilla.gnome.org/show_bug.cgi?id=766227 +--- + src/fr-window.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/fr-window.c b/src/fr-window.c +index fd161b7..1d0a661 100644 +--- a/src/fr-window.c ++++ b/src/fr-window.c +@@ -8205,12 +8205,12 @@ rename_selection (FrWindow *window, + fr_window_clipboard_remove_file_list (window, file_list); + fr_archive_rename (window->archive, + file_list, +- old_name, +- new_name, +- current_dir, +- is_dir, +- dir_in_archive, +- original_path, ++ rdata->old_name, ++ rdata->new_name, ++ rdata->current_dir, ++ rdata->is_dir, ++ rdata->dir_in_archive, ++ rdata->original_path, + window->priv->cancellable, + archive_rename_ready_cb, + window); +-- +2.8.2 + diff --git a/SPECS/file-roller.spec b/SPECS/file-roller.spec index 5d8ca08..17460f6 100644 --- a/SPECS/file-roller.spec +++ b/SPECS/file-roller.spec @@ -1,7 +1,7 @@ Summary: Tool for viewing and creating archives Name: file-roller Version: 3.14.2 -Release: 7%{?dist} +Release: 10%{?dist} License: GPLv2+ Group: Applications/Archiving URL: http://download.gnome.org/sources/file-roller/ @@ -10,6 +10,12 @@ Source: http://download.gnome.org/sources/file-roller/3.14/file-roller-% # Fix a crash when the progress dialog is shown. # https://bugzilla.redhat.com/show_bug.cgi?id=1186481 Patch0: file-roller-3.14.2-fix-extraction-progress-dialog-crash.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1228645 +Patch1: file-roller-3.14.2-fix-delete-all.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1222955 +Patch2: file-roller-3.14.2-fix-add-button-sensitivity.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1233853 +Patch3: file-roller-3.14.2-fix-password-protected-rename.patch BuildRequires: glib2-devel BuildRequires: pango-devel @@ -58,6 +64,9 @@ or directories. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build %configure \ @@ -120,6 +129,15 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %changelog +* Tue May 10 2016 David King - 3.14.2-10 +- Fix renaming files in a password-protected archive (#1233853) + +* Wed May 04 2016 David King - 3.14.2-9 +- Fix add button sensitivity (#1222955) + +* Tue May 03 2016 David King - 3.14.2-8 +- Fix delete all files (#1228645) + * Wed Sep 23 2015 Ray Strode 3.14.2-7 - Remove duplicate X-GNOME-UsesNotifications key Related: #1259292