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



commit 91412a71d7c1c30db04fe8f558d982fd54b9f270
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 baf0fc67..cade6855 100644
--- a/src/ui/application.vala
+++ b/src/ui/application.vala
@@ -417,12 +417,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]