diff --git a/midori/midori-browser.c b/midori/midori-browser.c index f0852082..6adfe2cd 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -3407,6 +3407,8 @@ _action_view_encoding_activate (GtkAction* action, const gchar* encoding; if (!strcmp (name, "EncodingChinese")) encoding = "BIG5"; + else if (!strcmp (name, "EncodingChineseSimplified")) + encoding = "GB18030"; else if (!strcmp (name, "EncodingJapanese")) encoding = "SHIFT_JIS"; else if (!strcmp (name, "EncodingKorean")) @@ -5458,7 +5460,10 @@ static const GtkRadioActionEntry encoding_entries[] = N_("_Automatic"), "", NULL, 1 }, { "EncodingChinese", NULL, - N_("Chinese (BIG5)"), "", + N_("Chinese Traditional (BIG5)"), "", + NULL, 1 }, + { "EncodingChineseSimplified", NULL, + N_("Chinese Simplified (GB18030)"), "", NULL, 1 }, { "EncodingJapanese", NULL, /* i18n: A double underscore "__" is used to prevent the mnemonic */ @@ -5630,6 +5635,7 @@ static const gchar* ui_markup = "" "" "" + "" "" "" "" diff --git a/midori/midori-view.c b/midori/midori-view.c index 2d848e33..af80d085 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -2677,6 +2677,7 @@ midori_view_populate_popup (MidoriView* view, static const GtkActionEntry encodings[] = { { "EncodingAutomatic" }, { "EncodingChinese" }, + { "EncodingChineseSimplified" }, { "EncodingJapanese" }, { "EncodingKorean" }, { "EncodingRussian" }, diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c index bc466793..11dc999f 100644 --- a/midori/midori-websettings.c +++ b/midori/midori-websettings.c @@ -233,7 +233,8 @@ midori_preferred_encoding_get_type (void) if (!type) { static const GEnumValue values[] = { - { MIDORI_ENCODING_CHINESE, "MIDORI_ENCODING_CHINESE", N_("Chinese (BIG5)") }, + { MIDORI_ENCODING_CHINESE, "MIDORI_ENCODING_CHINESE", N_("Chinese Traditional (BIG5)") }, + { MIDORI_ENCODING_CHINESE_SIMPLIFIED, "MIDORI_ENCODING_CHINESE_SIMPLIFIED", N_("Chinese Simplified (GB18030)") }, { MIDORI_ENCODING_JAPANESE, "MIDORI_ENCODING_JAPANESE", N_("Japanese (SHIFT_JIS)") }, { MIDORI_ENCODING_KOREAN, "MIDORI_ENCODING_KOREAN", N_("Korean (EUC-KR)") }, { MIDORI_ENCODING_RUSSIAN, "MIDORI_ENCODING_RUSSIAN", N_("Russian (KOI8-R)") }, @@ -1188,6 +1189,8 @@ notify_default_encoding_cb (GObject* object, encoding = string ? string : ""; if (!strcmp (encoding, "BIG5")) web_settings->preferred_encoding = MIDORI_ENCODING_CHINESE; + else if (!strcmp (encoding, "GB18030")) + web_settings->preferred_encoding = MIDORI_ENCODING_CHINESE_SIMPLIFIED; else if (!strcmp (encoding, "SHIFT_JIS")) web_settings->preferred_encoding = MIDORI_ENCODING_JAPANESE; else if (!strcmp (encoding, "EUC-KR")) @@ -1552,6 +1555,9 @@ midori_web_settings_set_property (GObject* object, case MIDORI_ENCODING_CHINESE: g_object_set (object, "default-encoding", "BIG5", NULL); break; + case MIDORI_ENCODING_CHINESE_SIMPLIFIED: + g_object_set (object, "default-encoding", "GB18030", NULL); + break; case MIDORI_ENCODING_JAPANESE: g_object_set (object, "default-encoding", "SHIFT_JIS", NULL); break; diff --git a/midori/midori-websettings.h b/midori/midori-websettings.h index f73a2b82..08dc876e 100644 --- a/midori/midori-websettings.h +++ b/midori/midori-websettings.h @@ -80,7 +80,8 @@ midori_startup_get_type (void) G_GNUC_CONST; typedef enum { - MIDORI_ENCODING_CHINESE, + MIDORI_ENCODING_CHINESE /* Traditional */, + MIDORI_ENCODING_CHINESE_SIMPLIFIED, MIDORI_ENCODING_JAPANESE, MIDORI_ENCODING_KOREAN, MIDORI_ENCODING_RUSSIAN,