[gnome-games/wip/exalm/css] application: Simplify css loading



commit 0d0eaaf8ec6e6b5df0fdfa0a145b6bd87ff96a09
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Wed Mar 6 19:33:11 2019 +0500

    application: Simplify css loading

 src/ui/application.vala | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/src/ui/application.vala b/src/ui/application.vala
index b302b3fc..fa55414a 100644
--- a/src/ui/application.vala
+++ b/src/ui/application.vala
@@ -411,12 +411,7 @@ public class Games.Application : Gtk.Application {
 
        private static Gtk.CssProvider load_css (string css) {
                var provider = new Gtk.CssProvider ();
-               try {
-                       var file = File.new_for_uri ("resource:///org/gnome/Games/" + css);
-                       provider.load_from_file (file);
-               } catch (GLib.Error e) {
-                       warning ("Loading CSS file ā€œ%sā€ failed: %s", css, e.message);
-               }
+               provider.load_from_resource ("/org/gnome/Games/" + css);
                return provider;
        }
 


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