Bug 648543 - Restart popup is still displayed when the current language pack is selected again [r=mfinkle]

This commit is contained in:
Vivien Nicolas 2011-04-15 12:44:30 +02:00
Родитель 5d7ce76ef4
Коммит 671bc8629e
1 изменённых файлов: 5 добавлений и 10 удалений

Просмотреть файл

@ -39,7 +39,6 @@ var PreferencesView = {
_currentLocale: null, _currentLocale: null,
_languages: null, _languages: null,
_msg: null, _msg: null,
_restartCount: 0,
_messageActions: function pv__messageActions(aData) { _messageActions: function pv__messageActions(aData) {
if (aData == "prefs-restart-app") { if (aData == "prefs-restart-app") {
@ -78,9 +77,6 @@ var PreferencesView = {
}, },
showRestart: function ev_showRestart() { showRestart: function ev_showRestart() {
// Increment the count in case the view is not completely initialized
this._restartCount++;
if (this._msg) { if (this._msg) {
let strings = Strings.browser; let strings = Strings.browser;
this.showMessage(strings.GetStringFromName("notificationRestart.normal"), "restart-app", this.showMessage(strings.GetStringFromName("notificationRestart.normal"), "restart-app",
@ -89,8 +85,7 @@ var PreferencesView = {
}, },
hideRestart: function ev_hideRestart() { hideRestart: function ev_hideRestart() {
this._restartCount--; if (this._msg) {
if (this._restartCount == 0 && this._msg) {
let notification = this._msg.getNotificationWithValue("restart-app"); let notification = this._msg.getNotificationWithValue("restart-app");
if (notification) if (notification)
notification.close(); notification.close();