diff options
author | Christian Persch <chpe@src.gnome.org> | 2009-01-26 05:03:32 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2009-01-26 05:03:32 +0800 |
commit | b1d5c36aa58f4b37387beb5bd2058e7dc8f04808 (patch) | |
tree | cf3cbbf7cb783bedd8240cc477435cce97df5bc1 | |
parent | 49db23e9c72747f8cf9d3a2859a19d14298755d5 (diff) | |
download | gsoc2013-epiphany-b1d5c36aa58f4b37387beb5bd2058e7dc8f04808.tar gsoc2013-epiphany-b1d5c36aa58f4b37387beb5bd2058e7dc8f04808.tar.gz gsoc2013-epiphany-b1d5c36aa58f4b37387beb5bd2058e7dc8f04808.tar.bz2 gsoc2013-epiphany-b1d5c36aa58f4b37387beb5bd2058e7dc8f04808.tar.lz gsoc2013-epiphany-b1d5c36aa58f4b37387beb5bd2058e7dc8f04808.tar.xz gsoc2013-epiphany-b1d5c36aa58f4b37387beb5bd2058e7dc8f04808.tar.zst gsoc2013-epiphany-b1d5c36aa58f4b37387beb5bd2058e7dc8f04808.zip |
Remove unused fonts languages and autodetectors stuff. Bug #558407.
svn path=/trunk/; revision=8731
-rw-r--r-- | data/Makefile.am | 1 | ||||
-rw-r--r-- | data/epiphany.pc.in | 1 | ||||
-rw-r--r-- | data/epiphany.schemas.in | 21 | ||||
-rwxr-xr-x | data/generate-font-schemas.py | 112 | ||||
-rw-r--r-- | data/glade/prefs-dialog.glade | 46 | ||||
-rw-r--r-- | embed/ephy-encodings.c | 227 | ||||
-rw-r--r-- | embed/ephy-encodings.h | 3 | ||||
-rw-r--r-- | lib/ephy-langs.c | 97 | ||||
-rw-r--r-- | lib/ephy-langs.h | 10 | ||||
-rw-r--r-- | src/prefs-dialog.c | 95 |
10 files changed, 85 insertions, 528 deletions
diff --git a/data/Makefile.am b/data/Makefile.am index 38981eb88..ec74a1e56 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,4 +1,3 @@ - SUBDIRS = art glade icons ui @INTLTOOL_SERVER_RULE@ diff --git a/data/epiphany.pc.in b/data/epiphany.pc.in index 9fbc69d9a..150ccb2fb 100644 --- a/data/epiphany.pc.in +++ b/data/epiphany.pc.in @@ -8,7 +8,6 @@ datarootdir=@datarootdir@ datadir=@datadir@ icondir=@datadir@/@PACKAGE@/icons features=@EPIPHANY_FEATURES@ -engine=@with_engine@ Name: Epiphany Browser Description: GNOME Web Browser diff --git a/data/epiphany.schemas.in b/data/epiphany.schemas.in index 51bcb107e..81fadca59 100644 --- a/data/epiphany.schemas.in +++ b/data/epiphany.schemas.in @@ -390,27 +390,6 @@ </locale> </schema> <schema> - <key>/schemas/apps/epiphany/web/autodetect_encoding</key> - <applyto>/apps/epiphany/web/autodetect_encoding</applyto> - <owner>epiphany</owner> - <type>string</type> - <locale name="C"> - <default></default> - <short>The encoding autodetector. Empty string means autodetect is off</short> - <long> - The encoding autodetector. Valid entries are "" (autodetectors - off), "cjk_parallel_state_machine" (autodetect east asian encodings), - "ja_parallel_state_machine" (autodetect japanese encodings), - "ko_parallel_state_machine" (autodetect korean encodings), "ruprob" - (autodetect russian encodings), "ukprob" (autodetect ukrainian encodings), - "zh_parallel_state_machine" (autodetect chinese encodings), - "zhcn_parallel_state_machine" (autodetect simplified chinese encodings), - "zhtw_parallel_state_machine" (autodetect traditional chinese encodings) - and "universal_charset_detector" (autodetect most encodings). - </long> - </locale> - </schema> - <schema> <key>/schemas/apps/epiphany/web/cookie_accept</key> <applyto>/apps/epiphany/web/cookie_accept</applyto> <owner>epiphany</owner> diff --git a/data/generate-font-schemas.py b/data/generate-font-schemas.py deleted file mode 100755 index 5c1570694..000000000 --- a/data/generate-font-schemas.py +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env python -# -*- coding: UTF-8 -*- -# -# Copyright © 2005 Christian Persch -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# $Id$ - -import sys, codecs -from xml import dom; - -sys.stdout = codecs.getwriter("utf-8")(sys.__stdout__) - -def appendTextNode(doc, schemaNode, tag, text): - node = doc.createElement(tag) - schemaNode.appendChild(node) - textNode = doc.createTextNode(text) - node.appendChild(textNode) - - -def appendLocaleNode(doc, schemaNode, localeName, shortSchemaText): - localeNode = doc.createElement("locale") - localeNode.setAttribute("name", localeName) - schemaNode.appendChild(localeNode) - - appendTextNode(doc, localeNode, "short", shortSchemaText) - appendTextNode(doc, localeNode, "long", shortSchemaText) - - -def append_schema(doc, schemalistNode, key, datatype, default, description, schemaText): - schemaNode = doc.createElement("schema") - schemalistNode.appendChild(schemaNode) - appendTextNode (doc, schemaNode, "key", "/schemas" + key) - appendTextNode (doc, schemaNode, "applyto", key) - appendTextNode (doc, schemaNode, "owner", "epiphany") - appendTextNode (doc, schemaNode, "type", datatype) - appendTextNode (doc, schemaNode, "default", default) - appendLocaleNode (doc, schemaNode, "C", schemaText) - - -def append_schemas(docNode, schemalistNode, group): - base = "/apps/epiphany/web/" - append_schema(doc, schemalistNode, base + "fixed_font_size_" + group, - "int", "12", "Monospace font size", - "Monospaced font size for \"" + group + "\"") - append_schema(doc, schemalistNode, base + "font_monospace_" + group, - "string", "monospace", "Monospace font", - "Monospaced font for \"" + group + "\"") - append_schema(doc, schemalistNode, base + "variable_font_size_" + group, - "int", "12", "Proportional font size", - "Variable width font size for \"" + group + "\"") - append_schema(doc, schemalistNode, base + "font_variable_" + group, - "string", "sans-serif", "Proportional font", - "Variable width font for \"" + group + "\"") - append_schema(doc, schemalistNode, base + "minimum_font_size_" + group, - "int", "7", "Minimum font size", - "Minimum font size for \"" + group + "\"") - - -# keep this list in sync with lib/ephy-langs.c -font_languages = [ - "ar", - "el", - "he", - "ja", - "ko", - "th", - "tr", - "x-armn", - "x-baltic", - "x-beng", - "x-cans", - "x-central-euro", - "x-cyrillic", - "x-devanagari", - "x-ethi", - "x-geor", - "x-gujr", - "x-guru", - "x-khmr", - "x-mlym", - "x-tamil", - "x-unicode", - "x-western", - "zh-CN", - "zh-HK", - "zh-TW" ] - -doc = dom.getDOMImplementation().createDocument(None, "gconfschemafile", None) - -schemalistNode = doc.createElement("schemalist") -doc.documentElement.appendChild(schemalistNode) - -for lang in font_languages: - append_schemas(doc, schemalistNode, lang) - -doc.writexml(sys.stdout) - -# Remember to pass the output through "xmllint --format" diff --git a/data/glade/prefs-dialog.glade b/data/glade/prefs-dialog.glade index 1b9fce8a7..95890b4eb 100644 --- a/data/glade/prefs-dialog.glade +++ b/data/glade/prefs-dialog.glade @@ -1324,7 +1324,7 @@ <child> <widget class="GtkTable" id="table72"> <property name="visible">True</property> - <property name="n_rows">2</property> + <property name="n_rows">1</property> <property name="n_columns">2</property> <property name="homogeneous">False</property> <property name="row_spacing">6</property> @@ -1360,35 +1360,6 @@ </child> <child> - <widget class="GtkLabel" id="auto_encoding_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Au_todetect:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">1</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">auto_encoding_combo</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkComboBox" id="default_encoding_combo"> <property name="visible">True</property> <property name="add_tearoffs">False</property> @@ -1402,21 +1373,6 @@ <property name="y_options">fill</property> </packing> </child> - - <child> - <widget class="GtkComboBox" id="auto_encoding_combo"> - <property name="visible">True</property> - <property name="add_tearoffs">False</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options">fill</property> - </packing> - </child> </widget> </child> </widget> diff --git a/embed/ephy-encodings.c b/embed/ephy-encodings.c index 44bca62e7..15230ac64 100644 --- a/embed/ephy-encodings.c +++ b/embed/ephy-encodings.c @@ -37,7 +37,6 @@ struct _EphyEncodingsPrivate EphyNodeDb *db; EphyNode *root; EphyNode *encodings; - EphyNode *detectors; GHashTable *hash; GSList *recent; }; @@ -53,125 +52,92 @@ struct char *title; char *code; EphyLanguageGroup groups; - gboolean is_autodetector; } encoding_entries [] = { - { N_("Arabic (_IBM-864)"), "IBM864", LG_ARABIC, FALSE }, - { N_("Arabic (ISO-_8859-6)"), "ISO-8859-6", LG_ARABIC, FALSE }, - { N_("Arabic (_MacArabic)"), "x-mac-arabic", LG_ARABIC, FALSE }, - { N_("Arabic (_Windows-1256)"), "windows-1256", LG_ARABIC, FALSE }, - { N_("Baltic (_ISO-8859-13)"), "ISO-8859-13", LG_BALTIC, FALSE }, - { N_("Baltic (I_SO-8859-4)"), "ISO-8859-4", LG_BALTIC, FALSE }, - { N_("Baltic (_Windows-1257)"), "windows-1257", LG_BALTIC, FALSE }, - { N_("_Armenian (ARMSCII-8)"), "armscii-8", LG_CAUCASIAN, FALSE }, - { N_("_Georgian (GEOSTD8)"), "geostd8", LG_CAUCASIAN, FALSE }, - { N_("Central European (_IBM-852)"), "IBM852", LG_C_EUROPEAN, FALSE }, - { N_("Central European (I_SO-8859-2)"), "ISO-8859-2", LG_C_EUROPEAN, FALSE }, - { N_("Central European (_MacCE)"), "x-mac-ce", LG_C_EUROPEAN, FALSE }, - { N_("Central European (_Windows-1250)"), "windows-1250", LG_C_EUROPEAN, FALSE }, - { N_("Chinese Simplified (_GB18030)"), "gb18030", LG_CHINESE_SIMP, FALSE }, - { N_("Chinese Simplified (G_B2312)"), "GB2312", LG_CHINESE_SIMP, FALSE }, - { N_("Chinese Simplified (GB_K)"), "x-gbk", LG_CHINESE_SIMP, FALSE }, - { N_("Chinese Simplified (_HZ)"), "HZ-GB-2312", LG_CHINESE_SIMP, FALSE }, - { N_("Chinese Simplified (_ISO-2022-CN)"), "ISO-2022-CN", LG_CHINESE_SIMP, FALSE }, - { N_("Chinese Traditional (Big_5)"), "Big5", LG_CHINESE_TRAD, FALSE }, - { N_("Chinese Traditional (Big5-HK_SCS)"), "Big5-HKSCS", LG_CHINESE_TRAD, FALSE }, - { N_("Chinese Traditional (_EUC-TW)"), "x-euc-tw", LG_CHINESE_TRAD, FALSE }, - { N_("Cyrillic (_IBM-855)"), "IBM855", LG_CYRILLIC, FALSE }, - { N_("Cyrillic (I_SO-8859-5)"), "ISO-8859-5", LG_CYRILLIC, FALSE }, - { N_("Cyrillic (IS_O-IR-111)"), "ISO-IR-111", LG_CYRILLIC, FALSE }, - { N_("Cyrillic (_KOI8-R)"), "KOI8-R", LG_CYRILLIC, FALSE }, - { N_("Cyrillic (_MacCyrillic)"), "x-mac-cyrillic", LG_CYRILLIC, FALSE }, - { N_("Cyrillic (_Windows-1251)"), "windows-1251", LG_CYRILLIC, FALSE }, - { N_("Cyrillic/_Russian (IBM-866)"), "IBM866", LG_CYRILLIC, FALSE }, - { N_("Greek (_ISO-8859-7)"), "ISO-8859-7", LG_GREEK, FALSE }, - { N_("Greek (_MacGreek)"), "x-mac-greek", LG_GREEK, FALSE }, - { N_("Greek (_Windows-1253)"), "windows-1253", LG_GREEK, FALSE }, - { N_("Gujarati (_MacGujarati)"), "x-mac-gujarati", LG_INDIAN, FALSE }, - { N_("Gurmukhi (Mac_Gurmukhi)"), "x-mac-gurmukhi", LG_INDIAN, FALSE }, - { N_("Hindi (Mac_Devanagari)"), "x-mac-devanagari", LG_INDIAN, FALSE }, - { N_("Hebrew (_IBM-862)"), "IBM862", LG_HEBREW, FALSE }, - { N_("Hebrew (IS_O-8859-8-I)"), "ISO-8859-8-I", LG_HEBREW, FALSE }, - { N_("Hebrew (_MacHebrew)"), "x-mac-hebrew", LG_HEBREW, FALSE }, - { N_("Hebrew (_Windows-1255)"), "windows-1255", LG_HEBREW, FALSE }, - { N_("_Visual Hebrew (ISO-8859-8)"), "ISO-8859-8", LG_HEBREW, FALSE }, - { N_("Japanese (_EUC-JP)"), "EUC-JP", LG_JAPANESE, FALSE }, - { N_("Japanese (_ISO-2022-JP)"), "ISO-2022-JP", LG_JAPANESE, FALSE }, - { N_("Japanese (_Shift-JIS)"), "Shift_JIS", LG_JAPANESE, FALSE }, - { N_("Korean (_EUC-KR)"), "EUC-KR", LG_KOREAN, FALSE }, - { N_("Korean (_ISO-2022-KR)"), "ISO-2022-KR", LG_KOREAN, FALSE }, - { N_("Korean (_JOHAB)"), "x-johab", LG_KOREAN, FALSE }, - { N_("Korean (_UHC)"), "x-windows-949", LG_KOREAN, FALSE }, - { N_("_Celtic (ISO-8859-14)"), "ISO-8859-14", LG_NORDIC, FALSE }, - { N_("_Icelandic (MacIcelandic)"), "x-mac-icelandic", LG_NORDIC, FALSE }, - { N_("_Nordic (ISO-8859-10)"), "ISO-8859-10", LG_NORDIC, FALSE }, - { N_("_Persian (MacFarsi)"), "x-mac-farsi", LG_PERSIAN, FALSE }, - { N_("Croatian (Mac_Croatian)"), "x-mac-croatian", LG_SE_EUROPEAN, FALSE }, - { N_("_Romanian (MacRomanian)"), "x-mac-romanian", LG_SE_EUROPEAN, FALSE }, - { N_("R_omanian (ISO-8859-16)"), "ISO-8859-16", LG_SE_EUROPEAN, FALSE }, - { N_("South _European (ISO-8859-3)"), "ISO-8859-3", LG_SE_EUROPEAN, FALSE }, - { N_("Thai (TIS-_620)"), "TIS-620", LG_THAI, FALSE }, - { N_("Thai (IS_O-8859-11)"), "iso-8859-11", LG_THAI, FALSE }, - { N_("_Thai (Windows-874)"), "windows-874", LG_THAI, FALSE }, - { N_("Turkish (_IBM-857)"), "IBM857", LG_TURKISH, FALSE }, - { N_("Turkish (I_SO-8859-9)"), "ISO-8859-9", LG_TURKISH, FALSE }, - { N_("Turkish (_MacTurkish)"), "x-mac-turkish", LG_TURKISH, FALSE }, - { N_("Turkish (_Windows-1254)"), "windows-1254", LG_TURKISH, FALSE }, - { N_("Unicode (UTF-_8)"), "UTF-8", LG_UNICODE, FALSE }, - { N_("Cyrillic/Ukrainian (_KOI8-U)"), "KOI8-U", LG_UKRAINIAN, FALSE }, - { N_("Cyrillic/Ukrainian (Mac_Ukrainian)"), "x-mac-ukrainian", LG_UKRAINIAN, FALSE }, - { N_("Vietnamese (_TCVN)"), "x-viet-tcvn5712", LG_VIETNAMESE, FALSE }, - { N_("Vietnamese (_VISCII)"), "VISCII", LG_VIETNAMESE, FALSE }, - { N_("Vietnamese (V_PS)"), "x-viet-vps", LG_VIETNAMESE, FALSE }, - { N_("Vietnamese (_Windows-1258)"), "windows-1258", LG_VIETNAMESE, FALSE }, - { N_("Western (_IBM-850)"), "IBM850", LG_WESTERN, FALSE }, - { N_("Western (_ISO-8859-1)"), "ISO-8859-1", LG_WESTERN, FALSE }, - { N_("Western (IS_O-8859-15)"), "ISO-8859-15", LG_WESTERN, FALSE }, - { N_("Western (_MacRoman)"), "x-mac-roman", LG_WESTERN, FALSE }, - { N_("Western (_Windows-1252)"), "windows-1252", LG_WESTERN, FALSE }, + { N_("Arabic (_IBM-864)"), "IBM864", LG_ARABIC }, + { N_("Arabic (ISO-_8859-6)"), "ISO-8859-6", LG_ARABIC }, + { N_("Arabic (_MacArabic)"), "x-mac-arabic", LG_ARABIC }, + { N_("Arabic (_Windows-1256)"), "windows-1256", LG_ARABIC }, + { N_("Baltic (_ISO-8859-13)"), "ISO-8859-13", LG_BALTIC }, + { N_("Baltic (I_SO-8859-4)"), "ISO-8859-4", LG_BALTIC }, + { N_("Baltic (_Windows-1257)"), "windows-1257", LG_BALTIC }, + { N_("_Armenian (ARMSCII-8)"), "armscii-8", LG_CAUCASIAN }, + { N_("_Georgian (GEOSTD8)"), "geostd8", LG_CAUCASIAN }, + { N_("Central European (_IBM-852)"), "IBM852", LG_C_EUROPEAN }, + { N_("Central European (I_SO-8859-2)"), "ISO-8859-2", LG_C_EUROPEAN }, + { N_("Central European (_MacCE)"), "x-mac-ce", LG_C_EUROPEAN }, + { N_("Central European (_Windows-1250)"), "windows-1250", LG_C_EUROPEAN }, + { N_("Chinese Simplified (_GB18030)"), "gb18030", LG_CHINESE_SIMP }, + { N_("Chinese Simplified (G_B2312)"), "GB2312", LG_CHINESE_SIMP }, + { N_("Chinese Simplified (GB_K)"), "x-gbk", LG_CHINESE_SIMP }, + { N_("Chinese Simplified (_HZ)"), "HZ-GB-2312", LG_CHINESE_SIMP }, + { N_("Chinese Simplified (_ISO-2022-CN)"), "ISO-2022-CN", LG_CHINESE_SIMP }, + { N_("Chinese Traditional (Big_5)"), "Big5", LG_CHINESE_TRAD }, + { N_("Chinese Traditional (Big5-HK_SCS)"), "Big5-HKSCS", LG_CHINESE_TRAD }, + { N_("Chinese Traditional (_EUC-TW)"), "x-euc-tw", LG_CHINESE_TRAD }, + { N_("Cyrillic (_IBM-855)"), "IBM855", LG_CYRILLIC }, + { N_("Cyrillic (I_SO-8859-5)"), "ISO-8859-5", LG_CYRILLIC }, + { N_("Cyrillic (IS_O-IR-111)"), "ISO-IR-111", LG_CYRILLIC }, + { N_("Cyrillic (_KOI8-R)"), "KOI8-R", LG_CYRILLIC }, + { N_("Cyrillic (_MacCyrillic)"), "x-mac-cyrillic", LG_CYRILLIC }, + { N_("Cyrillic (_Windows-1251)"), "windows-1251", LG_CYRILLIC }, + { N_("Cyrillic/_Russian (IBM-866)"), "IBM866", LG_CYRILLIC }, + { N_("Greek (_ISO-8859-7)"), "ISO-8859-7", LG_GREEK }, + { N_("Greek (_MacGreek)"), "x-mac-greek", LG_GREEK }, + { N_("Greek (_Windows-1253)"), "windows-1253", LG_GREEK }, + { N_("Gujarati (_MacGujarati)"), "x-mac-gujarati", LG_INDIAN }, + { N_("Gurmukhi (Mac_Gurmukhi)"), "x-mac-gurmukhi", LG_INDIAN }, + { N_("Hindi (Mac_Devanagari)"), "x-mac-devanagari", LG_INDIAN }, + { N_("Hebrew (_IBM-862)"), "IBM862", LG_HEBREW }, + { N_("Hebrew (IS_O-8859-8-I)"), "ISO-8859-8-I", LG_HEBREW }, + { N_("Hebrew (_MacHebrew)"), "x-mac-hebrew", LG_HEBREW }, + { N_("Hebrew (_Windows-1255)"), "windows-1255", LG_HEBREW }, + { N_("_Visual Hebrew (ISO-8859-8)"), "ISO-8859-8", LG_HEBREW }, + { N_("Japanese (_EUC-JP)"), "EUC-JP", LG_JAPANESE }, + { N_("Japanese (_ISO-2022-JP)"), "ISO-2022-JP", LG_JAPANESE }, + { N_("Japanese (_Shift-JIS)"), "Shift_JIS", LG_JAPANESE }, + { N_("Korean (_EUC-KR)"), "EUC-KR", LG_KOREAN }, + { N_("Korean (_ISO-2022-KR)"), "ISO-2022-KR", LG_KOREAN }, + { N_("Korean (_JOHAB)"), "x-johab", LG_KOREAN }, + { N_("Korean (_UHC)"), "x-windows-949", LG_KOREAN }, + { N_("_Celtic (ISO-8859-14)"), "ISO-8859-14", LG_NORDIC }, + { N_("_Icelandic (MacIcelandic)"), "x-mac-icelandic", LG_NORDIC }, + { N_("_Nordic (ISO-8859-10)"), "ISO-8859-10", LG_NORDIC }, + { N_("_Persian (MacFarsi)"), "x-mac-farsi", LG_PERSIAN }, + { N_("Croatian (Mac_Croatian)"), "x-mac-croatian", LG_SE_EUROPEAN }, + { N_("_Romanian (MacRomanian)"), "x-mac-romanian", LG_SE_EUROPEAN }, + { N_("R_omanian (ISO-8859-16)"), "ISO-8859-16", LG_SE_EUROPEAN }, + { N_("South _European (ISO-8859-3)"), "ISO-8859-3", LG_SE_EUROPEAN }, + { N_("Thai (TIS-_620)"), "TIS-620", LG_THAI }, + { N_("Thai (IS_O-8859-11)"), "iso-8859-11", LG_THAI }, + { N_("_Thai (Windows-874)"), "windows-874", LG_THAI }, + { N_("Turkish (_IBM-857)"), "IBM857", LG_TURKISH }, + { N_("Turkish (I_SO-8859-9)"), "ISO-8859-9", LG_TURKISH }, + { N_("Turkish (_MacTurkish)"), "x-mac-turkish", LG_TURKISH }, + { N_("Turkish (_Windows-1254)"), "windows-1254", LG_TURKISH }, + { N_("Unicode (UTF-_8)"), "UTF-8", LG_UNICODE }, + { N_("Cyrillic/Ukrainian (_KOI8-U)"), "KOI8-U", LG_UKRAINIAN }, + { N_("Cyrillic/Ukrainian (Mac_Ukrainian)"), "x-mac-ukrainian", LG_UKRAINIAN }, + { N_("Vietnamese (_TCVN)"), "x-viet-tcvn5712", LG_VIETNAMESE }, + { N_("Vietnamese (_VISCII)"), "VISCII", LG_VIETNAMESE }, + { N_("Vietnamese (V_PS)"), "x-viet-vps", LG_VIETNAMESE }, + { N_("Vietnamese (_Windows-1258)"), "windows-1258", LG_VIETNAMESE }, + { N_("Western (_IBM-850)"), "IBM850", LG_WESTERN }, + { N_("Western (_ISO-8859-1)"), "ISO-8859-1", LG_WESTERN }, + { N_("Western (IS_O-8859-15)"), "ISO-8859-15", LG_WESTERN }, + { N_("Western (_MacRoman)"), "x-mac-roman", LG_WESTERN }, + { N_("Western (_Windows-1252)"), "windows-1252", LG_WESTERN }, /* the following encodings are so rarely used that we don't want to pollute the "related" * part of the encodings menu with them, so we set the language group to 0 here */ - { N_("English (_US-ASCII)"), "us-ascii", 0, FALSE }, - { N_("Unicode (UTF-_16 BE)"), "UTF-16BE", 0, FALSE }, - { N_("Unicode (UTF-1_6 LE)"), "UTF-16LE", 0, FALSE }, - { N_("Unicode (UTF-_32 BE)"), "UTF-32BE", 0, FALSE }, - { N_("Unicode (UTF-3_2 LE)"), "UTF-32LE", 0, FALSE }, - - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("autodetectors|Off"), "", LG_NONE, TRUE }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("automatically detect ... character encodings|Chinese"), "zh_parallel_state_machine", LG_CHINESE_TRAD | LG_CHINESE_SIMP, TRUE }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("automatically detect ... character encodings|Simplified Chinese"), "zhcn_parallel_state_machine", LG_CHINESE_SIMP, TRUE }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("automatically detect ... character encodings|Traditional Chinese"), "zhtw_parallel_state_machine", LG_CHINESE_TRAD, TRUE }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("automatically detect ... character encodings|East Asian"), "cjk_parallel_state_machine", LG_CHINESE_TRAD | LG_CHINESE_SIMP | LG_JAPANESE | LG_KOREAN, TRUE }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("automatically detect ... character encodings|Japanese"), "ja_parallel_state_machine", LG_JAPANESE, TRUE }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("automatically detect ... character encodings|Korean"), "ko_parallel_state_machine", LG_KOREAN, TRUE }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("automatically detect ... character encodings|Russian"), "ruprob", LG_CYRILLIC | LG_UKRAINIAN, TRUE }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("automatically detect ... character encodings|Universal"), "universal_charset_detector", LG_ALL, TRUE }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("automatically detect ... character encodings|Ukrainian"), "ukprob", LG_UKRAINIAN, TRUE } + { N_("English (_US-ASCII)"), "us-ascii", 0 }, + { N_("Unicode (UTF-_16 BE)"), "UTF-16BE", 0 }, + { N_("Unicode (UTF-1_6 LE)"), "UTF-16LE", 0 }, + { N_("Unicode (UTF-_32 BE)"), "UTF-32BE", 0 }, + { N_("Unicode (UTF-3_2 LE)"), "UTF-32LE", 0 }, }; -static const guint n_encoding_entries = G_N_ELEMENTS (encoding_entries); enum { @@ -196,7 +162,6 @@ ephy_encodings_finalize (GObject *object) g_hash_table_destroy (encodings->priv->hash); ephy_node_unref (encodings->priv->encodings); - ephy_node_unref (encodings->priv->detectors); ephy_node_unref (encodings->priv->root); g_slist_foreach (encodings->priv->recent, (GFunc) g_free, NULL); @@ -252,8 +217,7 @@ static EphyNode * add_encoding (EphyEncodings *encodings, const char *title, const char *code, - EphyLanguageGroup groups, - gboolean is_autodetector) + EphyLanguageGroup groups) { EphyNode *node; char *elided, *normalised; @@ -286,22 +250,11 @@ add_encoding (EphyEncodings *encodings, EPHY_NODE_ENCODING_PROP_LANGUAGE_GROUPS, groups); - ephy_node_set_property_boolean (node, - EPHY_NODE_ENCODING_PROP_IS_AUTODETECTOR, - is_autodetector); - /* now insert the node in our structure */ ephy_node_add_child (encodings->priv->root, node); g_hash_table_insert (encodings->priv->hash, g_strdup (code), node); - if (is_autodetector) - { - ephy_node_add_child (encodings->priv->detectors, node); - } - else - { - ephy_node_add_child (encodings->priv->encodings, node); - } + ephy_node_add_child (encodings->priv->encodings, node); return node; } @@ -326,7 +279,7 @@ ephy_encodings_get_node (EphyEncodings *encodings, * be displayed as. */ title = g_strdup_printf (_("Unknown (%s)"), code); - node = add_encoding (encodings, title, code, 0, FALSE); + node = add_encoding (encodings, title, code, 0); g_free (title); } @@ -362,14 +315,6 @@ ephy_encodings_get_encodings (EphyEncodings *encodings, } EphyNode * -ephy_encodings_get_detectors (EphyEncodings *encodings) -{ - g_return_val_if_fail (EPHY_IS_ENCODINGS (encodings), NULL); - - return encodings->priv->detectors; -} - -EphyNode * ephy_encodings_get_all (EphyEncodings *encodings) { g_return_val_if_fail (EPHY_IS_ENCODINGS (encodings), NULL); @@ -456,18 +401,14 @@ ephy_encodings_init (EphyEncodings *encodings) encodings->priv->root = ephy_node_new_with_id (db, ALL_NODE_ID); encodings->priv->encodings = ephy_node_new_with_id (db, ENCODINGS_NODE_ID); - encodings->priv->detectors = ephy_node_new_with_id (db, DETECTORS_NODE_ID); /* now fill the db */ - for (i = 0; i < n_encoding_entries; i++) + for (i = 0; i < G_N_ELEMENTS (encoding_entries); i++) { add_encoding (encodings, - encoding_entries[i].is_autodetector - ? Q_(encoding_entries[i].title) - : _(encoding_entries[i].title), + _(encoding_entries[i].title), encoding_entries[i].code, - encoding_entries[i].groups, - encoding_entries[i].is_autodetector); + encoding_entries[i].groups); } /* get the list of recently used encodings */ diff --git a/embed/ephy-encodings.h b/embed/ephy-encodings.h index 626ae8c3a..82b556c4a 100644 --- a/embed/ephy-encodings.h +++ b/embed/ephy-encodings.h @@ -77,7 +77,6 @@ enum EPHY_NODE_ENCODING_PROP_COLLATION_KEY = 3, EPHY_NODE_ENCODING_PROP_ENCODING = 4, EPHY_NODE_ENCODING_PROP_LANGUAGE_GROUPS = 5, - EPHY_NODE_ENCODING_PROP_IS_AUTODETECTOR = 6 }; struct _EphyEncodings @@ -106,8 +105,6 @@ GList *ephy_encodings_get_encodings (EphyEncodings *encodings, EphyNode *ephy_encodings_get_all (EphyEncodings *encodings); -EphyNode *ephy_encodings_get_detectors (EphyEncodings *encodings); - void ephy_encodings_add_recent (EphyEncodings *encodings, const char *code); diff --git a/lib/ephy-langs.c b/lib/ephy-langs.c index 8b0f442ea..229a16667 100644 --- a/lib/ephy-langs.c +++ b/lib/ephy-langs.c @@ -29,103 +29,6 @@ #include <libxml/xmlreader.h> -/* If you add more language codes here, remember to also - * add them to data/generate-font-schemas.py . - */ -static const EphyFontsLanguageInfo font_languages [] = -{ - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Arabic"), "ar" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Baltic"), "x-baltic" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Central European"), "x-central-euro" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Cyrillic"), "x-cyrillic" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Devanagari"), "x-devanagari" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Greek"), "el" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Hebrew"), "he" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Japanese"), "ja" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Korean"), "ko" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Simplified Chinese"), "zh-CN" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Tamil"), "x-tamil" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Thai"), "th" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Traditional Chinese"), "zh-TW" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Traditional Chinese (Hong Kong)"), "zh-HK" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Turkish"), "tr" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Armenian"), "x-armn" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Bengali"), "x-beng" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Unified Canadian Syllabics"), "x-cans" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Ethiopic"), "x-ethi" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Georgian"), "x-geor" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Gujarati"), "x-gujr" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Gurmukhi"), "x-guru" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Khmer"), "x-khmr" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Malayalam"), "x-mlym" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Western"), "x-western" }, - /* Translators: The text before the "|" is context to help you decide on - * the correct translation. You MUST OMIT it in the translated string. */ - { N_("select fonts for|Other Scripts"), "x-unicode" } -}; - -const EphyFontsLanguageInfo * -ephy_font_languages (void) -{ - return font_languages; -} - -guint -ephy_font_n_languages (void) -{ - return G_N_ELEMENTS (font_languages); -} - /* sanitise the languages list according to the rules for HTTP accept-language * in RFC 2616, Sect. 14.4 */ diff --git a/lib/ephy-langs.h b/lib/ephy-langs.h index ede8e9342..cf88a8900 100644 --- a/lib/ephy-langs.h +++ b/lib/ephy-langs.h @@ -32,16 +32,6 @@ G_BEGIN_DECLS #define ISO_639_DOMAIN "iso_639" #define ISO_3166_DOMAIN "iso_3166" -typedef struct -{ - char *title; - char *code; -} EphyFontsLanguageInfo; - -const EphyFontsLanguageInfo *ephy_font_languages (void); - -guint ephy_font_n_languages (void); - void ephy_langs_append_languages (GArray *array); void ephy_langs_sanitise (GArray *array); diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c index f16ecd99e..161b98cce 100644 --- a/src/prefs-dialog.c +++ b/src/prefs-dialog.c @@ -92,7 +92,6 @@ enum CLEAR_CACHE_BUTTON_PROP, /* Language */ - AUTO_ENCODING_PROP, DEFAULT_ENCODING_PROP, DEFAULT_ENCODING_LABEL_PROP, AUTO_ENCODING_LABEL_PROP, @@ -138,7 +137,6 @@ EphyDialogProperty properties [] = { "clear_cache_button", NULL, PT_NORMAL, 0 }, /* Languages */ - { "auto_encoding_combo", CONF_LANGUAGE_AUTODETECT_ENCODING, PT_AUTOAPPLY, G_TYPE_STRING }, { "default_encoding_combo", CONF_LANGUAGE_DEFAULT_ENCODING, PT_AUTOAPPLY, G_TYPE_STRING }, { "default_encoding_label", NULL, PT_NORMAL, 0 }, { "auto_encoding_label", NULL, PT_NORMAL, 0 }, @@ -347,96 +345,6 @@ create_node_combo (EphyDialog *dialog, } static void -create_autodetectors_combo (EphyDialog *dialog, - int prop, - EphyEncodings *encodings, - EphyNode *node, - const char *key, - const char *default_value) -{ - GtkListStore *store; - GtkTreeIter iter; - GPtrArray *children; - GtkComboBox *combo; - GtkCellRenderer *renderer; - char *code; - const char *off_title = NULL; - guint i; - - code = eel_gconf_get_string (key); - if (code == NULL || ephy_encodings_get_node (encodings, code, FALSE) == NULL) - { - /* safe default */ - eel_gconf_set_string (key, default_value); - } - g_free (code); - - combo = GTK_COMBO_BOX (ephy_dialog_get_control (dialog, properties[prop].id)); - - store = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN); - - children = ephy_node_get_children (node); - for (i = 0; i < children->len; ++i) - { - EphyNode *kid = g_ptr_array_index (children, i); - const char *code, *title; - - code = ephy_node_get_property_string (kid, EPHY_NODE_ENCODING_PROP_ENCODING); - g_return_if_fail (code != NULL); - - title = ephy_node_get_property_string (kid, EPHY_NODE_ENCODING_PROP_TITLE_ELIDED); - if (code[0] == '\0') - { - off_title = title; - } - else - { - gtk_list_store_insert_with_values (store, &iter, -1, - COL_AUTODETECTOR_NAME, title, - COL_AUTODETECTOR_DATA, code, - COL_AUTODETECTOR_IS_SEP, FALSE, - -1); - } - } - - gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store), - COL_AUTODETECTOR_NAME, - GTK_SORT_ASCENDING); - gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store), - GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, - GTK_SORT_ASCENDING); - - g_assert (off_title != NULL); - - gtk_list_store_insert_with_values (store, &iter, 0, - COL_AUTODETECTOR_NAME, off_title, - COL_AUTODETECTOR_DATA, "", - COL_AUTODETECTOR_IS_SEP, FALSE, - -1); - gtk_list_store_insert_with_values (store, &iter, 1, - COL_AUTODETECTOR_NAME, NULL, - COL_AUTODETECTOR_DATA, "", - COL_AUTODETECTOR_IS_SEP, TRUE, - -1); - - gtk_combo_box_set_model (combo, GTK_TREE_MODEL (store)); - g_object_unref (store); - - gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (combo), - (GtkTreeViewRowSeparatorFunc) row_is_separator, - GINT_TO_POINTER (COL_AUTODETECTOR_IS_SEP), NULL); - - - renderer = gtk_cell_renderer_text_new (); - gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE); - gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer, - "text", COL_AUTODETECTOR_NAME, - NULL); - - ephy_dialog_set_data_column (dialog, properties[prop].id, COL_AUTODETECTOR_DATA); -} - -static void language_editor_add (PrefsDialog *pd, const char *code, const char *desc) @@ -1210,9 +1118,6 @@ prefs_dialog_init (PrefsDialog *pd) create_node_combo (dialog, DEFAULT_ENCODING_PROP, encodings, ephy_encodings_get_all (encodings), CONF_LANGUAGE_DEFAULT_ENCODING, "ISO-8859-1"); - create_autodetectors_combo (dialog, AUTO_ENCODING_PROP, encodings, - ephy_encodings_get_detectors (encodings), - CONF_LANGUAGE_AUTODETECT_ENCODING, ""); create_language_section (dialog); |