[gnome-shell] Propagate version to Javascript files
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Propagate version to Javascript files
- Date: Wed, 12 Jan 2011 19:32:41 +0000 (UTC)
commit 6200daa5bb1ad72ef8ca8890309b6b84b0931dc9
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Jan 11 22:34:09 2011 +0100
Propagate version to Javascript files
Add an entry in config.js.in for PACKAGE_VERSION and GJS_VERSION,
to be used by the notification daemon and in the future by the
extension system.
https://bugzilla.gnome.org/show_bug.cgi?id=639255
configure.ac | 7 +++++++
js/misc/config.js.in | 7 +++++++
js/ui/notificationDaemon.js | 7 ++++---
3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0865507..a1d1bca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,9 @@ AC_CONFIG_SRCDIR([src/shell-global.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])
+AC_SUBST([PACKAGE_NAME], ["$PACKAGE_NAME"])
+AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION"])
+
AM_INIT_AUTOMAKE([1.10 dist-bzip2 no-dist-gzip foreign])
AM_MAINTAINER_MODE
@@ -78,6 +81,10 @@ PKG_CHECK_MODULES(MUTTER_PLUGIN, gio-2.0 >= $GIO_MIN_VERSION
gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
libcanberra)
+GJS_VERSION=`$PKG_CONFIG --modversion gjs-internals-1.0`
+AC_DEFINE_UNQUOTED([GJS_VERSION], ["$GJS_VERSION"], [The version of GJS we're linking to])
+AC_SUBST([GJS_VERSION], ["$GJS_VERSION"])
+
saved_CFLAGS=$CFLAGS
saved_LIBS=$LIBS
CFLAGS=$MUTTER_PLUGIN_CFLAGS
diff --git a/js/misc/config.js.in b/js/misc/config.js.in
index db8c6da..25a0e72 100644
--- a/js/misc/config.js.in
+++ b/js/misc/config.js.in
@@ -1,3 +1,10 @@
/* mode: js2; indent-tabs-mode: nil; tab-size: 4 */
+/* The name of this package (not localized) */
+const PACKAGE_NAME = '@PACKAGE_NAME@';
+/* The version of this package */
+const PACKAGE_VERSION = '@PACKAGE_VERSION@';
+/* The version of GJS we're linking to */
+const GJS_VERSION = '@GJS_VERSION@';
+/* 1 if gnome-bluetooth is available, 0 otherwise */
const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index cbf34cf..b87b3a4 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -9,6 +9,7 @@ const St = imports.gi.St;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
+const Config = imports.misc.config;
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;
const Params = imports.misc.params;
@@ -390,10 +391,10 @@ NotificationDaemon.prototype = {
GetServerInformation: function() {
return [
- 'GNOME Shell',
+ Config.PACKAGE_NAME,
'GNOME',
- '0.1', // FIXME, get this from somewhere
- '1.0'
+ Config.PACKAGE_VERSION,
+ '1.2'
];
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]