[file-roller: 71/123] use the archive property directly instead of using g_object_get
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller: 71/123] use the archive property directly instead of using g_object_get
- Date: Mon, 6 Aug 2012 13:46:50 +0000 (UTC)
commit b9c180956afb3736e54be8c5e2e55f6a8852fb9b
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Jul 29 12:15:01 2012 +0200
use the archive property directly instead of using g_object_get
src/fr-archive-libarchive.c | 28 ++++++++--------------------
1 files changed, 8 insertions(+), 20 deletions(-)
---
diff --git a/src/fr-archive-libarchive.c b/src/fr-archive-libarchive.c
index 4dfe99e..bfb21a7 100644
--- a/src/fr-archive-libarchive.c
+++ b/src/fr-archive-libarchive.c
@@ -1288,7 +1288,7 @@ _remove_files_entry_action (SaveData *save_data,
static void
fr_archive_libarchive_remove_files (FrArchive *archive,
GList *file_list,
- FrCompression compression,
+ FrCompression compression, /* FIXME: remove this option */
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1307,9 +1307,9 @@ fr_archive_libarchive_remove_files (FrArchive *archive,
_fr_archive_libarchive_save (archive,
FALSE,
- NULL,
- FALSE,
- compression,
+ archive->password,
+ archive->encrypt_header,
+ archive->compression,
0,
cancellable,
g_simple_async_result_new (G_OBJECT (archive),
@@ -1406,10 +1406,6 @@ fr_archive_libarchive_rename (FrArchive *archive,
char *new_dirname;
int old_dirname_len;
GList *scan;
- char *password;
- gboolean encrypt_header;
- FrCompression compression;
- guint volume_size;
rename_data = g_new0 (RenameData, 1);
rename_data->file_list = _g_string_list_dup (file_list);
@@ -1434,19 +1430,12 @@ fr_archive_libarchive_rename (FrArchive *archive,
rename_data->n_files_to_rename++;
}
- g_object_get (archive,
- "password", &password,
- "encrypt-header", &encrypt_header,
- "compression", &compression,
- "volume-size", &volume_size,
- NULL);
-
_fr_archive_libarchive_save (archive,
FALSE,
- password,
- encrypt_header,
- compression,
- volume_size,
+ archive->password,
+ archive->encrypt_header,
+ archive->compression,
+ 0,
cancellable,
g_simple_async_result_new (G_OBJECT (archive),
callback,
@@ -1458,7 +1447,6 @@ fr_archive_libarchive_rename (FrArchive *archive,
rename_data,
(GDestroyNotify) rename_data_free);
- g_free (password);
g_free (new_dirname);
g_free (old_dirname);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]