[gnome-shell/wip/fmuellner/test-fixes: 5/6] tests: Fix import error in calendar
- From: Florian MĂźllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/test-fixes: 5/6] tests: Fix import error in calendar
- Date: Wed, 21 Feb 2018 13:32:20 +0000 (UTC)
commit 23d6c4dcc007f17059728cbdcbd401cf0dc07705
Author: Florian MĂźllner <fmuellner gnome org>
Date: Wed Feb 21 12:28:20 2018 +0100
tests: Fix import error in calendar
The Calendar module requires C_ at import time, which is only
available after Environment.init() has been called.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38
tests/interactive/calendar.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/interactive/calendar.js b/tests/interactive/calendar.js
index a54b562d5..f2a70bb72 100644
--- a/tests/interactive/calendar.js
+++ b/tests/interactive/calendar.js
@@ -6,8 +6,6 @@ const Clutter = imports.gi.Clutter;
const Lang = imports.lang;
const St = imports.gi.St;
-const Calendar = imports.ui.calendar;
-
function test() {
let stage = new Clutter.Stage({ width: 400, height: 400 });
UI.init(stage);
@@ -18,6 +16,8 @@ function test() {
style: 'padding: 10px; spacing: 10px; font: 15px sans-serif;' });
stage.add_actor(vbox);
+ // Calendar can only be imported after Environment.init()
+ const Calendar = imports.ui.calendar;
let calendar = new Calendar.Calendar();
vbox.add(calendar.actor,
{ expand: true,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]