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