aboutsummaryrefslogtreecommitdiff
path: root/src/familiar-players-db.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-07-14 23:36:29 +0100
committerConor Curran <conor.curran@canonical.com>2010-07-14 23:36:29 +0100
commit4823b3c35b8e8c1334ad947286abf0d88b6de701 (patch)
tree9b5115bcc4e50e744467afa4f497f6199634730b /src/familiar-players-db.vala
parentbf4f73249f5b6bf4c9196f251382c5a6cec9634f (diff)
downloadayatana-indicator-sound-4823b3c35b8e8c1334ad947286abf0d88b6de701.tar.gz
ayatana-indicator-sound-4823b3c35b8e8c1334ad947286abf0d88b6de701.tar.bz2
ayatana-indicator-sound-4823b3c35b8e8c1334ad947286abf0d88b6de701.zip
positionset now working - tested with vlc
Diffstat (limited to 'src/familiar-players-db.vala')
-rw-r--r--src/familiar-players-db.vala18
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;
}