diff options
author | Sebastien Bacher <seb128@ubuntu.com> | 2010-07-22 21:04:26 +0200 |
---|---|---|
committer | Sebastien Bacher <seb128@ubuntu.com> | 2010-07-22 21:04:26 +0200 |
commit | 1777ee4291dc792ca3d4df087c8af23cd8458961 (patch) | |
tree | 101cc9ea1b424973a7c43cd7ce7bb9c4f9ac66aa /src/familiar-players-db.vala | |
parent | f6ffb190261dfdbbf55e90b63c1cd06f03037e35 (diff) | |
parent | c7316aef6047ef29ab71fbcd34d6932fb0e521ad (diff) | |
download | ayatana-indicator-sound-1777ee4291dc792ca3d4df087c8af23cd8458961.tar.gz ayatana-indicator-sound-1777ee4291dc792ca3d4df087c8af23cd8458961.tar.bz2 ayatana-indicator-sound-1777ee4291dc792ca3d4df087c8af23cd8458961.zip |
Import upstream version 0.3.8
Diffstat (limited to 'src/familiar-players-db.vala')
-rw-r--r-- | src/familiar-players-db.vala | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/familiar-players-db.vala b/src/familiar-players-db.vala index b83caa3..2bc0a3c 100644 --- a/src/familiar-players-db.vala +++ b/src/familiar-players-db.vala @@ -51,18 +51,20 @@ public class FamiliarPlayersDB : GLib.Object } private bool create_key_file(){ + bool result = false; if (test(this.file_name, GLib.FileTest.EXISTS)) { this.key_file = new KeyFile(); try{ - if (this.key_file.load_from_file(this.file_name, KeyFileFlags.NONE) == true) { - return true; - } + result = this.key_file.load_from_file(this.file_name, KeyFileFlags.NONE); } - catch(FileError e){ - warning("FamiliarPlayersDB - error trying to load KeyFile"); + catch(GLib.KeyFileError e){ + warning("FamiliarPlayersDB::create_key_file() - KeyFileError"); } + catch(GLib.FileError e){ + warning("FamiliarPlayersDB::create_key_file() - FileError"); + } } - return false; + return result; } private bool check_for_keys(){ @@ -87,7 +89,7 @@ public class FamiliarPlayersDB : GLib.Object } return true; } - catch(FileError error){ + catch(GLib.KeyFileError error){ warning("Error loading the Desktop string list"); return false; } @@ -108,7 +110,7 @@ public class FamiliarPlayersDB : GLib.Object try{ data = keyfile.to_data(out data_length); } - catch(Error e){ + catch(GLib.KeyFileError e){ warning("Problems dumping keyfile to a string"); return false; } |