[gnome-shell] environment.js: set default direction for St widgets
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] environment.js: set default direction for St widgets
- Date: Mon, 16 Nov 2009 16:47:18 +0000 (UTC)
commit 9ba5ca019345aa62754a055afcca88a7a46a455f
Author: Abderrahim Kitouni <a kitouni gmail com>
Date: Sat Nov 14 18:08:27 2009 +0100
environment.js: set default direction for St widgets
https://bugzilla.gnome.org/show_bug.cgi?id=584662
js/ui/environment.js | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/environment.js b/js/ui/environment.js
index 6d0bb48..dbf8164 100644
--- a/js/ui/environment.js
+++ b/js/ui/environment.js
@@ -1,6 +1,7 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const St = imports.gi.St;
+const Gettext_gtk20 = imports.gettext.domain('gtk20');
const Tweener = imports.ui.tweener;
@@ -33,4 +34,9 @@ _patchContainerClass(St.Table);
function init() {
Tweener.init();
String.prototype.format = Format.format;
+
+ // Set the default direction for St widgets (this needs to be done before any use of St)
+ if (Gettext_gtk20.gettext("default:LTR") == "default:RTL") {
+ St.Widget.set_default_direction(St.TextDirection.RTL);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]