aboutsummaryrefslogtreecommitdiff
path: root/src/familiar-players-db.vala
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2010-11-05 12:02:49 -0400
committerKen VanDine <ken.vandine@canonical.com>2010-11-05 12:02:49 -0400
commit026c6dd7be86073ff7de59db344a506982570698 (patch)
tree4a2499f57b17547ca4271dfb0f775a872d3dccef /src/familiar-players-db.vala
parent71832965ce4ef557479d110b1d52814a8588f1bc (diff)
parenta8f18b2780b52eb09233c4279288f6ba0887552b (diff)
downloadayatana-indicator-sound-026c6dd7be86073ff7de59db344a506982570698.tar.gz
ayatana-indicator-sound-026c6dd7be86073ff7de59db344a506982570698.tar.bz2
ayatana-indicator-sound-026c6dd7be86073ff7de59db344a506982570698.zip
releasing version 0.5.0-0ubuntu1
Diffstat (limited to 'src/familiar-players-db.vala')
-rw-r--r--src/familiar-players-db.vala10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/familiar-players-db.vala b/src/familiar-players-db.vala
index 894447c..28ac286 100644
--- a/src/familiar-players-db.vala
+++ b/src/familiar-players-db.vala
@@ -29,6 +29,7 @@ public class FamiliarPlayersDB : GLib.Object
{
private const string GROUP_NAME = "Seen Database";
private const string KEY_NAME = "DesktopFiles";
+ private const string DEFAULT_APP_DESKTOP = "/usr/share/applications/rhythmbox.desktop";
private HashMap<string, bool> players_DB;
private string file_name;
private string dir_name;
@@ -38,13 +39,18 @@ public class FamiliarPlayersDB : GLib.Object
public FamiliarPlayersDB()
{
this.write_id = 0;
- this.players_DB = new HashMap<string, bool>();
+ this.players_DB = new HashMap<string, bool>();
+ if ( !create_key_file() ){
+ this.players_DB.set(DEFAULT_APP_DESKTOP, true);
+ this.write_db();
+ }
+
this.dir_name = build_filename(get_user_cache_dir(), "indicators", "sound");
this.file_name = build_filename(this.dir_name, "familiar-players-db.keyfile");
if(create_key_file() && check_for_keys() && load_data_from_key_file()){
debug("keyfiles in place and ready for action");
}
- else{
+ else{
this.key_file = null;
warning("FamiliarPlayersDB:: problems loading key file - can't go any further");
}