[gnome-games] Fixes several compile time warnings



commit 21deefa30bfdc6e9147e125e304c89bc3c059abc
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Aug 17 22:40:51 2016 +0200

    Fixes several compile time warnings

 src/tracker/mime-type-tracker-query.vala |    7 +------
 src/ui/application-window.vala           |    7 ++++++-
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/tracker/mime-type-tracker-query.vala b/src/tracker/mime-type-tracker-query.vala
index 1e7901d..69d2dc5 100644
--- a/src/tracker/mime-type-tracker-query.vala
+++ b/src/tracker/mime-type-tracker-query.vala
@@ -25,13 +25,8 @@ public class Games.MimeTypeTrackerQuery : Object, TrackerQuery {
 
        public bool is_uri_valid (string uri) {
                File file = File.new_for_uri(uri);
-               try {
-                       return file.query_exists ();
-               } catch (Error e) {
-                       debug (e.message);
-               }
 
-               return false;
+               return file.query_exists ();
        }
 
        public void process_cursor (Tracker.Sparql.Cursor cursor) {
diff --git a/src/ui/application-window.vala b/src/ui/application-window.vala
index 8b4619c..76984d8 100644
--- a/src/ui/application-window.vala
+++ b/src/ui/application-window.vala
@@ -320,7 +320,12 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
                        return;
 
                if (has_toplevel_focus)
-                       display_box.runner.resume ();
+                       try {
+                               display_box.runner.resume ();
+                       }
+                       catch (Error e) {
+                               warning (e.message);
+                       }
                else
                        display_box.runner.pause ();
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]