#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <locale.h>
#include <gtk/gtk.h>
#include <cspi/spi.h>
#include <libbonobo.h>
#define WINDOW_MAGIC 0x123456a
#define TEST_STRING_A "A test string"
+#define TEST_STRING_A_OBJECT "A_test_string_object"
#define TEST_STRING_B "Another test string"
static int print_tree_depth = 0;
{
TestWindow *win = g_new0 (TestWindow, 1);
GtkWidget *widget, *vbox;
+ AtkObject *obj;
win->magic = WINDOW_MAGIC;
win->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
widget = gtk_entry_new ();
gtk_entry_set_text (GTK_ENTRY (widget), TEST_STRING_A);
+ obj = gtk_widget_get_accessible (widget);
+ atk_object_set_name (obj, TEST_STRING_A_OBJECT);
+
test_window_add_and_show (GTK_CONTAINER (vbox), widget);
widget = gtk_button_new_with_label ("_Foobar");
g_assert (!strcmp (str, "GAIL"));
SPI_freeString (str);
+ str = AccessibleApplication_getLocale (application, LC_MESSAGES);
+ g_assert (!strcmp (str, setlocale (LC_MESSAGES, NULL)));
+ SPI_freeString (str);
+
str = AccessibleApplication_getVersion (application);
g_assert (str != NULL);
SPI_freeString (str);
g_assert (tmp != NULL);
if (print_tree)
fprintf (stderr, "Te");
- else
- test_text (tmp);
+ else {
+ if (strcmp (name, TEST_STRING_A_OBJECT) == 0)
+ test_text (tmp);
+ }
AccessibleText_unref (tmp);
}
/* Wait for any pending events from the registry */
g_usleep (500*1000);
for (i = 0; i < 100; i++)
- linc_main_iteration (FALSE);
+ CORBA_ORB_perform_work (NULL, NULL);
if ((leaked = SPI_exit ()))
g_error ("Leaked %d SPI handles", leaked);