2011-09-28 13:16:26 +00:00
|
|
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
2009-02-26 22:05:35 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2011-11-20 16:07:14 +00:00
|
|
|
const Link = new Lang.Class({
|
|
|
|
Name: 'Link',
|
2009-02-26 22:05:35 +00:00
|
|
|
|
|
|
|
_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
|
|
|
}
|
2011-11-20 16:07:14 +00:00
|
|
|
});
|
2009-02-26 22:05:35 +00:00
|
|
|
Signals.addSignalMethods(Link.prototype);
|