Initial commit.

Creating the standard Autotools infrastructure and adding the
first extensions (the Hello, World! provided by the wizard).
This commit is contained in:
Giovanni Campagna
2011-01-12 17:32:40 +01:00
commit ec6bbef28a
13 changed files with 170 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
// Sample extension code, makes clicking on the panel show a message
const St = imports.gi.St;
const Mainloop = imports.mainloop;
const Main = imports.ui.main;
function _showHello() {
let text = new St.Label({ style_class: 'helloworld-label', text: "Hello, world!" });
let monitor = global.get_primary_monitor();
global.stage.add_actor(text);
text.set_position(Math.floor (monitor.width / 2 - text.width / 2), Math.floor(monitor.height / 2 - text.height / 2));
Mainloop.timeout_add(3000, function () { text.destroy(); });
}
// Put your extension initialization code here
function main() {
Main.panel.actor.reactive = true;
Main.panel.actor.connect('button-release-event', _showHello);
}