aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-03-21 01:23:58 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-03-21 01:23:58 +0800
commitcba3097cad7443810117bded371a2e3088a33d12 (patch)
treeb4bf9ba6b6c9b5433c8ac2614694d7bf76d87ff0 /e-util
parent2313e47dab3e8151743138892277b08cf78034cc (diff)
downloadgsoc2013-evolution-cba3097cad7443810117bded371a2e3088a33d12.tar.gz
gsoc2013-evolution-cba3097cad7443810117bded371a2e3088a33d12.tar.zst
gsoc2013-evolution-cba3097cad7443810117bded371a2e3088a33d12.zip
** Fixes bug #419524
2007-03-20 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #419524 * Include <glib/gi18n.h> instead of <libgnome/gnome-i18n.h>. * e-util/e-xml-utils.c (e_xml_get_child_by_name_by_lang_list): * mail/em-migrate.c (emm_setup_initial): * shell/e-component-registry.c (query_components): * shell/e-shell-settings-dialog.c (load_pages): * shell/e-shell-window-commands.c (command_quick_reference): * tools/killev.c (main): Use g_get_language_names() instead of gnome_i18n_get_language_list(). * e-util/e-util.c: Remove e_gettext(). * e-util/Makefile.am: Remove e-i18n.h. svn path=/trunk/; revision=33319
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog13
-rw-r--r--e-util/Makefile.am1
-rw-r--r--e-util/e-categories-config.c2
-rw-r--r--e-util/e-config.c2
-rw-r--r--e-util/e-dialog-utils.c2
-rw-r--r--e-util/e-error.c2
-rw-r--r--e-util/e-event.c2
-rw-r--r--e-util/e-i18n.h74
-rw-r--r--e-util/e-import.c2
-rw-r--r--e-util/e-menu.c2
-rw-r--r--e-util/e-popup.c2
-rw-r--r--e-util/e-text-event-processor.c3
-rw-r--r--e-util/e-util.c15
-rw-r--r--e-util/e-xml-utils.c8
14 files changed, 29 insertions, 101 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 44f2a067d3..2a036e75f5 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,16 @@
+2007-03-20 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #419524
+
+ * Include <glib/gi18n.h> instead of <libgnome/gnome-i18n.h>.
+
+ * e-util.c: Remove e_gettext().
+
+ * e-xml-utils.c (e_xml_get_child_by_name_by_lang_list): Use
+ g_get_language_names() instead of gnome_i18n_get_language_list().
+
+ * Makefile.am: Remove e-i18n.h.
+
2007-03-01 Tor Lillqvist <tml@novell.com>
* e-print.c (print_dialog_response)
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index e3c7052cec..75f9809337 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -108,7 +108,6 @@ libeutil_la_SOURCES = \
eggtrayicon.c \
eggtrayicon.h \
e-bit-array.c \
- e-i18n.h \
e-sorter.c \
e-sorter-array.c \
e-text-event-processor-emacs-like.c \
diff --git a/e-util/e-categories-config.c b/e-util/e-categories-config.c
index 0bf75f9d5f..16a7671155 100644
--- a/e-util/e-categories-config.c
+++ b/e-util/e-categories-config.c
@@ -10,7 +10,7 @@
#include <string.h>
#include <gtk/gtkdialog.h>
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libedataserver/e-categories.h>
#include <libedataserverui/e-categories-dialog.h>
diff --git a/e-util/e-config.c b/e-util/e-config.c
index 828ebedcd0..11bd5492b3 100644
--- a/e-util/e-config.c
+++ b/e-util/e-config.c
@@ -45,7 +45,7 @@
#include <e-util/e-icon-factory.h>
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
#define d(x)
diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c
index 581c24240c..e5fb6429aa 100644
--- a/e-util/e-dialog-utils.c
+++ b/e-util/e-dialog-utils.c
@@ -46,7 +46,7 @@
#include <gtk/gtkstock.h>
#include <gconf/gconf-client.h>
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
#include <libgnome/gnome-util.h>
#include <libgnomevfs/gnome-vfs-utils.h>
diff --git a/e-util/e-error.c b/e-util/e-error.c
index 0fd4ddedb7..7b7ef5dbf0 100644
--- a/e-util/e-error.c
+++ b/e-util/e-error.c
@@ -37,7 +37,7 @@
#include <gtk/gtkimage.h>
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkwindow.h>
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
#include <libgnome/gnome-url.h>
#include <libedataserver/e-xml-utils.h>
diff --git a/e-util/e-event.c b/e-util/e-event.c
index 99d8876058..235143c883 100644
--- a/e-util/e-event.c
+++ b/e-util/e-event.c
@@ -42,7 +42,7 @@
#include <e-util/e-icon-factory.h>
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
#include <libedataserver/e-msgport.h>
#define d(x)
diff --git a/e-util/e-i18n.h b/e-util/e-i18n.h
deleted file mode 100644
index d98afa31c8..0000000000
--- a/e-util/e-i18n.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-i18n.h
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * Copied from gnome-i18nP.h, because this header is typically not installed
- *
- * This file has to be included before any file from the GNOME libraries
- * to have this override the definitions that are pulled from the gnome-i18n.h
- *
- * the difference is that gnome-i18n.h is used for applications, and this is
- * used by libraries (because libraries have to use dcgettext instead of
- * gettext and they need to provide the translation domain, unlike apps).
- *
- * So you can just put this after you include config.h
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License, version 2, as published by the Free Software Foundation.
- *
- * This library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __E_I18N_H__
-#define __E_I18N_H__
-
-#include <libgnome/gnome-i18n.h>
-
-G_BEGIN_DECLS
-
-#ifdef ENABLE_NLS
- /* this function is defined in e-util.c */
- extern char *e_gettext (const char *msgid);
-# undef _
-# ifdef GNOME_EXPLICIT_TRANSLATION_DOMAIN
-/* No parentheses allowed here since that breaks string concatenation. */
-# define E_I18N_DOMAIN GNOME_EXPLICIT_TRANSLATION_DOMAIN
-# else
-/* No parentheses allowed here since that breaks string concatenation. */
-# define E_I18N_DOMAIN GETTEXT_PACKAGE
-# endif
-# define _(String) e_gettext (String)
-# ifdef gettext_noop
-# define N_(String) gettext_noop (String)
-# else
-# define N_(String) (String)
-# endif
-#else
-/* Stubs that do something close enough. */
-# define textdomain(String) (String)
-# define gettext(String) (String)
-# define dgettext(Domain,Message) (Message)
-# define dcgettext(Domain,Message,Type) (Message)
-# define bindtextdomain(Domain,Directory) (Domain)
-# define _(String) (String)
-# define N_(String) (String)
-/* No parentheses allowed here since that breaks string concatenation. */
-# define E_I18N_DOMAIN ""
-#endif
-
-G_END_DECLS
-
-#endif /* __E_I18N_H__ */
diff --git a/e-util/e-import.c b/e-util/e-import.c
index 1a85991463..5a8ad50f0c 100644
--- a/e-util/e-import.c
+++ b/e-util/e-import.c
@@ -45,7 +45,7 @@
#include <e-util/e-icon-factory.h>
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
#define d(x)
diff --git a/e-util/e-menu.c b/e-util/e-menu.c
index 8c9438bbdc..7a53c7d4e8 100644
--- a/e-util/e-menu.c
+++ b/e-util/e-menu.c
@@ -29,7 +29,7 @@
#include <glib.h>
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
#include <bonobo/bonobo-ui-util.h>
#include <libedataserver/e-data-server-util.h>
diff --git a/e-util/e-popup.c b/e-util/e-popup.c
index a49793e9b1..602d59841e 100644
--- a/e-util/e-popup.c
+++ b/e-util/e-popup.c
@@ -42,7 +42,7 @@
#include <e-util/e-icon-factory.h>
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
#define d(x)
diff --git a/e-util/e-text-event-processor.c b/e-util/e-text-event-processor.c
index 733ecae11e..c5dc27cc7d 100644
--- a/e-util/e-text-event-processor.c
+++ b/e-util/e-text-event-processor.c
@@ -23,7 +23,8 @@
#include <config.h>
-#include "e-i18n.h"
+#include <glib/gi18n.h>
+
#include "e-util-marshal.h"
#include "e-text-event-processor.h"
#include "e-util.h"
diff --git a/e-util/e-util.c b/e-util/e-util.c
index 5d854e0d51..f5e33f04bd 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -46,7 +46,6 @@
#endif
#include <libedataserver/e-data-server-util.h>
-#include "e-i18n.h"
#include "e-util.h"
#include "e-util-private.h"
@@ -1112,20 +1111,6 @@ e_strdupv (const gchar **str_array)
}
}
-char *
-e_gettext (const char *msgid)
-{
- static gboolean initialized = FALSE;
-
- if (!initialized) {
- bindtextdomain (E_I18N_DOMAIN, EVOLUTION_LOCALEDIR);
- bind_textdomain_codeset (E_I18N_DOMAIN, "UTF-8");
- initialized = TRUE;
- }
-
- return dgettext (E_I18N_DOMAIN, msgid);
-}
-
cairo_font_options_t *
get_font_options ()
{
diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c
index f761225d8b..5d83247d05 100644
--- a/e-util/e-xml-utils.c
+++ b/e-util/e-xml-utils.c
@@ -40,7 +40,6 @@
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
-#include "e-i18n.h"
#include "e-util.h"
#include "e-xml-utils.h"
@@ -149,7 +148,12 @@ e_xml_get_child_by_name_by_lang_list (const xmlNode *parent,
g_return_val_if_fail (name != NULL, NULL);
if (lang_list == NULL) {
- lang_list = gnome_i18n_get_language_list ("LC_MESSAGES");
+ const gchar * const *language_names;
+
+ language_names = g_get_language_names ();
+ while (*language_names != NULL)
+ lang_list = g_list_append (
+ lang_list, *language_names++);
}
return e_xml_get_child_by_name_by_lang_list_with_score
(parent,name,