lookingGlass: Show extension state in gnome-shell

We translate and create an actor to show the extension state, but we never
actually add it anywhere. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=660494
This commit is contained in:
Jasper St. Pierre 2011-09-29 12:34:46 -04:00
parent 751d250471
commit 70eeb75716
2 changed files with 5 additions and 9 deletions

View File

@ -907,7 +907,7 @@ StTooltip StLabel {
font-weight: bold; font-weight: bold;
} }
.lg-extension-actions { .lg-extension-meta {
spacing: 6px; spacing: 6px;
} }

View File

@ -738,27 +738,23 @@ Extensions.prototype = {
text: meta.description || 'No description' }); text: meta.description || 'No description' });
box.add(description, { expand: true }); box.add(description, { expand: true });
let metaBox = new St.BoxLayout(); let metaBox = new St.BoxLayout({ style_class: 'lg-extension-meta' });
box.add(metaBox); box.add(metaBox);
let stateString = this._stateToString(meta.state); let stateString = this._stateToString(meta.state);
let state = new St.Label({ style_class: 'lg-extension-state', let state = new St.Label({ style_class: 'lg-extension-state',
text: this._stateToString(meta.state) }); text: this._stateToString(meta.state) });
metaBox.add(state);
let actionsContainer = new St.Bin({ x_align: St.Align.END });
metaBox.add(actionsContainer);
let actionsBox = new St.BoxLayout({ style_class: 'lg-extension-actions' });
actionsContainer.set_child(actionsBox);
let viewsource = new Link.Link({ label: _("View Source") }); let viewsource = new Link.Link({ label: _("View Source") });
viewsource.actor._extensionMeta = meta; viewsource.actor._extensionMeta = meta;
viewsource.actor.connect('clicked', Lang.bind(this, this._onViewSource)); viewsource.actor.connect('clicked', Lang.bind(this, this._onViewSource));
actionsBox.add(viewsource.actor); metaBox.add(viewsource.actor);
if (meta.url) { if (meta.url) {
let webpage = new Link.Link({ label: _("Web Page") }); let webpage = new Link.Link({ label: _("Web Page") });
webpage.actor._extensionMeta = meta; webpage.actor._extensionMeta = meta;
webpage.actor.connect('clicked', Lang.bind(this, this._onWebPage)); webpage.actor.connect('clicked', Lang.bind(this, this._onWebPage));
actionsBox.add(webpage.actor); metaBox.add(webpage.actor);
} }
let viewerrors = new Link.Link({ label: _("Show Errors") }); let viewerrors = new Link.Link({ label: _("Show Errors") });