Distinguish Simplified and Traditional Chinese
This commit is contained in:
parent
c8106ee0ec
commit
e3e15973cc
4 changed files with 17 additions and 3 deletions
|
@ -3407,6 +3407,8 @@ _action_view_encoding_activate (GtkAction* action,
|
||||||
const gchar* encoding;
|
const gchar* encoding;
|
||||||
if (!strcmp (name, "EncodingChinese"))
|
if (!strcmp (name, "EncodingChinese"))
|
||||||
encoding = "BIG5";
|
encoding = "BIG5";
|
||||||
|
else if (!strcmp (name, "EncodingChineseSimplified"))
|
||||||
|
encoding = "GB18030";
|
||||||
else if (!strcmp (name, "EncodingJapanese"))
|
else if (!strcmp (name, "EncodingJapanese"))
|
||||||
encoding = "SHIFT_JIS";
|
encoding = "SHIFT_JIS";
|
||||||
else if (!strcmp (name, "EncodingKorean"))
|
else if (!strcmp (name, "EncodingKorean"))
|
||||||
|
@ -5458,7 +5460,10 @@ static const GtkRadioActionEntry encoding_entries[] =
|
||||||
N_("_Automatic"), "",
|
N_("_Automatic"), "",
|
||||||
NULL, 1 },
|
NULL, 1 },
|
||||||
{ "EncodingChinese", NULL,
|
{ "EncodingChinese", NULL,
|
||||||
N_("Chinese (BIG5)"), "",
|
N_("Chinese Traditional (BIG5)"), "",
|
||||||
|
NULL, 1 },
|
||||||
|
{ "EncodingChineseSimplified", NULL,
|
||||||
|
N_("Chinese Simplified (GB18030)"), "",
|
||||||
NULL, 1 },
|
NULL, 1 },
|
||||||
{ "EncodingJapanese", NULL,
|
{ "EncodingJapanese", NULL,
|
||||||
/* i18n: A double underscore "__" is used to prevent the mnemonic */
|
/* i18n: A double underscore "__" is used to prevent the mnemonic */
|
||||||
|
@ -5630,6 +5635,7 @@ static const gchar* ui_markup =
|
||||||
"<menu action='Encoding'>"
|
"<menu action='Encoding'>"
|
||||||
"<menuitem action='EncodingAutomatic'/>"
|
"<menuitem action='EncodingAutomatic'/>"
|
||||||
"<menuitem action='EncodingChinese'/>"
|
"<menuitem action='EncodingChinese'/>"
|
||||||
|
"<menuitem action='EncodingChineseSimplified'/>"
|
||||||
"<menuitem action='EncodingJapanese'/>"
|
"<menuitem action='EncodingJapanese'/>"
|
||||||
"<menuitem action='EncodingKorean'/>"
|
"<menuitem action='EncodingKorean'/>"
|
||||||
"<menuitem action='EncodingRussian'/>"
|
"<menuitem action='EncodingRussian'/>"
|
||||||
|
|
|
@ -2677,6 +2677,7 @@ midori_view_populate_popup (MidoriView* view,
|
||||||
static const GtkActionEntry encodings[] = {
|
static const GtkActionEntry encodings[] = {
|
||||||
{ "EncodingAutomatic" },
|
{ "EncodingAutomatic" },
|
||||||
{ "EncodingChinese" },
|
{ "EncodingChinese" },
|
||||||
|
{ "EncodingChineseSimplified" },
|
||||||
{ "EncodingJapanese" },
|
{ "EncodingJapanese" },
|
||||||
{ "EncodingKorean" },
|
{ "EncodingKorean" },
|
||||||
{ "EncodingRussian" },
|
{ "EncodingRussian" },
|
||||||
|
|
|
@ -233,7 +233,8 @@ midori_preferred_encoding_get_type (void)
|
||||||
if (!type)
|
if (!type)
|
||||||
{
|
{
|
||||||
static const GEnumValue values[] = {
|
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_JAPANESE, "MIDORI_ENCODING_JAPANESE", N_("Japanese (SHIFT_JIS)") },
|
||||||
{ MIDORI_ENCODING_KOREAN, "MIDORI_ENCODING_KOREAN", N_("Korean (EUC-KR)") },
|
{ MIDORI_ENCODING_KOREAN, "MIDORI_ENCODING_KOREAN", N_("Korean (EUC-KR)") },
|
||||||
{ MIDORI_ENCODING_RUSSIAN, "MIDORI_ENCODING_RUSSIAN", N_("Russian (KOI8-R)") },
|
{ MIDORI_ENCODING_RUSSIAN, "MIDORI_ENCODING_RUSSIAN", N_("Russian (KOI8-R)") },
|
||||||
|
@ -1188,6 +1189,8 @@ notify_default_encoding_cb (GObject* object,
|
||||||
encoding = string ? string : "";
|
encoding = string ? string : "";
|
||||||
if (!strcmp (encoding, "BIG5"))
|
if (!strcmp (encoding, "BIG5"))
|
||||||
web_settings->preferred_encoding = MIDORI_ENCODING_CHINESE;
|
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"))
|
else if (!strcmp (encoding, "SHIFT_JIS"))
|
||||||
web_settings->preferred_encoding = MIDORI_ENCODING_JAPANESE;
|
web_settings->preferred_encoding = MIDORI_ENCODING_JAPANESE;
|
||||||
else if (!strcmp (encoding, "EUC-KR"))
|
else if (!strcmp (encoding, "EUC-KR"))
|
||||||
|
@ -1552,6 +1555,9 @@ midori_web_settings_set_property (GObject* object,
|
||||||
case MIDORI_ENCODING_CHINESE:
|
case MIDORI_ENCODING_CHINESE:
|
||||||
g_object_set (object, "default-encoding", "BIG5", NULL);
|
g_object_set (object, "default-encoding", "BIG5", NULL);
|
||||||
break;
|
break;
|
||||||
|
case MIDORI_ENCODING_CHINESE_SIMPLIFIED:
|
||||||
|
g_object_set (object, "default-encoding", "GB18030", NULL);
|
||||||
|
break;
|
||||||
case MIDORI_ENCODING_JAPANESE:
|
case MIDORI_ENCODING_JAPANESE:
|
||||||
g_object_set (object, "default-encoding", "SHIFT_JIS", NULL);
|
g_object_set (object, "default-encoding", "SHIFT_JIS", NULL);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -80,7 +80,8 @@ midori_startup_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
MIDORI_ENCODING_CHINESE,
|
MIDORI_ENCODING_CHINESE /* Traditional */,
|
||||||
|
MIDORI_ENCODING_CHINESE_SIMPLIFIED,
|
||||||
MIDORI_ENCODING_JAPANESE,
|
MIDORI_ENCODING_JAPANESE,
|
||||||
MIDORI_ENCODING_KOREAN,
|
MIDORI_ENCODING_KOREAN,
|
||||||
MIDORI_ENCODING_RUSSIAN,
|
MIDORI_ENCODING_RUSSIAN,
|
||||||
|
|
Loading…
Reference in a new issue