<2001-09-30 Bill Haneman <bill.haneman@sun.com>
-
+
* libspi/accessible.c:
Stubbed-in the implementations for
Accessibility_Accessible_getState and
Accessibility_Accessible_getRelationSet.
* libspi/registry.c:
Improved de-registration process and fixed some bugs,
- deregistration should work correctly
- once the compare_object_func()'s CORBA_Object_hash
- usage is fixed (currently still broken).
- (Probably the event listener registration still needs
- fixing.)
+ deregistration now works correctly.
* libspi/desktop.c:
Added initialization of applications list (to NULL).
* util/magnifier.c:
void
SPI_event_main (boolean isGNOMEApp)
{
- if (isGNOMEApp) bonobo_main();
- else CORBA_ORB_run (bonobo_orb(), &ev);
+ if (isGNOMEApp) {
+ g_atexit(SPI_exit);
+ bonobo_main();
+ }
+ else {
+ /* TODO: install signal handlers to do cleanup */
+ CORBA_ORB_run (bonobo_orb(), &ev);
+ fprintf (stderr, "orb loop exited...\n");
+ }
}
/**
void
SPI_exit (void)
{
+ fprintf (stderr, "bye-bye!\n");
exit(0);
}
compare_object_hash (gconstpointer p1, gconstpointer p2)
{
CORBA_Environment ev;
- long long diff = ((CORBA_Object_hash ((CORBA_Object) p2, (CORBA_unsigned_long) 0, &ev)) -
- (CORBA_Object_hash ((CORBA_Object) p1, (CORBA_unsigned_long) 0, &ev)));
+ gint retval;
+ retval = !CORBA_Object_is_equivalent ((CORBA_Object) p1, (CORBA_Object) p2, &ev);
#ifdef SPI_DEBUG
- fprintf (stderr, "comparing %p to %p, via hashes %ld and %ld; diff %ld\n",
+ fprintf (stderr, "comparing %p to %p; result %d\n",
p1, p2,
- CORBA_Object_hash ((CORBA_Object) p1, (CORBA_unsigned_long) 0, &ev),
- CORBA_Object_hash ((CORBA_Object) p2, (CORBA_unsigned_long) 0, &ev),
- (long) diff);
+ retval);
#endif
-
- return ((diff < 0) ? -1 : ((diff > 0) ? 1 : 0));
+ return retval;
}
static void
compare_object_hash (gconstpointer p1, gconstpointer p2)
{
CORBA_Environment ev;
- long long diff = ((CORBA_Object_hash ((CORBA_Object) p2, (CORBA_unsigned_long) 0, &ev)) -
- (CORBA_Object_hash ((CORBA_Object) p1, (CORBA_unsigned_long) 0, &ev)));
+ gint retval;
+ retval = !CORBA_Object_is_equivalent ((CORBA_Object) p1, (CORBA_Object) p2, &ev);
#ifdef SPI_DEBUG
- fprintf (stderr, "comparing %p to %p, via hashes %ld and %ld; diff %ld\n",
+ fprintf (stderr, "comparing %p to %p; result %d\n",
p1, p2,
- CORBA_Object_hash ((CORBA_Object) p1, (CORBA_unsigned_long) 0, &ev),
- CORBA_Object_hash ((CORBA_Object) p2, (CORBA_unsigned_long) 0, &ev),
- (long) diff);
+ retval);
#endif
-
- return ((diff < 0) ? -1 : ((diff > 0) ? 1 : 0));
+ return retval;
}
static void