[Xfce4-commits] <xfce4-settings:master> Drop Glib 2.22 functions.
Nick Schermer
noreply at xfce.org
Thu Dec 9 19:56:02 CET 2010
Updating branch refs/heads/master
to d89e1fd77002354c9bc1404cff52070c8a6549f3 (commit)
from ec14862e75a05afc56a407855a47eff278275d76 (commit)
commit d89e1fd77002354c9bc1404cff52070c8a6549f3
Author: Nick Schermer <nick at xfce.org>
Date: Thu Dec 9 19:55:11 2010 +0100
Drop Glib 2.22 functions.
dialogs/display-settings/xfce-randr.c | 5 +++--
xfce4-settings-helper/displays.c | 6 +++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dialogs/display-settings/xfce-randr.c b/dialogs/display-settings/xfce-randr.c
index baa277f..45b8646 100644
--- a/dialogs/display-settings/xfce-randr.c
+++ b/dialogs/display-settings/xfce-randr.c
@@ -157,7 +157,7 @@ xfce_randr_populate (XfceRandr *randr,
g_return_val_if_fail (randr->resources != NULL, FALSE);
/* prepare the temporary cache */
- outputs = g_ptr_array_new_with_free_func ((GDestroyNotify) XRRFreeOutputInfo);
+ outputs = g_ptr_array_new ();
/* walk the outputs */
for (n = 0; n < randr->resources->noutput; ++n)
@@ -180,7 +180,8 @@ xfce_randr_populate (XfceRandr *randr,
if (n == 0 && strcmp (output_info->name, "default") == 0)
{
/* free the cache */
- g_ptr_array_unref (outputs);
+ g_ptr_array_foreach (outputs, (GFunc) XRRFreeOutputInfo, NULL);
+ g_ptr_array_free (outputs, TRUE);
return FALSE;
}
}
diff --git a/xfce4-settings-helper/displays.c b/xfce4-settings-helper/displays.c
index 7a7ea80..5624131 100644
--- a/xfce4-settings-helper/displays.c
+++ b/xfce4-settings-helper/displays.c
@@ -273,8 +273,7 @@ xfce_displays_helper_list_outputs (Display *xdisplay,
g_assert (xdisplay && resources && nactive);
- outputs = g_ptr_array_new_with_free_func (
- (GDestroyNotify) xfce_displays_helper_free_output);
+ outputs = g_ptr_array_new ();
/* get all connected outputs */
*nactive = 0;
@@ -795,7 +794,8 @@ err_cleanup:
g_hash_table_destroy (saved_outputs);
/* Free our output cache */
- g_ptr_array_unref (connected_outputs);
+ g_ptr_array_foreach (connected_outputs, (GFunc) xfce_displays_helper_free_output, NULL);
+ g_ptr_array_free (connected_outputs, TRUE);
/* cleanup our CRTC cache */
for (m = 0; m < resources->ncrtc; ++m)
More information about the Xfce4-commits
mailing list