[gnome-shell/wip/message-tray: 19/19] tour garbage



commit 3f419bd8119eaa5e1dad2c6d13c81cb5f4812c95
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Aug 3 11:47:45 2012 -0300

    tour garbage
    
    not working yet xxx

 js/Makefile.am       |    2 ++
 js/misc/config.js.in |    3 +++
 js/tour/main.js      |   29 +++++++++++++++++++++++++++++
 3 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/js/Makefile.am b/js/Makefile.am
index 91dc84c..7d5abe0 100644
--- a/js/Makefile.am
+++ b/js/Makefile.am
@@ -11,6 +11,8 @@ misc/config.js: misc/config.js.in Makefile
 	    -e "s|[ ]datadir@|$(datadir)|g" \
 	    -e "s|[ ]libexecdir@|$(libexecdir)|g" \
 	    -e "s|[ ]sysconfdir@|$(sysconfdir)|g" \
+	    -e "s|[ ]MUTTER_TYPELIB_DIR@|$(MUTTER_TYPELIB_DIR)|g" \
+	    -e "s|[ ]pkglibdir@|$(pkglibdir)|g" \
                $< > $@
 
 jsdir = $(pkgdatadir)/js
diff --git a/js/misc/config.js.in b/js/misc/config.js.in
index 9769104..ac5a631 100644
--- a/js/misc/config.js.in
+++ b/js/misc/config.js.in
@@ -13,3 +13,6 @@ const LOCALEDIR = '@datadir@/locale';
 /* other standard directories */
 const LIBEXECDIR = '@libexecdir@';
 const SYSCONFDIR = '@sysconfdir@';
+
+const MUTTER_TYPELIB_DIR = '@MUTTER_TYPELIB_DIR@';
+const GNOME_SHELL_PKGLIBDIR = '@pkglibdir@';
diff --git a/js/tour/main.js b/js/tour/main.js
new file mode 100644
index 0000000..c1129ca
--- /dev/null
+++ b/js/tour/main.js
@@ -0,0 +1,29 @@
+
+imports.searchPath.push('.');
+
+const Config = imports.misc.config;
+
+const GIRepository = imports.gi.GIRepository;
+GIRepository.Repository.prepend_search_path(Config.MUTTER_TYPELIB_DIR);
+GIRepository.Repository.prepend_search_path(Config.GNOME_SHELL_PKGLIBDIR);
+
+const Environment = imports.ui.environment;
+Environment.init();
+
+const Clutter = imports.gi.Clutter;
+const Gtk = imports.gi.Gtk;
+const St = imports.gi.St;
+const Meta = imports.gi.Meta;
+
+const Panel = imports.ui.panel;
+
+function main() {
+    Gtk.init(null);
+    Clutter.init(null);
+
+    let stage = new Clutter.Stage({ width: 800, height: 600, title: "GNOME Shell Tour" });
+    stage.show();
+
+    Clutter.main();
+}
+main();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]