[Xfce4-commits] <thunar:nick/1.8> Inline deep copy list functions.
Nick Schermer
noreply at xfce.org
Sun Aug 4 21:52:09 CEST 2013
Updating branch refs/heads/nick/1.8
to ad6ede32e8cd6ec42622b345687301153ce4d50c (commit)
from 7e993638f1e06b452b15b96cf4e6a8470f234a4f (commit)
commit ad6ede32e8cd6ec42622b345687301153ce4d50c
Author: Nick Schermer <nick at xfce.org>
Date: Sun Aug 4 01:35:14 2013 +0200
Inline deep copy list functions.
thunar/thunar-gio-extensions.c | 4 ++--
thunar/thunar-gio-extensions.h | 4 ++--
thunar/thunar-launcher.c | 2 +-
thunar/thunar-renamer-dialog.c | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c
index 1b9026a..24bc208 100644
--- a/thunar/thunar-gio-extensions.c
+++ b/thunar/thunar-gio-extensions.c
@@ -444,8 +444,8 @@ thunar_g_file_list_get_type (void)
if (G_UNLIKELY (type == G_TYPE_INVALID))
{
type = g_boxed_type_register_static (I_("ThunarGFileList"),
- (GBoxedCopyFunc) thunar_g_file_list_copy,
- (GBoxedFreeFunc) thunar_g_file_list_free);
+ (GBoxedCopyFunc) thunarx_file_info_list_copy,
+ (GBoxedFreeFunc) thunarx_file_info_list_free);
}
return type;
diff --git a/thunar/thunar-gio-extensions.h b/thunar/thunar-gio-extensions.h
index c19101e..db85f01 100644
--- a/thunar/thunar-gio-extensions.h
+++ b/thunar/thunar-gio-extensions.h
@@ -73,8 +73,8 @@ gchar **thunar_g_file_list_to_stringv (GList *list);
/* deep copy jobs for GLists */
#define thunar_g_file_list_append(list,object) g_list_append (list, g_object_ref (G_OBJECT (object)))
#define thunar_g_file_list_prepend(list,object) g_list_prepend (list, g_object_ref (G_OBJECT (object)))
-#define thunar_g_file_list_copy thunarx_file_info_list_copy
-#define thunar_g_file_list_free thunarx_file_info_list_free
+#define thunar_g_file_list_copy(list) g_list_copy_deep (list, (GCopyFunc) g_object_ref, NULL)
+#define thunar_g_file_list_free(list) g_list_free_full (list, g_object_unref)
gboolean thunar_g_app_info_launch (GAppInfo *info,
GFile *working_directory,
diff --git a/thunar/thunar-launcher.c b/thunar/thunar-launcher.c
index 5132575..30e43cd 100644
--- a/thunar/thunar-launcher.c
+++ b/thunar/thunar-launcher.c
@@ -597,7 +597,7 @@ thunar_launcher_open_files (ThunarLauncher *launcher,
applications = g_hash_table_new_full (thunar_launcher_g_app_info_hash,
(GEqualFunc) g_app_info_equal,
(GDestroyNotify) g_object_unref,
- (GDestroyNotify) thunar_g_file_list_free);
+ (GDestroyNotify) thunarx_file_info_list_free);
for (lp = files; lp != NULL; lp = lp->next)
{
diff --git a/thunar/thunar-renamer-dialog.c b/thunar/thunar-renamer-dialog.c
index 61aa4c7..36eafac 100644
--- a/thunar/thunar-renamer-dialog.c
+++ b/thunar/thunar-renamer-dialog.c
@@ -655,7 +655,7 @@ thunar_renamer_dialog_finalize (GObject *object)
g_object_unref (G_OBJECT (renamer_dialog->model));
/* release the list of selected files */
- thunarx_file_info_list_free (renamer_dialog->selected_files);
+ thunar_g_file_list_free (renamer_dialog->selected_files);
(*G_OBJECT_CLASS (thunar_renamer_dialog_parent_class)->finalize) (object);
}
@@ -1663,7 +1663,7 @@ thunar_renamer_dialog_selection_changed (GtkTreeSelection *selection,
_thunar_return_if_fail (THUNAR_IS_RENAMER_DIALOG (renamer_dialog));
/* release the list of previously selected files */
- thunarx_file_info_list_free (renamer_dialog->selected_files);
+ thunar_g_file_list_free (renamer_dialog->selected_files);
renamer_dialog->selected_files = NULL;
/* determine the new list of selected files */
More information about the Xfce4-commits
mailing list