aboutsummaryrefslogtreecommitdiff
path: root/src/settings-manager.vala
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 /src/settings-manager.vala
parentcf9b03167ed12086acbd74b97404b082f8e018a8 (diff)
downloadayatana-indicator-sound-6da3712d5eda504073689da98eccba020d57a5cd.tar.gz
ayatana-indicator-sound-6da3712d5eda504073689da98eccba020d57a5cd.tar.bz2
ayatana-indicator-sound-6da3712d5eda504073689da98eccba020d57a5cd.zip
blacklist / interested players work done
Diffstat (limited to 'src/settings-manager.vala')
-rw-r--r--src/settings-manager.vala24
1 files changed, 22 insertions, 2 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);
+ }
}