[gnome-shell] extensionSystem: Add a DOWNLOADING state



commit 465d03ab2cca191d83679d47b8c023d7953f81a8
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jun 27 22:27:56 2011 -0400

    extensionSystem: Add a DOWNLOADING state
    
    https://bugzilla.gnome.org/show_bug.cgi?id=654770

 js/ui/extensionSystem.js |    7 +++++++
 js/ui/lookingGlass.js    |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index 3bd0cbe..364d106 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -16,6 +16,7 @@ const ExtensionState = {
     DISABLED: 2,
     ERROR: 3,
     OUT_OF_DATE: 4,
+    DOWNLOADING: 5,
 
     // Used as an error state for operations on unknown extensions,
     // should never be in a real extensionMeta object.
@@ -113,6 +114,12 @@ function installExtensionFromManifestURL(uuid, url) {
                 return;
             }
 
+            let meta = extensionMeta[uuid] = { uuid: uuid,
+                                               state: ExtensionState.DOWNLOADING,
+                                               error: '' };
+
+            _signals.emit('extension-state-changed', meta);
+
             installExtensionFromManifest(manifest, meta);
         });
 }
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index 03830c2..c646d61 100644
--- a/js/ui/lookingGlass.js
+++ b/js/ui/lookingGlass.js
@@ -690,6 +690,8 @@ Extensions.prototype = {
                 return _("Error");
             case ExtensionSystem.ExtensionState.OUT_OF_DATE:
                 return _("Out of date");
+            case ExtensionSystem.ExtensionState.DOWNLOADING:
+                return _("Downloading");
         }
         return 'Unknown'; // Not translated, shouldn't appear
     },



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