diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-05-02 03:48:05 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-05-02 03:48:05 +0800 |
commit | e7d3de6ca1957c42c780d07473e76898a573c796 (patch) | |
tree | da133ac96ee813c69357578aec844e6bf1fdc01f | |
parent | 165179754e9c3a75b1c5405dd14dc6ea6939dca3 (diff) | |
download | gsoc2013-epiphany-e7d3de6ca1957c42c780d07473e76898a573c796.tar gsoc2013-epiphany-e7d3de6ca1957c42c780d07473e76898a573c796.tar.gz gsoc2013-epiphany-e7d3de6ca1957c42c780d07473e76898a573c796.tar.bz2 gsoc2013-epiphany-e7d3de6ca1957c42c780d07473e76898a573c796.tar.lz gsoc2013-epiphany-e7d3de6ca1957c42c780d07473e76898a573c796.tar.xz gsoc2013-epiphany-e7d3de6ca1957c42c780d07473e76898a573c796.tar.zst gsoc2013-epiphany-e7d3de6ca1957c42c780d07473e76898a573c796.zip |
A src/languages.h:
2005-05-01 Christian Persch <chpe@cvs.gnome.org>
* data/default-prefs-common.js:
* data/epiphany.schemas.in:
* lib/ephy-langs.c:
A src/languages.h:
* src/prefs-dialog.c: (prefs_dialog_show_help),
(create_language_section), (get_download_button_label),
(prefs_dialog_init):
Add more font languages, and generate the language list
from the unicode supplemental data.
* lib/ephy-dialog.c:
* lib/ephy-dialog.h:
* src/prefs-dialog.c:
Constification.
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | data/default-prefs-common.js | 18 | ||||
-rw-r--r-- | data/epiphany.schemas.in | 3 | ||||
-rw-r--r-- | lib/ephy-dialog.c | 2 | ||||
-rw-r--r-- | lib/ephy-dialog.h | 2 | ||||
-rw-r--r-- | src/languages.h | 550 | ||||
-rw-r--r-- | src/prefs-dialog.c | 203 |
7 files changed, 601 insertions, 196 deletions
@@ -1,5 +1,24 @@ 2005-05-01 Christian Persch <chpe@cvs.gnome.org> + * data/default-prefs-common.js: + * data/epiphany.schemas.in: + * lib/ephy-langs.c: + A src/languages.h: + * src/prefs-dialog.c: (prefs_dialog_show_help), + (create_language_section), (get_download_button_label), + (prefs_dialog_init): + + Add more font languages, and generate the language list + from the unicode supplemental data. + + * lib/ephy-dialog.c: + * lib/ephy-dialog.h: + * src/prefs-dialog.c: + + Constification. + +2005-05-01 Christian Persch <chpe@cvs.gnome.org> + * embed/mozilla/EphySidebar.cpp: * embed/mozilla/EphySidebar.h: * embed/mozilla/MozRegisterComponents.cpp: diff --git a/data/default-prefs-common.js b/data/default-prefs-common.js index baeda3016..219bcf2be 100644 --- a/data/default-prefs-common.js +++ b/data/default-prefs-common.js @@ -58,6 +58,15 @@ pref("font.size.fixed.th", 10); pref("font.size.fixed.zh-TW", 10); pref("font.size.fixed.zh-HK", 10); pref("font.size.fixed.tr", 10); +pref("font.size.fixed.x-armn", 10); +pref("font.size.fixed.x-beng", 10); +pref("font.size.fixed.x-cans", 10); +pref("font.size.fixed.x-ethi", 10); +pref("font.size.fixed.x-geor", 10); +pref("font.size.fixed.x-gujr", 10); +pref("font.size.fixed.x-guru", 10); +pref("font.size.fixed.x-khmr", 10); +pref("font.size.fixed.x-mlym", 10); pref("font.size.fixed.x-unicode", 10); pref("font.size.fixed.x-western", 10); pref("font.size.variable.ar", 11); @@ -75,6 +84,15 @@ pref("font.size.variable.th", 11); pref("font.size.variable.zh-TW", 11); pref("font.size.variable.zh-HK", 11); pref("font.size.variable.tr", 11); +pref("font.size.variable.x-armn", 11); +pref("font.size.variable.x-beng", 11); +pref("font.size.variable.x-cans", 11); +pref("font.size.variable.x-ethi", 11); +pref("font.size.variable.x-geor", 11); +pref("font.size.variable.x-gujr", 11); +pref("font.size.variable.x-guru", 11); +pref("font.size.variable.x-khmr", 11); +pref("font.size.variable.x-mlym", 11); pref("font.size.variable.x-unicode", 11); pref("font.size.variable.x-western", 11); diff --git a/data/epiphany.schemas.in b/data/epiphany.schemas.in index 0ca7c7b6a..53da03011 100644 --- a/data/epiphany.schemas.in +++ b/data/epiphany.schemas.in @@ -85,6 +85,7 @@ <locale name="C"> <default>x-western</default> <short>The currently selected fonts language</short> + <!-- FIXME complete the list with the gecko-1-8 new x-* names --> <long> The currently selected fonts language. Valid values are "ar" (arabic), "x-baltic" (baltic languages), "x-central-euro" (central european languages), @@ -442,7 +443,7 @@ <default>Downloads</default> <locale name="C"> <short>The downloads folder</short> - <long>The path of the folder where downloads are saved.</long> + <long>The path of the folder where to download files to; or "Downloads" to use the default downloads folder, or "Desktop" to use the desktop folder.</long> </locale> </schema> <schema> diff --git a/lib/ephy-dialog.c b/lib/ephy-dialog.c index efeb5dcdd..9cd0518a3 100644 --- a/lib/ephy-dialog.c +++ b/lib/ephy-dialog.c @@ -1096,7 +1096,7 @@ void ephy_dialog_add_enum (EphyDialog *dialog, const char *id, guint n_items, - const char **items) + const char *const *items) { PropertyInfo *info; int i = 0; diff --git a/lib/ephy-dialog.h b/lib/ephy-dialog.h index 3a861cffb..e8e45ca72 100644 --- a/lib/ephy-dialog.h +++ b/lib/ephy-dialog.h @@ -94,7 +94,7 @@ void ephy_dialog_construct (EphyDialog *dialog, void ephy_dialog_add_enum (EphyDialog *dialog, const char *id, guint n_items, - const char **items); + const char * const *items); void ephy_dialog_set_data_column (EphyDialog *dialog, const char *id, diff --git a/src/languages.h b/src/languages.h new file mode 100644 index 000000000..063940622 --- /dev/null +++ b/src/languages.h @@ -0,0 +1,550 @@ +static const char languages[][7] = +{ +/* If you're missing your language/locale combination, file a bug at + * http://bugzilla.gnome.org/enter_bug.cgi?product=epiphany + */ +"ab", +"ab", +"af", +"af-na", +"af-za", +"am", +"an", +"ar", +"ar", +"ar-ae", +"ar-bh", +"ar-dj", +"ar-dz", +"ar-eg", +"ar-eh", +"ar-er", +"ar-il", +"ar-iq", +"ar-jo", +"ar-km", +"ar-kw", +"ar-lb", +"ar-ly", +"ar-ma", +"ar-mr", +"ar-om", +"ar-ps", +"ar-qa", +"ar-sa", +"ar-sd", +"ar-sy", +"ar-td", +"ar-tn", +"ar-ye", +"ast", +"as", +"as-bd", +"as-in", +"ay", +"ay-bo", +"ay-pe", +"az", +"az", +"az-az", +"az-ge", +"az-ir", +"az-tr", +"bal", +"bal", +"bal-af", +"bal-ir", +"bal-om", +"be", +"bg", +"bn", +"br", +"bn-bd", +"bn-in", +"bo", +"bo-cn", +"bo-in", +"bo-np", +"bs", +"bs", +"bs-cs", +"bs-hr", +"ca", +"ce", +"ca-ad", +"ca-es", +"ch", +"co", +"ch-gu", +"ch-mp", +"chr", +"cpe", +"cr", +"cs", +"cv", +"cy", +"da", +"da-dk", +"da-gl", +"de", +"de", +"de-at", +"de-be", +"de-ch", +"de-de", +"de-li", +"de-lu", +"de-na", +"dgr", +"dv", +"dz", +"el", +"el-cy", +"el-gr", +"en", +"en-ag", +"en-ai", +"en-as", +"en-au", +"en-aw", +"en-bb", +"en-bm", +"en-bs", +"en-bw", +"en-bz", +"en-ca", +"en-cc", +"en-ck", +"en-cm", +"en-cx", +"en-dm", +"en-er", +"en-fj", +"en-fk", +"en-fm", +"en-gb", +"en-gd", +"en-gh", +"en-gi", +"en-gm", +"en-gy", +"en-hk", +"en-ie", +"en-in", +"en-io", +"en-jm", +"en-ke", +"en-ki", +"en-kn", +"en-ky", +"en-lc", +"en-lr", +"en-ls", +"en-mh", +"en-mp", +"en-ms", +"en-mt", +"en-mw", +"en-na", +"en-nf", +"en-ng", +"en-nr", +"en-nu", +"en-nz", +"en-pg", +"en-ph", +"en-pk", +"en-pn", +"en-pw", +"en-rw", +"en-sb", +"en-sg", +"en-sh", +"en-sl", +"en-sz", +"en-tc", +"en-tk", +"en-to", +"en-tt", +"en-tz", +"en-ug", +"en-um", +"en-us", +"en-vc", +"en-vg", +"en-vi", +"en-za", +"en-zm", +"en-zw", +"es", +"es-ar", +"es-bo", +"es-cl", +"es-co", +"es-cr", +"es-cu", +"es-do", +"es-ec", +"es-es", +"es-gi", +"es-gq", +"es-gt", +"es-hn", +"es-mx", +"es-ni", +"es-pa", +"es-pe", +"es-pr", +"es-py", +"es-sv", +"es-us", +"es-uy", +"es-ve", +"et", +"eu", +"fa", +"fa-af", +"fa-ir", +"fi", +"fi-fi", +"fil", +"fi-se", +"fiu", +"fiu-fi", +"fiu-se", +"fj", +"fo", +"fr", +"fr", +"fr-be", +"fr-bf", +"fr-bi", +"fr-bj", +"fr-ca", +"fr-cd", +"fr-cf", +"fr-cg", +"fr-ch", +"fr-ci", +"fr-cm", +"fr-dj", +"fr-fr", +"fr-ga", +"fr-gf", +"fr-gn", +"fr-gp", +"fr-gq", +"fr-ht", +"fr-it", +"fr-km", +"fr-lu", +"fr-mc", +"fr-mg", +"fr-ml", +"fr-mq", +"fr-mr", +"fr-mu", +"fr-nc", +"fr-ne", +"fr-pf", +"fr-pm", +"fr-re", +"fr-rw", +"fr-sc", +"fr-sn", +"fr-td", +"fr-tf", +"fr-tg", +"fr-us", +"fr-vu", +"fr-wf", +"fr-yt", +"fy", +"fy-de", +"fy-nl", +"ga", +"ga", +"gd", +"gl", +"gn", +"gn", +"gn-ar", +"gn-bo", +"gu", +"gv", +"ha", +"ha-ne", +"ha-ng", +"haw", +"he", +"hsb", +"hi", +"hi-fj", +"hi-in", +"ho", +"hr", +"hr", +"hr-ba", +"hr-hr", +"ht", +"hu", +"hu", +"hu-cs", +"hu-si", +"hy", +"hy", +"ia", +"hy-az", +"hy-ge", +"hy-ir", +"id", +"ie", +"is", +"it", +"it", +"it-ch", +"it-hr", +"it-it", +"it-si", +"it-sm", +"it-va", +"iu", +"iu-ca", +"iu-gl", +"iu-ru", +"iu-us", +"ja", +"ja-gu", +"ja-jp", +"ja-pw", +"ka", +"kk", +"kl", +"km", +"kn", +"ko", +"kok", +"ko-kp", +"ko-kr", +"ks", +"ku", +"ku", +"ku-iq", +"ku-ir", +"ku-tr", +"kw", +"ky", +"ky", +"la", +"lb", +"li", +"ln", +"ln", +"lo", +"lt", +"lv", +"mai", +"men", +"men-gn", +"men-lr", +"men-sl", +"mg", +"mh", +"mh-mh", +"mh-nr", +"mi", +"mi-ck", +"mi-nz", +"mk", +"ml", +"mn", +"mni", +"mo", +"mr", +"ms", +"ms-bn", +"ms-cc", +"ms-cx", +"ms-my", +"ms-sg", +"mt", +"my", +"na", +"nb", +"nb-no", +"nb-sj", +"nd", +"ne", +"ng", +"niu", +"nl", +"nl-an", +"nl-aw", +"nl-be", +"nl-nl", +"nl-sr", +"nn", +"nn-no", +"nn-sj", +"no", +"no-no", +"no-sj", +"nr", +"nso", +"ny", +"ny", +"ny-mz", +"ny-zm", +"oc", +"oj", +"om", +"om-et", +"om-ke", +"or", +"os", +"os-ge", +"os-ru", +"pa", +"pa-in", +"pa-pk", +"pau", +"pl", +"ps", +"ps-af", +"ps-pk", +"pt", +"pt-ao", +"pt-br", +"pt-cv", +"pt-gw", +"pt-mo", +"pt-mz", +"pt-pt", +"pt-st", +"pt-tl", +"qu", +"qu-bo", +"qu-pe", +"rm", +"rn", +"ro", +"ro", +"ru", +"ru", +"ru-by", +"ru-ge", +"ru-kg", +"ru-kz", +"ru-ru", +"ru-sj", +"ru-ua", +"rw", +"sa", +"sc", +"sd", +"sd-in", +"sd-pk", +"sg", +"si", +"sk", +"sk", +"sl", +"sm", +"sm-as", +"sm-ws", +"so", +"so", +"so-dj", +"so-et", +"so-ke", +"son", +"son-bj", +"son-ml", +"son-ne", +"so-so", +"sq", +"sq-al", +"sq-cs", +"sq-mk", +"sr", +"sr", +"sr-ba", +"sr-cs", +"ss", +"ss-sz", +"ss-za", +"st", +"st-ls", +"st-za", +"sv", +"sv-ax", +"sv-fi", +"sv-se", +"sw", +"sw-ke", +"sw-tz", +"sw-yt", +"ta", +"ta-in", +"ta-lk", +"ta-sg", +"te", +"tem", +"tet", +"tg", +"th", +"ti", +"ti-er", +"ti-et", +"tig", +"tk", +"tk", +"tk-af", +"tk-ir", +"tkl", +"tl", +"tl-gu", +"tl-ph", +"tmh", +"tmh-ml", +"tmh-ne", +"tn", +"tn-bw", +"tn-za", +"to", +"tpi", +"tr", +"tr-cy", +"tr-tr", +"ts", +"tvl", +"uk", +"uk", +"ur", +"ur-in", +"ur-pk", +"uz", +"uz", +"ve", +"vi", +"vo", +"wa", +"wo", +"wo-gm", +"wo-mr", +"wo-sn", +"xh", +"yi", +"xh-ls", +"xh-za", +"zh", +"zh-cn", +"zh-cx", +"zh-hk", +"zh-mo", +"zh-sg", +"zh-tw", +"zu", +"zu-ls", +"zu-za" +}; diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c index 402af7b17..8f853ce19 100644 --- a/src/prefs-dialog.c +++ b/src/prefs-dialog.c @@ -87,194 +87,12 @@ void language_editor_up_button_clicked_cb (GtkWidget *button, void language_editor_down_button_clicked_cb (GtkWidget *button, PrefsDialog *pd); -static const char * const languages[] = -{ - /* If you're missing your language/locale combination, file a bug at - * http://bugzilla.gnome.org/enter_bug.cgi?product=epiphany - */ - "af", - "am", - "an", - "ar", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "ast", - "az", - "be", - "bg", - "bn", - "br", - "bs", - "ca", - "ce", - "ch", - "co", - "cs", - "cv", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-de", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-ph", - "en-tt", - "en-us", - "en-za", - "en-zw", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-es", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fj", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-fr", - "fr-lu", - "fr-mc", - "fy", - "ga", - "gd", - "gl", - "gu", - "he", - "hsb", - "hi", - "hr", - "ht", - "hu", - "hy", - "ia", - "id", - "ie", - "is", - "it", - "it-ch", - "it-it", - "iu", - "ja", - "ka", - "kk", - "ko", - "ko-kp", - "ko-kr", - "ky", - "la", - "lb", - "li", - "lt", - "lv", - "mi", - "mk-mk", - "ml", - "mn", - "mo", - "mr", - "ms", - "nb", - "ne", - "ng", - "nl", - "nl-be", - "nn", - "no", - "nv", - "oc", - "om", - "pa", - "pl", - "pt", - "pt-br", - "qu", - "rm", - "ro", - "ru", - "sa", - "sc", - "sd", - "sg", - "sk", - "sl", - "so", - "sq", - "sr", - "sv", - "sv-fi", - "sw", - "ta", - "th", - "tk", - "tr", - "uk", - "ve", - "vi", - "vo", - "wa", - "xh", - "yi", - "zh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" -}; +#include "languages.h" -static const -char *cookies_accept_enum [] = +static const char * const cookies_accept_enum [] = { "anywhere", "current site", "nowhere" }; -static guint n_cookies_accept_enum = G_N_ELEMENTS (cookies_accept_enum); enum { @@ -282,8 +100,7 @@ enum FONT_TYPE_MONOSPACE }; -const -char *fonts_types[] = +static const char * const fonts_types[] = { "variable", "monospace" @@ -296,8 +113,7 @@ enum FONT_SIZE_MIN }; -const -char *size_prefs [] = +static const char * const size_prefs [] = { CONF_RENDERING_FONT_FIXED_SIZE, CONF_RENDERING_FONT_VAR_SIZE, @@ -450,6 +266,7 @@ struct PrefsDialogPrivate /* gtk+' gettext domain */ #define GTK_DOMAIN "gtk20" +#define DGETTEXT_GTK_(x) dgettext(GTK_DOMAIN, x) static GObjectClass *parent_class = NULL; @@ -525,7 +342,7 @@ prefs_dialog_show_help (EphyDialog *dialog) GtkWidget *window, *notebook; int id; - char *help_preferences[] = { + static char * const help_preferences[] = { "general-preferences", "fonts-and-colors-preferences", "privacy-preferences", @@ -1236,7 +1053,7 @@ create_language_section (EphyDialog *dialog) renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (treeview, - 0, "Language", + 0, _("Language"), renderer, "text", 0, NULL); @@ -1321,7 +1138,7 @@ get_download_button_label (void) if (key == NULL || g_utf8_collate (key, "~") == 0) { - label = g_strdup (dgettext (GTK_DOMAIN, "Home")); + label = g_strdup (DGETTEXT_GTK_("Home")); } else if ((converted_dp != NULL && g_utf8_collate (key, converted_dp) == 0) || g_utf8_collate (key, "Downloads") == 0) @@ -1331,7 +1148,7 @@ get_download_button_label (void) else if (g_utf8_collate (key, "~/Desktop") == 0 || g_utf8_collate (key, "Desktop") == 0) { - label = g_strdup (dgettext (GTK_DOMAIN, "Desktop")); + label = g_strdup (DGETTEXT_GTK_("Desktop")); } else { @@ -1382,7 +1199,7 @@ prefs_dialog_init (PrefsDialog *pd) NULL); ephy_dialog_add_enum (dialog, properties[ACCEPT_COOKIES_PROP].id, - n_cookies_accept_enum, cookies_accept_enum); + G_N_ELEMENTS (cookies_accept_enum), cookies_accept_enum); ephy_dialog_get_controls (dialog, |