diff options
author | Michal Hruby <michal.mhr@gmail.com> | 2011-11-15 13:10:31 +0100 |
---|---|---|
committer | Michal Hruby <michal.mhr@gmail.com> | 2011-11-15 13:10:31 +0100 |
commit | 2c591f0466649f2855b264b70928b43f61929b14 (patch) | |
tree | 8437c82f1c7ff76bd6b53ec0018b0b2130c05be3 | |
parent | 170521be9c0a825eb103eb4dfda4cf5d94e624c5 (diff) |
Add compability with valac-0.14
-rw-r--r-- | src/recent-manager-provider.vala | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/recent-manager-provider.vala b/src/recent-manager-provider.vala index 4079210..0f56db0 100644 --- a/src/recent-manager-provider.vala +++ b/src/recent-manager-provider.vala @@ -122,7 +122,8 @@ public class RecentManagerGtk : DataProvider if (desktop_file == null) { - warning ("Desktop file for %s was not found", exec[0]); + warning ("Desktop file for \"%s\" was not found, exec: %s, mime_type: %s", + uri, exec[0], ri.get_mime_type ()); continue; // this makes us sad panda } @@ -237,13 +238,20 @@ public class RecentManagerGtk : DataProvider { if (fi.get_name ().has_suffix (".desktop")) { - string contents; var desktop_file = Path.build_filename (p, fi.get_name (), null); var f = File.new_for_path (desktop_file); try { +#if VALA_0_14 + uint8[] contents_array; + if (f.load_contents (null, out contents_array, null)) + { + unowned string contents = (string) contents_array; +#else + string contents; if (f.load_contents (null, out contents, null, null)) { +#endif if ("Exec=%s".printf (app_name) in contents) { if (mimetype == null || mimetype in contents) |