2009-02-26 17:05:35 -05:00
|
|
|
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
|
|
|
|
|
|
const Clutter = imports.gi.Clutter;
|
|
|
|
const Lang = imports.lang;
|
|
|
|
const Signals = imports.signals;
|
2009-12-02 12:13:24 -05:00
|
|
|
const St = imports.gi.St;
|
2009-02-26 17:05:35 -05:00
|
|
|
|
|
|
|
function Link(props) {
|
|
|
|
this._init(props);
|
|
|
|
}
|
|
|
|
|
|
|
|
Link.prototype = {
|
|
|
|
_init : function(props) {
|
2009-12-02 12:13:24 -05:00
|
|
|
let realProps = { reactive: true,
|
2010-05-15 12:43:56 -04:00
|
|
|
track_hover: true,
|
2009-12-02 12:13:24 -05:00
|
|
|
style_class: 'shell-link' };
|
2009-02-26 17:05:35 -05: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 12:13:24 -05:00
|
|
|
Lang.copyProperties(props, realProps);
|
2009-02-26 17:05:35 -05:00
|
|
|
|
2009-12-02 12:13:24 -05:00
|
|
|
this.actor = new St.Button(realProps);
|
2009-02-26 17:05:35 -05:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
Signals.addSignalMethods(Link.prototype);
|