[gnome-weather] Ensure GWeather types at startup



commit f7e1a24a0320a0ad78b0478653925164ee360f7a
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon Oct 6 12:37:56 2014 -0700

    Ensure GWeather types at startup
    
    We need to make sure the types are registered so GtkBuilder can
    find them. Luckily, in JS it's enough to reference a class at
    all to register its type.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=737818

 src/app/main.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/app/main.js b/src/app/main.js
index 30bd6d7..9d360b8 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -73,6 +73,8 @@ const Application = new Lang.Class({
 
     vfunc_startup: function() {
         this.parent();
+        // ensure the type before we call to GtkBuilder
+        GWeather.LocationEntry;
 
         Util.loadStyleSheet('/org/gnome/Weather/Application/application.css');
 


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