[polari] Use pkg module for String.format() monkey-patching



commit 7f91c20763086638b6de4385e6929a8224ae1979
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Feb 23 00:20:32 2015 +0100

    Use pkg module for String.format() monkey-patching

 src/application.js |    3 ---
 src/main.js        |    2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index cdef000..a21677e 100644
--- a/src/application.js
+++ b/src/application.js
@@ -13,7 +13,6 @@ const AccountsMonitor = imports.accountsMonitor;
 const AppNotifications = imports.appNotifications;
 const ChatroomManager = imports.chatroomManager;
 const Connections = imports.connections;
-const Format = imports.format;
 const Gettext = imports.gettext;
 const Lang = imports.lang;
 const MainWindow = imports.mainWindow;
@@ -48,8 +47,6 @@ const Application = new Lang.Class({
         resource._register();
 
         this.parent();
-        String.prototype.format = Format.format;
-
         window._ = Gettext.gettext;
         window.C_ = Gettext.pgettext;
         window.ngettext = Gettext.ngettext;
diff --git a/src/main.js b/src/main.js
index c1703e5..664668a 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,3 +1,5 @@
+pkg.initFormat();
+
 const Application = imports.application;
 const GLib = imports.gi.GLib;
 


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