aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--embed/mozilla/mozilla-notifiers.cpp4
-rw-r--r--lib/ephy-langs.c36
-rw-r--r--lib/ephy-langs.h24
-rw-r--r--po/POTFILES.in2
-rw-r--r--src/prefs-dialog.c5
6 files changed, 57 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index d0534a111..7dadc5ce6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-06-12 Christian Persch <chpe@cvs.gnome.org>
+
+ * lib/ephy-langs.h:
+ * lib/ephy-langs.c: (ephy_langs_get_n_font_languages),
+ (ephy_langs_get_font_languages):
+
+ Use functions instead of declaring static vars in .h file,
+ (hopefully) fixing # 114906 .
+
2003-06-12 Xan Lopez <xan@masilla.org>
* lib/widgets/ephy-node-view.c: (ephy_node_view_select_node):
diff --git a/embed/mozilla/mozilla-notifiers.cpp b/embed/mozilla/mozilla-notifiers.cpp
index 58b306a13..f17e36213 100644
--- a/embed/mozilla/mozilla-notifiers.cpp
+++ b/embed/mozilla/mozilla-notifiers.cpp
@@ -344,6 +344,8 @@ mozilla_notifiers_init(EphyEmbedSingle *single)
{
GConfClient *client = eel_gconf_client_get_global ();
guint i;
+ guint n_fonts_languages;
+ const FontsLanguageInfo *fonts_language;
for (i = 0; conversion_table[i].gconf_key != NULL; i++)
{
@@ -381,6 +383,8 @@ mozilla_notifiers_init(EphyEmbedSingle *single)
}
/* fonts notifiers */
+ n_fonts_languages = ephy_langs_get_n_font_languages ();
+ fonts_language = ephy_langs_get_font_languages ();
for (i = 0; i < n_fonts_languages; i++)
{
guint k;
diff --git a/lib/ephy-langs.c b/lib/ephy-langs.c
index 583aeb4dc..31914e7bc 100644
--- a/lib/ephy-langs.c
+++ b/lib/ephy-langs.c
@@ -16,8 +16,28 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
- #include "ephy-langs.h"
-
+#include "ephy-langs.h"
+#include <bonobo/bonobo-i18n.h>
+
+static const FontsLanguageInfo font_languages[] =
+{
+ { N_("Arabic"), "ar" },
+ { N_("Baltic"), "x-baltic" },
+ { N_("Central European"), "x-central-euro" },
+ { N_("Cyrillic"), "x-cyrillic" },
+ { N_("Greek"), "el" },
+ { N_("Hebrew"), "he" },
+ { N_("Japanese"), "ja" },
+ { N_("Korean"), "ko" },
+ { N_("Simplified Chinese"), "zh-CN" },
+ { N_("Thai"), "th" },
+ { N_("Traditional Chinese"), "zh-TW" },
+ { N_("Turkish"), "tr" },
+ { N_("Unicode"), "x-unicode" },
+ { N_("Western"), "x-western" },
+};
+static const guint n_font_languages = G_N_ELEMENTS (font_languages);
+
void
language_group_info_free (LanguageGroupInfo *info)
{
@@ -40,3 +60,15 @@ encoding_info_free (EncodingInfo *info)
g_free (info);
}
+
+guint
+ephy_langs_get_n_font_languages (void)
+{
+ return n_font_languages;
+}
+
+const FontsLanguageInfo *
+ephy_langs_get_font_languages (void)
+{
+ return font_languages;
+}
diff --git a/lib/ephy-langs.h b/lib/ephy-langs.h
index dfe5ec2ee..30cb3a6d2 100644
--- a/lib/ephy-langs.h
+++ b/lib/ephy-langs.h
@@ -24,7 +24,6 @@
#endif
#include <glib.h>
-#include <bonobo/bonobo-i18n.h>
G_BEGIN_DECLS
@@ -71,29 +70,14 @@ typedef struct
gchar* code;
} FontsLanguageInfo;
-static const FontsLanguageInfo fonts_language[] =
-{
- { N_("Arabic"), "ar" },
- { N_("Baltic"), "x-baltic" },
- { N_("Central European"), "x-central-euro" },
- { N_("Cyrillic"), "x-cyrillic" },
- { N_("Greek"), "el" },
- { N_("Hebrew"), "he" },
- { N_("Japanese"), "ja" },
- { N_("Korean"), "ko" },
- { N_("Simplified Chinese"), "zh-CN" },
- { N_("Thai"), "th" },
- { N_("Traditional Chinese"), "zh-TW" },
- { N_("Turkish"), "tr" },
- { N_("Unicode"), "x-unicode" },
- { N_("Western"), "x-western" },
-};
-static const guint n_fonts_languages = G_N_ELEMENTS (fonts_language);
-
void language_group_info_free (LanguageGroupInfo *info);
void encoding_info_free (EncodingInfo *info);
+guint ephy_langs_get_n_font_languages (void);
+
+const FontsLanguageInfo * ephy_langs_get_font_languages (void);
+
G_END_DECLS
#endif
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5200ce611..3356d3703 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -24,7 +24,7 @@ lib/egg/egg-toolbar-editor.c
lib/egg/egg-toolbar-editor.c
lib/ephy-file-helpers.c
lib/ephy-gui.c
-lib/ephy-langs.h
+lib/ephy-langs.c
lib/ephy-node.c
lib/ephy-string.c
lib/ephy-zoom.h
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 594e11e21..3dcaa806d 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -639,6 +639,11 @@ create_fonts_language_menu (PrefsDialog *dialog)
GtkWidget *optionmenu, *menu;
GList *l = NULL;
guint i;
+ guint n_fonts_languages;
+ const FontsLanguageInfo *fonts_language;
+
+ n_fonts_languages = ephy_langs_get_n_font_languages ();
+ fonts_language = ephy_langs_get_font_languages ();
for (i = 0; i < n_fonts_languages; i++)
{