summaryrefslogtreecommitdiff
path: root/gtk/testtext.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/testtext.c')
-rw-r--r--gtk/testtext.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/gtk/testtext.c b/gtk/testtext.c
index 5424dc0f7f..279535aecd 100644
--- a/gtk/testtext.c
+++ b/gtk/testtext.c
@@ -1922,13 +1922,32 @@ create_view (Buffer *buffer)
return view;
}
+static gboolean
+file_exists (const char *filename)
+{
+ struct stat statbuf;
+
+ return stat (filename, &statbuf) == 0;
+}
+void
+test_init ()
+{
+ if (file_exists ("../gdk-pixbuf/.libs/libpixbufloader-pnm.so"))
+ {
+ putenv ("GDK_PIXBUF_MODULEDIR=../gdk-pixbuf/.libs");
+ putenv ("GTK_IM_MODULE_FILE=./gtk.immodules");
+ }
+}
+
int
main (int argc, char** argv)
{
Buffer *buffer;
View *view;
int i;
-
+
+ test_init ();
+ gtk_set_locale ();
gtk_init (&argc, &argv);
buffer = create_buffer ();