[gnome-2048] Do not load unused style file.



commit 45533f8033559b37d9047c73c8f990f2ea767bc9
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed Feb 17 15:52:24 2016 +0100

    Do not load unused style file.

 src/application.vala         |   19 ++++---------------
 src/gnome-2048.gresource.xml |    2 +-
 2 files changed, 5 insertions(+), 16 deletions(-)
---
diff --git a/src/application.vala b/src/application.vala
index bf72139..2eb1a3c 100644
--- a/src/application.vala
+++ b/src/application.vala
@@ -76,7 +76,10 @@ public class Application : Gtk.Application
 
     _settings = new Settings ("org.gnome.2048");
 
-    _init_style ();
+/*    Gtk.CssProvider provider = new Gtk.CssProvider ();
+    provider.load_from_resource ("/org/gnome/gnome-2048/data/style.css");
+    Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), provider, 
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); */
+
     _init_game ();
   }
 
@@ -110,20 +113,6 @@ public class Application : Gtk.Application
     _settings.set_boolean ("window-maximized", _window_maximized);
   }
 
-  private void _init_style ()
-  {
-    var provider = new Gtk.CssProvider ();
-    try
-    {
-      provider.load_from_file (GLib.File.new_for_uri ("resource://org/gnome/gnome-2048/data/style.css"));
-      Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), provider, 
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
-    }
-    catch (GLib.Error e)
-    {
-      stderr.printf ("%s\n", e.message);
-    }
-  }
-
   private void _init_game ()
   {
     _game = new Game (_settings);
diff --git a/src/gnome-2048.gresource.xml b/src/gnome-2048.gresource.xml
index 2f7168c..4645528 100644
--- a/src/gnome-2048.gresource.xml
+++ b/src/gnome-2048.gresource.xml
@@ -4,7 +4,7 @@
     <file preprocess="xml-stripblanks">data/mainwindow.ui</file>
     <file preprocess="xml-stripblanks">data/preferences.ui</file>
     <file preprocess="xml-stripblanks">data/congrats.ui</file>
-    <file>data/style.css</file>
+    <!-- file>data/style.css</file -->
   </gresource>
   <gresource prefix="/org/gnome/gnome-2048/gtk">
     <file preprocess="xml-stripblanks" alias="menus.ui">data/menus.ui</file>


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