[gnome-shell] link: Remove
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] link: Remove
- Date: Tue, 17 Jul 2012 00:40:18 +0000 (UTC)
commit 75d0362cd876c104bf3ff850ab816342e7ce41e0
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Jul 14 18:49:06 2012 -0400
link: Remove
The looking glass is the only consumer of the Link, and it's such a
basic wrapper around a button that it's not worth it.
https://bugzilla.gnome.org/show_bug.cgi?id=679944
js/Makefile.am | 1 -
js/ui/link.js | 21 ---------------------
js/ui/lookingGlass.js | 44 +++++++++++++++++++++++++++-----------------
3 files changed, 27 insertions(+), 39 deletions(-)
---
diff --git a/js/Makefile.am b/js/Makefile.am
index 5c56c9c..02ab5d9 100644
--- a/js/Makefile.am
+++ b/js/Makefile.am
@@ -57,7 +57,6 @@ nobase_dist_js_DATA = \
ui/keyringPrompt.js \
ui/layout.js \
ui/lightbox.js \
- ui/link.js \
ui/lookingGlass.js \
ui/magnifier.js \
ui/magnifierDBus.js \
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index d28d2a2..68ab8ca 100644
--- a/js/ui/lookingGlass.js
+++ b/js/ui/lookingGlass.js
@@ -17,7 +17,6 @@ const System = imports.system;
const History = imports.misc.history;
const ExtensionSystem = imports.ui.extensionSystem;
const ExtensionUtils = imports.misc.extensionUtils;
-const Link = imports.ui.link;
const ShellEntry = imports.ui.shellEntry;
const Tweener = imports.ui.tweener;
const Main = imports.ui.main;
@@ -264,7 +263,6 @@ function objectToString(o) {
const ObjLink = new Lang.Class({
Name: 'ObjLink',
- Extends: Link.Link,
_init: function(o, title) {
let text;
@@ -275,7 +273,10 @@ const ObjLink = new Lang.Class({
text = GLib.markup_escape_text(text, -1);
this._obj = o;
- this.parent({ label: text });
+ this.actor = new St.Button({ reactive: true,
+ track_hover: true,
+ style_class: 'shell-link',
+ label: text });
this.actor.get_child().single_line_mode = true;
this.actor.connect('clicked', Lang.bind(this, this._onClicked));
},
@@ -799,24 +800,33 @@ const Extensions = new Lang.Class({
text: this._stateToString(extension.state) });
metaBox.add(state);
- let viewsource = new Link.Link({ label: _("View Source") });
- viewsource.actor._extension = extension;
- viewsource.actor.connect('clicked', Lang.bind(this, this._onViewSource));
- metaBox.add(viewsource.actor);
+ let viewsource = new St.Button({ reactive: true,
+ track_hover: true,
+ style_class: 'shell-link',
+ label: _("View Source") });
+ viewsource._extension = extension;
+ viewsource.connect('clicked', Lang.bind(this, this._onViewSource));
+ metaBox.add(viewsource);
if (extension.metadata.url) {
- let webpage = new Link.Link({ label: _("Web Page") });
- webpage.actor._extension = extension;
- webpage.actor.connect('clicked', Lang.bind(this, this._onWebPage));
- metaBox.add(webpage.actor);
+ let webpage = new St.Button({ reactive: true,
+ track_hover: true,
+ style_class: 'shell-link',
+ label: _("Web Page") });
+ webpage._extension = extension;
+ webpage.connect('clicked', Lang.bind(this, this._onWebPage));
+ metaBox.add(webpage);
}
- let viewerrors = new Link.Link({ label: _("Show Errors") });
- viewerrors.actor._extension = extension;
- viewerrors.actor._parentBox = box;
- viewerrors.actor._isShowing = false;
- viewerrors.actor.connect('clicked', Lang.bind(this, this._onViewErrors));
- metaBox.add(viewerrors.actor);
+ let viewerrors = new St.Button({ reactive: true,
+ track_hover: true,
+ style_class: 'shell-link',
+ label: _("Show Errors") });
+ viewerrors._extension = extension;
+ viewerrors._parentBox = box;
+ viewerrors._isShowing = false;
+ viewerrors.connect('clicked', Lang.bind(this, this._onViewErrors));
+ metaBox.add(viewerrors);
return box;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]