theme: convert stylesheet loading to GFile

In preparation to making it a GResource.

https://bugzilla.gnome.org/show_bug.cgi?id=736936
This commit is contained in:
Cosimo Cecchi
2014-09-18 19:22:02 -07:00
committed by Jasper St. Pierre
parent 328bb1c21b
commit 642bf2b778
6 changed files with 113 additions and 97 deletions

View File

@@ -1,6 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const St = imports.gi.St;
@@ -10,7 +11,7 @@ function init(stage) {
Environment.init();
let context = St.ThemeContext.get_for_stage(stage);
let stylesheetPath = GLib.getenv("GNOME_SHELL_TESTSDIR") + "/testcommon/test.css";
let theme = new St.Theme({ application_stylesheet: stylesheetPath });
let theme = new St.Theme({ application_stylesheet: Gio.File.new_for_path(stylesheetPath) });
context.set_theme(theme);
}