From 3ea42eb34e8cf787c98bb783d39c6f237381ffe2 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Thu, 18 Nov 2010 11:30:03 +0000 Subject: made the necessary changes to ensure compatibility with valac-0.12, and dealt with a compiler warning --- src/familiar-players-db.vala | 7 ++++++- src/fetch-file.vala | 2 +- src/metadata-menu-item.vala | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/familiar-players-db.vala b/src/familiar-players-db.vala index af7d07f..47ddc70 100644 --- a/src/familiar-players-db.vala +++ b/src/familiar-players-db.vala @@ -167,9 +167,14 @@ public class FamiliarPlayersDB : GLib.Object desktop_keyfile.load_from_file (desktop_path, KeyFileFlags.NONE); } catch(GLib.FileError error){ - warning("Error loading keyfile"); + warning("Error loading keyfile - FileError"); return null; } + catch(GLib.KeyFileError error){ + warning("Error loading keyfile - KeyFileError"); + return null; + } + try{ return desktop_keyfile.get_string (KeyFileDesktop.GROUP, KeyFileDesktop.KEY_ICON); diff --git a/src/fetch-file.vala b/src/fetch-file.vala index 1811cc1..e6fc11d 100644 --- a/src/fetch-file.vala +++ b/src/fetch-file.vala @@ -64,7 +64,7 @@ public class FetchFile : Object ssize_t bufsize = 1; do { try { - bufsize = yield this.stream.read_async (buffer, size, GLib.Priority.DEFAULT, null); + bufsize = yield this.stream.read_async (buffer, GLib.Priority.DEFAULT, null); if (bufsize < 1) { break;} if (bufsize != size) diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala index 3f71653..c9ab4dd 100644 --- a/src/metadata-menu-item.vala +++ b/src/metadata-menu-item.vala @@ -133,7 +133,7 @@ public class MetadataMenuitem : PlayerItem { try{ PixbufLoader loader = new PixbufLoader (); - loader.write (update.data, update.len); + loader.write (update.data); loader.close (); Pixbuf icon = loader.get_pixbuf (); string path = this.album_art_cache_dir.concat("/downloaded-coverart-XXXXXX"); -- cgit v1.2.3