summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Haneman <billh@src.gnome.org>2006-02-24 14:25:46 +0000
committerBill Haneman <billh@src.gnome.org>2006-02-24 14:25:46 +0000
commit78ef68c54c66c840fb5a1de28d22dcee803c96e7 (patch)
tree98a6163eca4b60f3524463095a426ee639891dd8
parent3c8d60cc7bd76f8b20300a1519a69f2e0aaa7e91 (diff)
downloadatk-78ef68c54c66c840fb5a1de28d22dcee803c96e7.tar.gz
Win32 get_locale fix from Kazuzi IWAMOTO, and
const patch from Arjan Van de Ven.
-rw-r--r--ChangeLog11
-rwxr-xr-xatk/atkobject.c48
-rwxr-xr-xatk/atktext.c60
3 files changed, 70 insertions, 49 deletions
diff --git a/ChangeLog b/ChangeLog
index aff6258..a4326b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-02-24 Bill Haneman <bill.haneman@sun.com>
+
+ * atk/atkobject.c:
+ (get_atk_locale_dir): Make sure to convert from UTF-8 to
+ correct filename encoding; bug #317458 from Kazuzi IWAMOTO.
+
+ * atk/atkobject.c:
+ * atk/atktext.c:
+ Const patch from Arjan Van de Van; adds 'const' to
+ internal atk structures and methods where appropriate.
+
2006-01-17 Bill Haneman <bill.haneman@sun.com>
* configure.in: Revved to 1.11.1.
diff --git a/atk/atkobject.c b/atk/atkobject.c
index 79019f6..80dca6f 100755
--- a/atk/atkobject.c
+++ b/atk/atkobject.c
@@ -77,7 +77,7 @@ struct _AtkRoleItem
gchar *name;
};
-static AtkRoleItem role_items [] =
+static const AtkRoleItem role_items [] =
{
{ ATK_ROLE_INVALID, N_("invalid")},
{ ATK_ROLE_ACCEL_LABEL, N_("accelerator label")},
@@ -216,21 +216,21 @@ static guint atk_object_signals[LAST_SIGNAL] = { 0, };
static gpointer parent_class = NULL;
-static const gchar* atk_object_name_property_name = "accessible-name";
-static const gchar* atk_object_name_property_description = "accessible-description";
-static const gchar* atk_object_name_property_parent = "accessible-parent";
-static const gchar* atk_object_name_property_value = "accessible-value";
-static const gchar* atk_object_name_property_role = "accessible-role";
-static const gchar* atk_object_name_property_component_layer = "accessible-component-layer";
-static const gchar* atk_object_name_property_component_mdi_zorder = "accessible-component-mdi-zorder";
-static const gchar* atk_object_name_property_table_caption = "accessible-table-caption";
-static const gchar* atk_object_name_property_table_column_description = "accessible-table-column-description";
-static const gchar* atk_object_name_property_table_column_header = "accessible-table-column-header";
-static const gchar* atk_object_name_property_table_row_description = "accessible-table-row-description";
-static const gchar* atk_object_name_property_table_row_header = "accessible-table-row-header";
-static const gchar* atk_object_name_property_table_summary = "accessible-table-summary";
-static const gchar* atk_object_name_property_table_caption_object = "accessible-table-caption-object";
-static const gchar* atk_object_name_property_hypertext_num_links = "accessible-hypertext-nlinks";
+static const gchar* const atk_object_name_property_name = "accessible-name";
+static const gchar* const atk_object_name_property_description = "accessible-description";
+static const gchar* const atk_object_name_property_parent = "accessible-parent";
+static const gchar* const atk_object_name_property_value = "accessible-value";
+static const gchar* const atk_object_name_property_role = "accessible-role";
+static const gchar* const atk_object_name_property_component_layer = "accessible-component-layer";
+static const gchar* const atk_object_name_property_component_mdi_zorder = "accessible-component-mdi-zorder";
+static const gchar* const atk_object_name_property_table_caption = "accessible-table-caption";
+static const gchar* const atk_object_name_property_table_column_description = "accessible-table-column-description";
+static const gchar* const atk_object_name_property_table_column_header = "accessible-table-column-header";
+static const gchar* const atk_object_name_property_table_row_description = "accessible-table-row-description";
+static const gchar* const atk_object_name_property_table_row_header = "accessible-table-row-header";
+static const gchar* const atk_object_name_property_table_summary = "accessible-table-summary";
+static const gchar* const atk_object_name_property_table_caption_object = "accessible-table-caption-object";
+static const gchar* const atk_object_name_property_hypertext_num_links = "accessible-hypertext-nlinks";
#ifdef G_OS_WIN32
@@ -240,11 +240,21 @@ static const gchar* atk_object_name_property_hypertext_num_links = "accessible-h
G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
-static char *
+static const char *
get_atk_locale_dir (void)
{
- return g_win32_get_package_installation_subdirectory
- (GETTEXT_PACKAGE, dll_name, "lib/locale");
+ static gchar *atk_localedir = NULL;
+
+ if (!atk_localedir)
+ {
+ gchar temp;
+
+ temp = g_win32_get_package_installation_subdirectory
+ (GETTEXT_PACKAGE, dll_name, "lib\\locale");
+ atk_localedir = g_win32_locale_filename_from_utf8 (temp);
+ g_free (temp);
+ }
+ return atk_localedir;
}
#endif
diff --git a/atk/atktext.c b/atk/atktext.c
index 9c468bc..efa989e 100755
--- a/atk/atktext.c
+++ b/atk/atktext.c
@@ -33,36 +33,36 @@ enum {
LAST_SIGNAL
};
-static const gchar *bool[] = {"false",
- "true"};
-static const gchar *style[] = {"normal",
- "oblique",
- "italic"};
-static const gchar *variant[] = {"normal",
- "small_caps"};
-static const gchar *stretch[] = {"ultra_condensed",
- "extra_condensed",
- "condensed",
- "semi_condensed",
- "normal",
- "semi_expanded",
- "expanded",
- "extra_expanded",
- "ultra_expanded"};
-static const gchar *justification[] = {"left",
- "right",
- "center",
- "fill"};
-static const gchar *direction[] = {"none",
- "ltr",
- "rtl"};
-static const gchar *wrap_mode[] = {"none",
- "char",
- "word"};
-static const gchar *underline[] = {"none",
- "single",
- "double",
- "low"};
+static const gchar * const bool[] = {"false",
+ "true"};
+static const gchar * const style[] = {"normal",
+ "oblique",
+ "italic"};
+static const gchar * const variant[] = {"normal",
+ "small_caps"};
+static const gchar * const stretch[] = {"ultra_condensed",
+ "extra_condensed",
+ "condensed",
+ "semi_condensed",
+ "normal",
+ "semi_expanded",
+ "expanded",
+ "extra_expanded",
+ "ultra_expanded"};
+static const gchar * const justification[] = {"left",
+ "right",
+ "center",
+ "fill"};
+static const gchar * const direction[] = {"none",
+ "ltr",
+ "rtl"};
+static const gchar * const wrap_mode[] = {"none",
+ "char",
+ "word"};
+static const gchar * const underline[] = {"none",
+ "single",
+ "double",
+ "low"};
static void atk_text_base_init (AtkTextIface *class);