aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-01-31 15:26:06 -0600
committerConor Curran <conor.curran@canonical.com>2011-01-31 15:26:06 -0600
commit6da3712d5eda504073689da98eccba020d57a5cd (patch)
tree7731fb73e0e8898550940fa5dcb613d0ac3e1e07
parentcf9b03167ed12086acbd74b97404b082f8e018a8 (diff)
downloadayatana-indicator-sound-6da3712d5eda504073689da98eccba020d57a5cd.tar.gz
ayatana-indicator-sound-6da3712d5eda504073689da98eccba020d57a5cd.tar.bz2
ayatana-indicator-sound-6da3712d5eda504073689da98eccba020d57a5cd.zip
blacklist / interested players work done
-rw-r--r--src/settings-manager.vala24
-rw-r--r--src/sound-service-dbus.c1
-rw-r--r--src/sound-service.c4
3 files changed, 24 insertions, 5 deletions
diff --git a/src/settings-manager.vala b/src/settings-manager.vala
index 380e442..b5322c0 100644
--- a/src/settings-manager.vala
+++ b/src/settings-manager.vala
@@ -28,6 +28,7 @@ public class SettingsManager : GLib.Object
construct{
this.settings = new Settings ("com.canonical.indicators.sound");
this.settings.changed["blacklisted-media-players"].connect (on_blacklist_event);
+ //this.reveal_contents();
}
public string[] fetch_blacklist()
@@ -52,7 +53,7 @@ public class SettingsManager : GLib.Object
this.settings.reset("interested-media-players");
}
- public void add_interested(string app_desktop_name)
+ public void add_interested (string app_desktop_name)
{
var already_interested = this.settings.get_strv ("interested-media-players");
foreach (var s in already_interested){
@@ -67,5 +68,24 @@ public class SettingsManager : GLib.Object
private void on_blacklist_event()
{
this.blacklist_updates(this.settings.get_strv ("blacklisted-media-players"));
- }
+ }
+
+ // Convenient debug method inorder to provide visability over
+ // the contents of both interested and blacklisted containers in its gsettings
+ private void reveal_contents()
+ {
+ var already_interested = this.settings.get_strv ("interested-media-players");
+ foreach (var s in already_interested)
+ {
+ debug ("client %s is in interested array", s);
+ }
+ var blacklisted = this.settings.get_strv ("blacklisted-media-players");
+ foreach (var s in blacklisted)
+ {
+ debug ("client %s is in blacklisted array", s);
+ }
+
+ debug ("interested array size = %i", already_interested.length);
+ debug ("blacklisted array size = %i", blacklisted.length);
+ }
}
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c
index 0fc2f50..f29fab4 100644
--- a/src/sound-service-dbus.c
+++ b/src/sound-service-dbus.c
@@ -458,7 +458,6 @@ static gboolean sound_service_dbus_blacklist_player (SoundServiceDbus* self,
g_variant_builder_add (builder, "s", player_name);
}
else{
- //g_variant_builder_clear (builder);
gboolean present = FALSE;
g_variant_get (the_black_list, "as", &iter);
diff --git a/src/sound-service.c b/src/sound-service.c
index c1bb9b4..2cb33d3 100644
--- a/src/sound-service.c
+++ b/src/sound-service.c
@@ -40,8 +40,8 @@ service_shutdown (IndicatorService *service, gpointer user_data)
{
if (mainloop != NULL) {
g_debug("Service shutdown !");
- //close_pulse_activites();
- //g_main_loop_quit(mainloop);
+ close_pulse_activites();
+ g_main_loop_quit(mainloop);
}
return;
}