summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>2003-12-04 23:07:12 +0000
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>2003-12-04 23:07:12 +0000
commitbf33393914582819faad2e404291c7deb53bec98 (patch)
treee34f23161b2a039be30bfc04cfa2dc4bbba2494d
parent1b83d2d61e41423e6d48a1dc23df006c30e354bb (diff)
downloadat-spi2-core-bf33393914582819faad2e404291c7deb53bec98.tar.gz
Revved to 1.3.8. Fix for 121974. Added Application_getLocale.
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@570 e2bd861d-eb25-0410-b326-f6ed22b6b98c
-rw-r--r--ChangeLog23
-rw-r--r--NEWS24
-rw-r--r--README3
-rw-r--r--atk-bridge/bridge.c1
-rw-r--r--configure.in8
-rw-r--r--cspi/spi.h1
-rw-r--r--cspi/spi_application.c47
-rw-r--r--idl/Accessibility_Application.idl22
-rw-r--r--libspi/application.c32
-rw-r--r--test/test-simple.c5
10 files changed, 157 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 2703274c..b0430c56 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2003-12-04 Bill Haneman <billh@gnome.org>
+
+ Fix for bug #121974.
+
+ * idl/Accessibility_Application.idl:
+ (Accessibility::LOCALE_TYPE): New enum, corresponds to
+ setlocale's LC_TYPEs.
+ (Accessibility::Application::getLocale): New method.
+ Allows clients to query the locale, by type, of an app.
+
+ * cspi/spi.h:
+ * cspi/spi_application.c:
+ (AccessibleApplication_getLocale): New method, wraps IDL above.
+
+ * libspi/application.c:
+ (spi_application_class_init): Init epv entry for getLocale.
+ (impl_accessibility_application_get_locale): Impl for above.
+
+ * test/test-simple.c:
+ (test_application): Added assertion for getLocale, i.e.
+ that the string from AccessibleApplication_getLocale (app, type)
+ is the same as that from setlocale (type, NULL);
+
2003-12-03 Padraig O'Briain <padraig.obriain@sun.com>
*registryd/deviceeventcontroller.c: Add an idle handler which polls
diff --git a/NEWS b/NEWS
index 7f3b2a97..da888238 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,29 @@
(top)
in HEAD:
+What's new in at-spi-1.3.8:
+
+* New api: AccessibleApplication_getLocale (app, type),
+ returns a POSIX locale string for a locale category,
+ for instance Accessibility_LOCALE_TYPE_MESSAGES.
+
+* New SPI_ROLE_EDITBAR.
+
+* New Accessible_getLocalizedRoleName.
+
+* New AccessibleText_getDefaultAttributes.
+
+* fixes to AccessibleStreamableContent, including a 'seek'
+ implementation for cspi. Thanks to Michael Meeks for some
+ related bugfixes in StreamableContent.
+
+* now we emit key-released events to appropriate keylisteners.
+
+* new LINGUAS in configure.in: nn (Asmund Sjeveland), lt (Gediminas Paulauskas),
+ no (Kjartan Masass), eu (Christian Rose).
+
+* bugfixes for: #120991, #120473, #118581, #127463, #116009, #114926,
+ #125834, #111429, #121974.
+
What's new in at-spi-1.3.7:
This is the official GNOME 2.4.0 release of at-spi.
diff --git a/README b/README
index 738afc66..31234b88 100644
--- a/README
+++ b/README
@@ -1,7 +1,6 @@
README
-This is the Early Access Release of the Gnome Accessibility Project's
-Assistive Technology Service Provider Interface.
+at-spi version 1.3.8
*** Welcome to the Gnome Accessibility Project! ***
diff --git a/atk-bridge/bridge.c b/atk-bridge/bridge.c
index ddc298c3..edfd3403 100644
--- a/atk-bridge/bridge.c
+++ b/atk-bridge/bridge.c
@@ -34,7 +34,6 @@
#include <libspi/spi-private.h>
#include "accessible.h"
#include "application.h"
-
#include <bonobo-activation/bonobo-activation-register.h>
#undef SPI_BRIDGE_DEBUG
diff --git a/configure.in b/configure.in
index 31eee28e..97ceae9b 100644
--- a/configure.in
+++ b/configure.in
@@ -2,9 +2,9 @@ AC_INIT(idl/Accessibility.idl)
AT_SPI_MAJOR_VERSION=1
AT_SPI_MINOR_VERSION=3
-AT_SPI_MICRO_VERSION=7
-AT_SPI_INTERFACE_AGE=7
-AT_SPI_BINARY_AGE=7
+AT_SPI_MICRO_VERSION=8
+AT_SPI_INTERFACE_AGE=8
+AT_SPI_BINARY_AGE=8
AT_SPI_VERSION="$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION.$AT_SPI_MICRO_VERSION"
AM_INIT_AUTOMAKE(at-spi, $AT_SPI_VERSION)
AC_SUBST(AT_SPI_MAJOR_VERSION)
@@ -16,7 +16,7 @@ AC_SUBST(AT_SPI_BINARY_AGE)
# libtool versioning
LT_RELEASE=$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION
LT_CURRENT=9
-LT_REVISION=5
+LT_REVISION=6
LT_AGE=9
LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}'
AC_SUBST(LT_VERSION_INFO)
diff --git a/cspi/spi.h b/cspi/spi.h
index 6463d55a..bbd42e71 100644
--- a/cspi/spi.h
+++ b/cspi/spi.h
@@ -472,6 +472,7 @@ void AccessibleApplication_unref (AccessibleApplication *obj);
char *AccessibleApplication_getToolkitName (AccessibleApplication *obj);
char *AccessibleApplication_getVersion (AccessibleApplication *obj);
long AccessibleApplication_getID (AccessibleApplication *obj);
+char *AccessibleApplication_getLocale (AccessibleApplication *obj, int lc_category);
SPIBoolean AccessibleApplication_pause (AccessibleApplication *obj);
SPIBoolean AccessibleApplication_resume (AccessibleApplication *obj);
diff --git a/cspi/spi_application.c b/cspi/spi_application.c
index 9c948de9..c54fd511 100644
--- a/cspi/spi_application.c
+++ b/cspi/spi_application.c
@@ -28,6 +28,7 @@
*/
#include <cspi/spi-private.h>
+#include <locale.h>
/**
* AccessibleApplication_ref:
@@ -131,6 +132,52 @@ AccessibleApplication_getID (AccessibleApplication *obj)
}
/**
+ * AccessibleApplication_getLocale:
+ * @obj: a pointer to the #AccessibleApplication being queried.
+ *
+ * Get a POSIX-compliant string describing the application's current
+ * locale setting for a particular @lctype category.
+ *
+ * Returns: a POSIX-compliant locale string, e.g. "C", "pt_BR", "sr@latn", etc.
+ **/
+char *
+AccessibleApplication_getLocale (AccessibleApplication *obj, int lc_category)
+{
+ gchar *retval;
+ Accessibility_LOCALE_TYPE lctype;
+
+ cspi_return_val_if_fail (obj != NULL, CORBA_string_dup (""));
+
+ switch (lc_category)
+ {
+ case LC_COLLATE:
+ lctype = Accessibility_LOCALE_TYPE_COLLATE;
+ break;
+ case LC_CTYPE:
+ lctype = Accessibility_LOCALE_TYPE_CTYPE;
+ break;
+ case LC_NUMERIC:
+ lctype = Accessibility_LOCALE_TYPE_NUMERIC;
+ break;
+ case LC_MONETARY:
+ lctype = Accessibility_LOCALE_TYPE_MONETARY;
+ break;
+ case LC_MESSAGES:
+ default:
+ lctype = Accessibility_LOCALE_TYPE_MESSAGES;
+ break;
+ }
+
+ retval = Accessibility_Application_getLocale (CSPI_OBJREF (obj),
+ lctype,
+ cspi_ev ());
+
+ cspi_return_val_if_ev ("id", CORBA_string_dup (""));
+
+ return CORBA_string_dup (retval);
+}
+
+/**
* AccessibleApplication_pause:
* @obj: a pointer to the #Accessible object on which to operate.
*
diff --git a/idl/Accessibility_Application.idl b/idl/Accessibility_Application.idl
index e62a7b82..33b4998d 100644
--- a/idl/Accessibility_Application.idl
+++ b/idl/Accessibility_Application.idl
@@ -27,6 +27,16 @@
#include <Accessibility_Accessible.idl>
module Accessibility {
+
+ enum LOCALE_TYPE {
+ LOCALE_TYPE_MESSAGES,
+ LOCALE_TYPE_COLLATE,
+ LOCALE_TYPE_CTYPE,
+ LOCALE_TYPE_MONETARY,
+ LOCALE_TYPE_NUMERIC,
+ LOCALE_TYPE_TIME
+ };
+
interface Application : Accessible {
/**
@@ -100,10 +110,20 @@ module Accessibility {
**/
boolean resume ();
+ /**
+ * getLocale:
+ *
+ * @lctype: the LocaleType for which the locale is queried.
+ * Gets the locale in which the application is currently operating.
+ * For the current message locale, use @lctype LOCALE_TYPE_MESSAGES.
+ *
+ * Returns: a string compliant with the POSIX standard for locale description.
+ **/
+ string getLocale (in LOCALE_TYPE lctype);
+
void unImplemented_ ();
void unImplemented2_ ();
void unImplemented3_ ();
- void unImplemented4_ ();
};
};
diff --git a/libspi/application.c b/libspi/application.c
index 1d100745..f494757e 100644
--- a/libspi/application.c
+++ b/libspi/application.c
@@ -27,6 +27,7 @@
#include <config.h>
#include <atk/atkutil.h>
#include <libspi/application.h>
+#include <locale.h>
#include "spi-private.h"
/* Our parent Gtk object type */
@@ -170,6 +171,34 @@ spi_application_toolkit_event_listener (GSignalInvocationHint *signal_hint,
return TRUE;
}
+static CORBA_string
+impl_accessibility_application_get_locale (PortableServer_Servant servant,
+ Accessibility_LOCALE_TYPE lctype,
+ CORBA_Environment *ev)
+{
+ int category;
+ switch (lctype)
+ {
+ case Accessibility_LOCALE_TYPE_COLLATE:
+ category = LC_COLLATE;
+ break;
+ case Accessibility_LOCALE_TYPE_CTYPE:
+ category = LC_CTYPE;
+ break;
+ case Accessibility_LOCALE_TYPE_MONETARY:
+ category = LC_MONETARY;
+ break;
+ case Accessibility_LOCALE_TYPE_NUMERIC:
+ category = LC_NUMERIC;
+ break;
+ case Accessibility_LOCALE_TYPE_MESSAGES:
+ default:
+ category = LC_MESSAGES;
+ break;
+ }
+ return CORBA_string_dup (setlocale (category, NULL));
+}
+
static void
impl_accessibility_application_register_toolkit_event_listener (PortableServer_Servant servant,
Accessibility_EventListener listener,
@@ -242,6 +271,7 @@ spi_application_class_init (SpiApplicationClass *klass)
epv->_get_id = impl_accessibility_application_get_id;
epv->_set_id = impl_accessibility_application_set_id;
epv->registerToolkitEventListener = impl_accessibility_application_register_toolkit_event_listener;
+ epv->getLocale = impl_accessibility_application_get_locale;
init_toolkit_names (&klass->generic_event_names, &klass->toolkit_event_names);
}
@@ -260,5 +290,5 @@ SpiApplication *
spi_application_new (AtkObject *app_root)
{
return SPI_APPLICATION (spi_accessible_construct (
- SPI_APPLICATION_TYPE, app_root));
+ SPI_APPLICATION_TYPE, app_root));
}
diff --git a/test/test-simple.c b/test/test-simple.c
index c0d6c502..b85e2a9b 100644
--- a/test/test-simple.c
+++ b/test/test-simple.c
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <locale.h>
#include <gtk/gtk.h>
#include <cspi/spi.h>
#include <libbonobo.h>
@@ -233,6 +234,10 @@ test_application (Accessible *application)
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);