diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-02-01 09:50:29 -0600 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-02-01 09:50:29 -0600 |
commit | 2ea739c1cc14bbfdafbebec79aeae78cbf440145 (patch) | |
tree | 67e66dfe3044ac447d61fe9c83d88b538fab1175 /src/sound-service-dbus.c | |
parent | 43b7e22a13692edbba02c987975747a069881814 (diff) | |
download | ayatana-indicator-sound-2ea739c1cc14bbfdafbebec79aeae78cbf440145.tar.gz ayatana-indicator-sound-2ea739c1cc14bbfdafbebec79aeae78cbf440145.tar.bz2 ayatana-indicator-sound-2ea739c1cc14bbfdafbebec79aeae78cbf440145.zip |
fixes applied
Diffstat (limited to 'src/sound-service-dbus.c')
-rw-r--r-- | src/sound-service-dbus.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index 9ae0fd7..7f5afdc 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -450,8 +450,9 @@ static gboolean sound_service_dbus_blacklist_player (SoundServiceDbus* self, if (g_strcmp0 (player_name, str) == 0){ // Return if its already there g_debug ("we have this already blacklisted, no need to do anything"); - g_variant_builder_end (&builder); + g_variant_builder_clear (&builder); g_object_unref (our_settings); + g_object_unref (the_black_list); return result; } } @@ -472,17 +473,18 @@ static gboolean sound_service_dbus_blacklist_player (SoundServiceDbus* self, // It was not there anyway, return false if (present == FALSE){ g_debug ("it was not blacklisted ?, no need to do anything"); - g_variant_builder_end (&builder); + g_variant_builder_clear (&builder); g_object_unref (our_settings); + g_object_unref (the_black_list); return result; } // Otherwise free the builder and reconstruct ensuring no duplicates. - g_variant_builder_end (&builder); + g_variant_builder_clear (&builder); g_variant_builder_init (&builder, G_VARIANT_TYPE_STRING_ARRAY); g_variant_iter_init (&iter, the_black_list); - + while (g_variant_iter_loop (&iter, "s", &str)){ if (g_strcmp0 (player_name, str) != 0){ g_variant_builder_add (&builder, "s", str); @@ -490,13 +492,12 @@ static gboolean sound_service_dbus_blacklist_player (SoundServiceDbus* self, } } GVariant* value = g_variant_builder_end (&builder); - g_variant_ref (value); result = g_settings_set_value (our_settings, "blacklisted-media-players", value); - g_variant_unref (value); g_object_unref (our_settings); + g_object_unref (the_black_list); return result; } |