reftests: Add a way to hardcode text direction

Some tests don't work in rtl, so add a way to hardcode
the expected text direction. This is in preparation for
running reftests in an rtl locale.
This commit is contained in:
Matthias Clasen 2014-06-03 12:25:23 -04:00
parent 94f573d8a4
commit ac59f0ac08

View File

@ -22,6 +22,21 @@
#include <gtk/gtk.h>
G_MODULE_EXPORT void
set_default_direction_ltr (void)
{
g_test_message ("Attention: globally setting default text direction to LTR");
gtk_widget_set_default_direction (GTK_TEXT_DIR_LTR);
}
G_MODULE_EXPORT void
set_default_direction_rtl (void)
{
g_test_message ("Attention: globally setting default text direction to RTL");
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
}
G_MODULE_EXPORT void
switch_default_direction (void)
{
@ -71,4 +86,3 @@ swap_child (GtkWidget *window)
gtk_widget_show (image);
gtk_container_add (GTK_CONTAINER (window), image);
}