summaryrefslogtreecommitdiff
path: root/thunarx
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2012-09-16 18:32:05 +0200
committerNick Schermer <nick@xfce.org>2012-09-16 20:15:47 +0200
commit853001496fd176d6a60fca9ca8709686dd0f67c1 (patch)
tree53214ffb8c07ce82afbcc51921efe62bd4214d61 /thunarx
parente9ead973243a05d284f7db064430ff95b023f82d (diff)
downloadthunar-853001496fd176d6a60fca9ca8709686dd0f67c1.tar.gz
Use g_(s)list_free_full where possible.
Diffstat (limited to 'thunarx')
-rw-r--r--thunarx/thunarx-file-info.c8
-rw-r--r--thunarx/thunarx-menu-provider.c9
-rw-r--r--thunarx/thunarx-preferences-provider.c3
-rw-r--r--thunarx/thunarx-property-page-provider.c3
-rw-r--r--thunarx/thunarx-provider-factory.c3
-rw-r--r--thunarx/thunarx-renamer-provider.c3
-rw-r--r--thunarx/thunarx-renamer.c3
7 files changed, 10 insertions, 22 deletions
diff --git a/thunarx/thunarx-file-info.c b/thunarx/thunarx-file-info.c
index 0c0c5eb8..60c8dcff 100644
--- a/thunarx/thunarx-file-info.c
+++ b/thunarx/thunarx-file-info.c
@@ -443,9 +443,5 @@ thunarx_file_info_list_copy (GList *file_infos)
void
thunarx_file_info_list_free (GList *file_infos)
{
- if (file_infos != NULL)
- {
- g_list_foreach (file_infos, (GFunc) g_object_unref, NULL);
- g_list_free (file_infos);
- }
-}
+ g_list_free_full (file_infos, g_object_unref);
+}
diff --git a/thunarx/thunarx-menu-provider.c b/thunarx/thunarx-menu-provider.c
index ea3f3e9c..3fe75a96 100644
--- a/thunarx/thunarx-menu-provider.c
+++ b/thunarx/thunarx-menu-provider.c
@@ -73,8 +73,7 @@ thunarx_menu_provider_get_type (void)
* The caller is responsible to free the returned list of actions using
* something like this when no longer needed:
* <informalexample><programlisting>
- * g_list_foreach (list, (GFunc) g_object_unref, NULL);
- * g_list_free (list);
+ * g_list_free_full (list, g_object_unref);
* </programlisting></informalexample>
*
* Return value: the list of #GtkAction<!---->s that @provider has to offer
@@ -129,8 +128,7 @@ thunarx_menu_provider_get_file_actions (ThunarxMenuProvider *provider,
* The caller is responsible to free the returned list of actions using
* something like this when no longer needed:
* <informalexample><programlisting>
- * g_list_foreach (list, (GFunc) g_object_unref, NULL);
- * g_list_free (list);
+ * g_list_free_full (list, g_object_unref);
* </programlisting></informalexample>
*
* Return value: the list of #GtkAction<!---->s that @provider has to offer
@@ -190,8 +188,7 @@ thunarx_menu_provider_get_folder_actions (ThunarxMenuProvider *provider,
* The caller is responsible to free the returned list of actions using
* something like this when no longer needed:
* <informalexample><programlisting>
- * g_list_foreach (list, (GFunc) g_object_unref, NULL);
- * g_list_free (list);
+ * g_list_free_full (list, g_object_unref);
* </programlisting></informalexample>
*
* Return value: the list of #GtkAction<!---->s that @provider has to offer
diff --git a/thunarx/thunarx-preferences-provider.c b/thunarx/thunarx-preferences-provider.c
index 41ac7479..c675b3f5 100644
--- a/thunarx/thunarx-preferences-provider.c
+++ b/thunarx/thunarx-preferences-provider.c
@@ -72,8 +72,7 @@ thunarx_preferences_provider_get_type (void)
* The caller is responsible to free the returned list of actions using
* something like this when no longer needed:
* <informalexample><programlisting>
- * g_list_foreach (list, (GFunc) g_object_unref, NULL);
- * g_list_free (list);
+ * g_list_free_full (list, g_object_unref);
* </programlisting></informalexample>
*
* Return value: the list of #GtkAction<!---->s that @provider has
diff --git a/thunarx/thunarx-property-page-provider.c b/thunarx/thunarx-property-page-provider.c
index aac8671f..524492c1 100644
--- a/thunarx/thunarx-property-page-provider.c
+++ b/thunarx/thunarx-property-page-provider.c
@@ -94,8 +94,7 @@ thunarx_property_page_provider_get_type (void)
* something like this when no longer needed:
* <informalexample><programlisting>
* g_list_foreach (list, (GFunc) g_object_ref_sink, NULL);
- * g_list_foreach (list, (GFunc) g_object_unref, NULL);
- * g_list_free (list);
+ * g_list_free_full (list, g_object_unref);
* </programlisting></informalexample>
*
* Return value: the list of #ThunarxPropertyPage<!---->s that @provider has to offer
diff --git a/thunarx/thunarx-provider-factory.c b/thunarx/thunarx-provider-factory.c
index 00905012..1b5d2a3e 100644
--- a/thunarx/thunarx-provider-factory.c
+++ b/thunarx/thunarx-provider-factory.c
@@ -277,8 +277,7 @@ thunarx_provider_factory_get_default (void)
* The caller is responsible to release the returned
* list of providers using code like this:
* <informalexample><programlisting>
- * g_list_foreach (list, (GFunc) g_object_unref, NULL);
- * g_list_free (list);
+ * g_list_free_full (list, g_object_unref);
* </programlisting></informalexample>
*
* Return value: the of providers for @type.
diff --git a/thunarx/thunarx-renamer-provider.c b/thunarx/thunarx-renamer-provider.c
index 56fcfcef..2810c8be 100644
--- a/thunarx/thunarx-renamer-provider.c
+++ b/thunarx/thunarx-renamer-provider.c
@@ -78,8 +78,7 @@ thunarx_renamer_provider_get_type (void)
* The caller is responsible to free the returned list of renamers using
* something like this when no longer needed:
* <informalexample><programlisting>
- * g_list_foreach (list, (GFunc) g_object_unref, NULL);
- * g_list_free (list);
+ * g_list_free_full (list, g_object_unref);
* </programlisting></informalexample>
*
* Return value: the list of #ThunarxRenamer<!---->s provided by the
diff --git a/thunarx/thunarx-renamer.c b/thunarx/thunarx-renamer.c
index 09cebbd8..92f50d15 100644
--- a/thunarx/thunarx-renamer.c
+++ b/thunarx/thunarx-renamer.c
@@ -639,8 +639,7 @@ thunarx_renamer_save (ThunarxRenamer *renamer,
* The caller is responsible to free the returned list using something
* like the following:
* <informalexample><programlisting>
- * g_list_foreach (list, (GFunc) g_object_unref, NULL);
- * g_list_free (list);
+ * g_list_free_full (list, g_object_unref);
* </programlisting></informalexample>
*
* As a special note, this method automatically takes a reference on the