[extensions-web] js: Fix the shell restart handler
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] js: Fix the shell restart handler
- Date: Sun, 3 Jun 2012 01:21:58 +0000 (UTC)
commit b60261d330eb89f4dcd5148a3e552c9ba69d0fc0
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue May 22 13:10:20 2012 -0400
js: Fix the shell restart handler
sweettooth/static/js/extensions.js | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/sweettooth/static/js/extensions.js b/sweettooth/static/js/extensions.js
index 326bea2..477b05e 100644
--- a/sweettooth/static/js/extensions.js
+++ b/sweettooth/static/js/extensions.js
@@ -68,17 +68,16 @@ function($, messages, dbusProxy, extensionUtils, templates) {
// uuid => elem
var elems = {};
- dbusProxy.extensionStateChangedHandler = function(uuid, newState, _) {
+ function extensionStateChanged(uuid) {
if (elems[uuid] !== undefined)
elems[uuid].trigger('state-changed', newState);
- };
+ }
+
+ dbusProxy.extensionStateChangedHandler = extensionStateChanged;
dbusProxy.shellRestartHandler = function() {
dbusProxy.ListExtensions().done(function(extensions) {
- $.each(extensions, function(meta) {
- if (elems[uuid] !== undefined)
- elems[uuid].trigger('state-changed', meta.state);
- });
+ $.each(extensions, extensionStateChanged);
});
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]