environment: Get text direction from GTK+-3
Despite of switching to GTK+-3 unconditionally, the default text direction was still taken from GTK+-2.
This commit is contained in:
parent
b25bad9995
commit
4517f60630
@ -4,7 +4,7 @@ const Clutter = imports.gi.Clutter;;
|
|||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const Gettext_gtk20 = imports.gettext.domain('gtk20');
|
const Gettext_gtk30 = imports.gettext.domain('gtk30');
|
||||||
|
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ function init() {
|
|||||||
String.prototype.format = Format.format;
|
String.prototype.format = Format.format;
|
||||||
|
|
||||||
// Set the default direction for St widgets (this needs to be done before any use of St)
|
// 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') {
|
if (Gettext_gtk30.gettext('default:LTR') == 'default:RTL') {
|
||||||
St.Widget.set_default_direction(St.TextDirection.RTL);
|
St.Widget.set_default_direction(St.TextDirection.RTL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user