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
+3
View File
@@ -0,0 +1,3 @@
EXTENSION_ID = example
include ../../extension.mk
+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);
}
+1
View File
@@ -0,0 +1 @@
{"uuid": "example@gnome-shell-extensions.gnome.org", "name": "Hello, World!", "description": "An example extension to show how it works. Shows Hello, world when clicking on the top panel.", "shell-version": [ "2.91.5" ]}
+8
View File
@@ -0,0 +1,8 @@
/* Example stylesheet */
.helloworld-label {
font-size: 36px;
font-weight: bold;
color: #ffffff;
background-color: rgba(10,10,10,0.7);
border-radius: 5px;
}