util: Move the text direction stuff out of MetaUI

GTK+ doesn't need to be initialized to get locale direction,
which means we can do this without bringing up MetaUI at all.
This commit is contained in:
Jasper St. Pierre
2014-08-17 22:57:51 -04:00
parent 7d1ef3f447
commit f42258327b
7 changed files with 26 additions and 22 deletions

View File

@@ -946,5 +946,19 @@ meta_later_remove (guint later_id)
}
}
MetaLocaleDirection
meta_get_locale_direction (void)
{
switch (gtk_get_locale_direction ())
{
case GTK_TEXT_DIR_LTR:
return META_LOCALE_DIRECTION_LTR;
case GTK_TEXT_DIR_RTL:
return META_LOCALE_DIRECTION_RTL;
default:
g_assert_not_reached ();
}
}
/* eof util.c */