]> spindle.queued.net Git - midori/commitdiff
Add Korean encoding to the available of character encodings
authorWoo Youngho <kuh3h3@gmail.com>
Sat, 31 Oct 2009 21:51:35 +0000 (22:51 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 31 Oct 2009 21:51:35 +0000 (22:51 +0100)
midori/midori-browser.c
midori/midori-view.c
midori/midori-websettings.c
midori/midori-websettings.h

index 57e44487892b25c1afbd3852770a203a366708ea..b76627bfcfed307d3be205459477cdea8dc59f18 100644 (file)
@@ -3213,6 +3213,8 @@ _action_view_encoding_activate (GtkAction*     action,
                 encoding = "BIG5";
             else if (!strcmp (name, "EncodingJapanese"))
                 encoding = "SHIFT_JIS";
+            else if (!strcmp (name, "EncodingKorean"))
+                encoding = "EUC-KR";
             else if (!strcmp (name, "EncodingRussian"))
                 encoding = "KOI8-R";
             else if (!strcmp (name, "EncodingUnicode"))
@@ -4817,6 +4819,9 @@ static const GtkRadioActionEntry encoding_entries[] = {
  /* i18n: A double underscore "__" is used to prevent an unwanted mnemonic */
     N_("Japanese (SHIFT__JIS)"), "",
     NULL, 1 },
+ { "EncodingKorean", NULL,
+    N_("Korean (EUC-KR)"), "",
+    NULL, 1 },
  { "EncodingRussian", NULL,
     N_("Russian (KOI8-R)"), "",
     NULL, 1 },
@@ -4983,6 +4988,7 @@ static const gchar* ui_markup =
      "<menuitem action='EncodingAutomatic'/>"
      "<menuitem action='EncodingChinese'/>"
      "<menuitem action='EncodingJapanese'/>"
+     "<menuitem action='EncodingKorean'/>"
      "<menuitem action='EncodingRussian'/>"
      "<menuitem action='EncodingUnicode'/>"
      "<menuitem action='EncodingWestern'/>"
index 9899e435e33bc52626f59df465035bf912d13bde..e05b8bc05358bbf5a0b662116f38b0a3ba3d86c0 100644 (file)
@@ -1975,6 +1975,7 @@ webkit_web_view_populate_popup_cb (WebKitWebView* web_view,
               { "EncodingAutomatic" },
               { "EncodingChinese" },
               { "EncodingJapanese" },
+              { "EncodingKorean" },
               { "EncodingRussian" },
               { "EncodingUnicode" },
               { "EncodingWestern" },
index 5e473b2c27cbcafec34aa18d5eb556da36598f7d..8a7cfccae6f1cce084a060e21317e5f525e01581 100644 (file)
@@ -211,6 +211,7 @@ midori_preferred_encoding_get_type (void)
         static const GEnumValue values[] = {
          { MIDORI_ENCODING_CHINESE, "MIDORI_ENCODING_CHINESE", N_("Chinese (BIG5)") },
          { 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)") },
          { MIDORI_ENCODING_UNICODE, "MIDORI_ENCODING_UNICODE", N_("Unicode (UTF-8)") },
          { MIDORI_ENCODING_WESTERN, "MIDORI_ENCODING_WESTERN", N_("Western (ISO-8859-1)") },
@@ -1011,6 +1012,8 @@ notify_default_encoding_cb (GObject*    object,
         web_settings->preferred_encoding = MIDORI_ENCODING_CHINESE;
     else if (!strcmp (encoding, "SHIFT_JIS"))
         web_settings->preferred_encoding = MIDORI_ENCODING_JAPANESE;
+    else if (!strcmp (encoding, "EUC-KR"))
+        web_settings->preferred_encoding = MIDORI_ENCODING_KOREAN;
     else if (!strcmp (encoding, "KOI8-R"))
         web_settings->preferred_encoding = MIDORI_ENCODING_RUSSIAN;
     else if (!strcmp (encoding, "UTF-8"))
@@ -1266,6 +1269,9 @@ midori_web_settings_set_property (GObject*      object,
         case MIDORI_ENCODING_JAPANESE:
             g_object_set (object, "default-encoding", "SHIFT_JIS", NULL);
             break;
+       case MIDORI_ENCODING_KOREAN:
+            g_object_set (object, "default-encoding", "EUC-KR", NULL);
+            break;
         case MIDORI_ENCODING_RUSSIAN:
             g_object_set (object, "default-encoding", "KOI8-R", NULL);
             break;
index 82c79390d2d8dfd1b9f05dc6b36bf861cedf10e4..b219c5f91ff9cdec297688ec86e447e8c1367378 100644 (file)
@@ -76,6 +76,7 @@ typedef enum
 {
     MIDORI_ENCODING_CHINESE,
     MIDORI_ENCODING_JAPANESE,
+    MIDORI_ENCODING_KOREAN,
     MIDORI_ENCODING_RUSSIAN,
     MIDORI_ENCODING_UNICODE,
     MIDORI_ENCODING_WESTERN,