From 2e2a4d1a24fee7b6d69db25f2069d1b417d0a219 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Tue, 27 Nov 2012 11:28:56 -0800 Subject: [PATCH] Bug 811162 - After switching the language in the settings app, the entire gaia window is half as tall. r=kaze --- b2g/chrome/content/settings.js | 4 +++- b2g/chrome/content/shell.js | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/b2g/chrome/content/settings.js b/b2g/chrome/content/settings.js index ad52f129e32c..5d0e5be15e9d 100644 --- a/b2g/chrome/content/settings.js +++ b/b2g/chrome/content/settings.js @@ -121,7 +121,9 @@ SettingsListener.observe('language.current', 'en-US', function(value) { Services.prefs.setCharPref(prefName, value + ', ' + intl); } - shell.start(); + if (shell.hasStarted() == false) { + shell.start(); + } }); // =================== RIL ==================== diff --git a/b2g/chrome/content/shell.js b/b2g/chrome/content/shell.js index 46e84d2ee763..f87c57acd5cf 100644 --- a/b2g/chrome/content/shell.js +++ b/b2g/chrome/content/shell.js @@ -152,9 +152,16 @@ var shell = { get manifestURL() { return Services.prefs.getCharPref('browser.manifestURL'); - }, + }, + + _started: false, + hasStarted: function shell_hasStarted() { + return this._started; + }, start: function shell_start() { + this._started = true; + // This forces the initialization of the cookie service before we hit the // network. // See bug 810209