Initial commit.
Creating the standard Autotools infrastructure and adding the first extensions (the Hello, World! provided by the wizard).
This commit is contained in:
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
Makefile.in.in
|
||||
configure
|
||||
config.log
|
||||
config.status
|
||||
config/
|
||||
aclocal.m4
|
||||
autom4te.cache/
|
||||
m4/
|
||||
po/POTFILES
|
||||
po/stamp-it
|
||||
11
HACKING
Normal file
11
HACKING
Normal file
@@ -0,0 +1,11 @@
|
||||
To create a new extension, add a subdirectory in extensions.
|
||||
Then create a Makefile.am like the one in example, replacing
|
||||
the EXTENSION_ID with the basename of your extension, which
|
||||
must match the UUID in metadata.json.
|
||||
If you need additional files, add them to EXTENSION_EXTRA.
|
||||
|
||||
Then modify extensions/Makefile.am and configure.ac. It should
|
||||
be pretty self-explanatory.
|
||||
|
||||
Don't forget to add any translatable file to po/POTFILES.in, and
|
||||
then you're done.
|
||||
3
Makefile.am
Normal file
3
Makefile.am
Normal file
@@ -0,0 +1,3 @@
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
SUBDIRS = extensions
|
||||
26
README
Normal file
26
README
Normal file
@@ -0,0 +1,26 @@
|
||||
GNOME Shell Extensions is a collection of extensions providing additional
|
||||
and optional functionality to GNOME Shell.
|
||||
Since GNOME Shell is not API stable, extensions work only against a very
|
||||
specific version of the shell, usually the same as this package (see
|
||||
"configure --version"). Also, since extensions are built from many
|
||||
individual contributors, we cannot guarantee stability or quality for any
|
||||
specific extension.
|
||||
For these reasons, distributions are advised to avoid installing or packaging
|
||||
this module by defaul.
|
||||
|
||||
For more information about GNOME Shell Extensions
|
||||
http://live.gnome.org/GnomeShell/Extensions
|
||||
|
||||
For general information about GNOME Shell
|
||||
http://live.gnome.org/GnomeShell
|
||||
|
||||
Bugs should be reported at http://bugzilla.gnome.org against the 'gnome-shell'
|
||||
product, with the 'extensions' component.
|
||||
|
||||
License
|
||||
=======
|
||||
GNOME Shell Extensions are distributed under the terms of the GNU General Public License,
|
||||
version 2 or later. See the COPYING file for details.
|
||||
Individual extensions may be licensed under different terms, see each source
|
||||
file for details.
|
||||
|
||||
20
autogen.sh
Executable file
20
autogen.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
PKG_NAME="gnome-shell-extensions"
|
||||
|
||||
test -f $srcdir/configure.ac || {
|
||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
||||
echo " top-level gnome-shell-extensions directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
which gnome-autogen.sh || {
|
||||
echo "You need to install gnome-common from GNOME Git (or from"
|
||||
echo "your OS vendor's package manager)."
|
||||
exit 1
|
||||
}
|
||||
. gnome-autogen.sh
|
||||
54
configure.ac
Normal file
54
configure.ac
Normal file
@@ -0,0 +1,54 @@
|
||||
AC_PREREQ(2.63)
|
||||
AC_INIT([gnome-shell-extensions],[2.91.5],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell&component=extensions])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_AUX_DIR([config])
|
||||
|
||||
AM_INIT_AUTOMAKE([1.10 dist-bzip2 no-dist-gzip foreign])
|
||||
|
||||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
||||
|
||||
GETTEXT_PACKAGE=gnome-shell-extensions
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
||||
[The prefix for our gettext translation domains.])
|
||||
IT_PROG_INTLTOOL(0.26)
|
||||
|
||||
PKG_PROG_PKG_CONFIG([0.22])
|
||||
|
||||
ADDITIONAL_PACKAGES=
|
||||
|
||||
dnl keep this in sync with extensions/Makefile.am
|
||||
ALL_EXTENSIONS=example
|
||||
AC_ARG_ENABLE([extensions],
|
||||
[AS_HELP_STRING([--enable-extensions],[Space separated list of extensions to enable. Default is that all extensions are built.])],
|
||||
[],
|
||||
[enable_extensions=$ALL_EXTENSIONS]
|
||||
)
|
||||
ENABLED_EXTENSIONS=
|
||||
for e in $enable_extensions; do
|
||||
case $e in
|
||||
*example*)
|
||||
ENABLED_EXTENSIONS="$ENABLED_EXTENSIONS example"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([invalid extension $e])
|
||||
esac
|
||||
done
|
||||
|
||||
AC_SUBST(ENABLED_EXTENSIONS, [$ENABLED_EXTENSIONS])
|
||||
|
||||
dnl We don't really need cflags or libdirs, we just check
|
||||
dnl to ensure we don't fail at runtime.
|
||||
|
||||
if test "x$ADDITIONAL_PACKAGES" != x; then
|
||||
PKG_CHECK_MODULES(ADDITIONAL, [$ADDITIONAL_PACKAGES])
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
extensions/Makefile
|
||||
extensions/example/Makefile
|
||||
po/Makefile.in
|
||||
])
|
||||
AC_OUTPUT
|
||||
9
extension.mk
Normal file
9
extension.mk
Normal file
@@ -0,0 +1,9 @@
|
||||
# Change these to modify how installation is performed
|
||||
# If you modify extensionbase, you also need to modify
|
||||
# metadata.json of each extension
|
||||
topextensiondir = $(datadir)/gnome-shell/extensions
|
||||
extensionbase = @gnome-shell-extensions.gnome.org
|
||||
|
||||
extensiondir = $(topextensiondir)/$(EXTENSION_ID)$(extensionbase)
|
||||
|
||||
extension_DATA = metadata.json extension.js stylesheet.css $(EXTRA_EXTENSION)
|
||||
3
extensions/Makefile.am
Normal file
3
extensions/Makefile.am
Normal file
@@ -0,0 +1,3 @@
|
||||
DIST_SUBDIRS = example
|
||||
|
||||
SUBDIRS = $(ENABLED_EXTENSIONS)
|
||||
3
extensions/example/Makefile.am
Normal file
3
extensions/example/Makefile.am
Normal file
@@ -0,0 +1,3 @@
|
||||
EXTENSION_ID = example
|
||||
|
||||
include ../../extension.mk
|
||||
19
extensions/example/extension.js
Normal file
19
extensions/example/extension.js
Normal 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
extensions/example/metadata.json
Normal file
1
extensions/example/metadata.json
Normal 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
extensions/example/stylesheet.css
Normal file
8
extensions/example/stylesheet.css
Normal 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;
|
||||
}
|
||||
1
po/POTFILES.in
Normal file
1
po/POTFILES.in
Normal file
@@ -0,0 +1 @@
|
||||
extensions/example/extension.js
|
||||
Reference in New Issue
Block a user