[goffice] Charset selector: fix problem with Japanese.



commit b1d05202e3794a1da6ef707a8a266f7ff67263a0
Author: Morten Welinder <terra gnome org>
Date:   Thu Sep 23 20:54:39 2010 -0400

    Charset selector: fix problem with Japanese.

 ChangeLog                    |    7 +++++++
 NEWS                         |    4 ++++
 goffice/gtk/go-charmap-sel.c |    4 +++-
 3 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 75d487d..ff4fd32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-09-23  Morten Welinder  <terra gnome org>
+
+	* goffice/gtk/go-charmap-sel.c (charset_trans_array): Use charset
+	CP932 for what we claim is Shift_JIS.  See bug 627829 for details.
+	Patch from Yasuaki Taniguchi.
+	(cs_build_menu): Draw as radio buttons.
+
 2010-09-23  Jean Brefort  <jean brefort normalesup org>
 
 	* plugins/plot_surface/gog-contour.c: implement
diff --git a/NEWS b/NEWS
index 5c5e661..171c69f 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,10 @@ Jon Nordby:
 
 Morten:
 	* Improve fractional days support for date axes.
+	* Improve appearance of charset selector.
+
+Yasuaki Taniguchi:
+	* Fix charset problem for Japanese.  [#627829]
 
 --------------------------------------------------------------------------
 goffice 0.8.10:
diff --git a/goffice/gtk/go-charmap-sel.c b/goffice/gtk/go-charmap-sel.c
index 7cbfd94..986f81e 100644
--- a/goffice/gtk/go-charmap-sel.c
+++ b/goffice/gtk/go-charmap-sel.c
@@ -162,7 +162,7 @@ static CharsetInfo charset_trans_array[] = {
 	{N_("Icelandic (MacIcelandic)"),          "x-mac-icelandic",       LG_OTHER, CI_MINOR},
 	{N_("Japanese (EUC-JP)"),                 "EUC-JP",                LG_JAPANESE, CI_MINOR},
 	{N_("Japanese (ISO-2022-JP)"),            "ISO-2022-JP",           LG_JAPANESE, CI_MINOR},
-	{N_("Japanese (Shift_JIS)"),              "Shift_JIS",             LG_JAPANESE, CI_MINOR},
+	{N_("Japanese (Shift_JIS)"),              "CP932",             LG_JAPANESE, CI_MINOR},
 	{N_("Korean (EUC-KR)"),                   "EUC-KR",                LG_KOREAN, CI_MINOR},
 	{N_("Korean (ISO-2022-KR)"),              "ISO-2022-KR",           LG_KOREAN, CI_MINOR},
 	{N_("Korean (JOHAB)"),                    "x-johab",               LG_KOREAN, CI_MINOR},
@@ -380,6 +380,7 @@ cs_build_menu (GOCharmapSel *cs)
 				if (name) {
 					subitem = gtk_check_menu_item_new_with_label
 						(_(charset_trans->charset_title));
+					gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM (subitem), TRUE);
 					gtk_widget_show (subitem);
 					gtk_menu_shell_append (GTK_MENU_SHELL (submenu),  subitem);
 					if (charset_trans->imp == CI_MAJOR)
@@ -413,6 +414,7 @@ cs_build_menu (GOCharmapSel *cs)
 							      get_locale_encoding_name (cs),
 							      NULL);
 		item = gtk_check_menu_item_new_with_label (locale_encoding_menu_title);
+		gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM (item), TRUE);
 		g_free (locale_encoding_menu_title);
 		gtk_widget_show (item);
 		gtk_menu_shell_append (GTK_MENU_SHELL (menu),  item);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]