2009-02-26 22:05:35 +00:00
|
|
|
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
|
|
|
|
|
|
const Lang = imports.lang;
|
|
|
|
const Signals = imports.signals;
|
2009-12-02 17:13:24 +00:00
|
|
|
const St = imports.gi.St;
|
2009-02-26 22:05:35 +00:00
|
|
|
|
|
|
|
function Link(props) {
|
|
|
|
this._init(props);
|
|
|
|
}
|
|
|
|
|
|
|
|
Link.prototype = {
|
|
|
|
_init : function(props) {
|
2009-12-02 17:13:24 +00:00
|
|
|
let realProps = { reactive: true,
|
2010-05-15 16:43:56 +00:00
|
|
|
track_hover: true,
|
2009-12-02 17:13:24 +00:00
|
|
|
style_class: 'shell-link' };
|
2009-02-26 22:05:35 +00:00
|
|
|
// The user can pass in reactive: false to override the above and get
|
|
|
|
// a non-reactive link (a link to the current page, perhaps)
|
2009-12-02 17:13:24 +00:00
|
|
|
Lang.copyProperties(props, realProps);
|
2009-02-26 22:05:35 +00:00
|
|
|
|
2009-12-02 17:13:24 +00:00
|
|
|
this.actor = new St.Button(realProps);
|
2009-02-26 22:05:35 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
Signals.addSignalMethods(Link.prototype);
|