[gnome-maps] Use pkg.initFormat



commit 05fbf9d58fd8b46abbf77117e2d44438eb7c8596
Author: Damián Nohales <damiannohales gmail com>
Date:   Mon Dec 22 17:37:01 2014 -0300

    Use pkg.initFormat
    
    pkg.initFormat is a gjs's helper that declares the
    String.format method, let's use this helper instead
    of declare the method manually.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733411

 src/application.js |    1 -
 src/main.js        |    1 +
 2 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index d6e55be..80d3749 100644
--- a/src/application.js
+++ b/src/application.js
@@ -117,7 +117,6 @@ const Application = new Lang.Class({
 
     vfunc_startup: function() {
         this.parent();
-        String.prototype.format = Format.format;
 
         GtkClutter.init(null);
 
diff --git a/src/main.js b/src/main.js
index 663ac8c..15b3c98 100644
--- a/src/main.js
+++ b/src/main.js
@@ -25,6 +25,7 @@ const Application = imports.application;
 
 function main(args) {
     pkg.initGettext();
+    pkg.initFormat();
 
     let application = new Application.Application();
     return application.run(args);


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