[extensions-web] js: Add new "INITIALIZED" state
- From: Jasper St. Pierre <jstpierre src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [extensions-web] js: Add new "INITIALIZED" state
 
- Date: Thu, 27 Oct 2011 21:31:29 +0000 (UTC)
 
commit 93affda81f444bc5432e2a9a29db1e1f21902a2d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Oct 27 17:15:35 2011 -0400
    js: Add new "INITIALIZED" state
 sweettooth/static/js/extensions.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/static/js/extensions.js b/sweettooth/static/js/extensions.js
index d6d1b35..79b424f 100644
--- a/sweettooth/static/js/extensions.js
+++ b/sweettooth/static/js/extensions.js
@@ -15,6 +15,7 @@ function($, messages, dbusProxy) {
         ERROR: 3,
         OUT_OF_DATE: 4,
         DOWNLOADING: 5,
+        INITIALIZED: 6,
 
         // Not a real state, used when there's no extension
         // with the associated UUID in the extension map.
@@ -103,7 +104,8 @@ function($, messages, dbusProxy) {
                     // If the extension is uninstalled and we
                     // flick the switch on, install.
                     dbusProxy.InstallExtension(uuid, $elem.data('pk').toString());
-                } else if (oldState == ExtensionState.DISABLED) {
+                } else if (oldState == ExtensionState.DISABLED ||
+                           oldState == ExtensionState.INITIALIZED) {
                     dbusProxy.EnableExtension(uuid);
                 }
             } else {
@@ -117,6 +119,7 @@ function($, messages, dbusProxy) {
             $switch.switchify('insensitive', false);
             $switch.tipsy({ gravity: 'e', fade: true });
             if (newState == ExtensionState.DISABLED ||
+                newState == ExtensionState.INITIALIZED ||
                 newState == ExtensionState.UNINSTALLED) {
                 $switch.switchify('activate', false);
             } else if (newState == ExtensionState.ENABLED) {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]