2011-09-28 09:16:26 -04:00
|
|
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
2009-09-18 15:51:15 -04:00
|
|
|
|
2017-02-14 19:43:09 -05:00
|
|
|
const Config = imports.misc.config;
|
|
|
|
|
|
|
|
imports.gi.versions.Clutter = Config.LIBMUTTER_API_VERSION;
|
|
|
|
imports.gi.versions.Gtk = '3.0';
|
|
|
|
|
2009-09-18 15:51:15 -04:00
|
|
|
const Clutter = imports.gi.Clutter;
|
2014-09-18 22:22:02 -04:00
|
|
|
const Gio = imports.gi.Gio;
|
2009-09-18 15:51:15 -04:00
|
|
|
const GLib = imports.gi.GLib;
|
|
|
|
const St = imports.gi.St;
|
|
|
|
|
|
|
|
const Environment = imports.ui.environment;
|
|
|
|
|
2012-06-24 15:02:46 -04:00
|
|
|
function init(stage) {
|
2009-09-18 15:51:15 -04:00
|
|
|
Environment.init();
|
2018-02-21 07:01:56 -05:00
|
|
|
let themeResource = Gio.Resource.load(global.datadir + '/gnome-shell-theme.gresource');
|
|
|
|
themeResource._register();
|
|
|
|
|
2012-06-24 15:02:46 -04:00
|
|
|
let context = St.ThemeContext.get_for_stage(stage);
|
2009-09-18 15:51:15 -04:00
|
|
|
let stylesheetPath = GLib.getenv("GNOME_SHELL_TESTSDIR") + "/testcommon/test.css";
|
2014-09-18 22:22:02 -04:00
|
|
|
let theme = new St.Theme({ application_stylesheet: Gio.File.new_for_path(stylesheetPath) });
|
2012-06-24 15:02:46 -04:00
|
|
|
context.set_theme(theme);
|
2009-09-18 15:51:15 -04:00
|
|
|
}
|
2012-06-24 15:11:41 -04:00
|
|
|
|
|
|
|
function main(stage) {
|
|
|
|
stage.show();
|
2017-10-30 20:38:18 -04:00
|
|
|
stage.connect('destroy', () => {
|
2012-06-24 15:11:41 -04:00
|
|
|
Clutter.main_quit();
|
|
|
|
});
|
|
|
|
Clutter.main();
|
|
|
|
}
|