From cba3097cad7443810117bded371a2e3088a33d12 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 20 Mar 2007 17:23:58 +0000 Subject: ** Fixes bug #419524 2007-03-20 Matthew Barnes ** Fixes bug #419524 * Include instead of . * 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 --- e-util/ChangeLog | 13 ++++++++ e-util/Makefile.am | 1 - e-util/e-categories-config.c | 2 +- e-util/e-config.c | 2 +- e-util/e-dialog-utils.c | 2 +- e-util/e-error.c | 2 +- e-util/e-event.c | 2 +- e-util/e-i18n.h | 74 ----------------------------------------- e-util/e-import.c | 2 +- e-util/e-menu.c | 2 +- e-util/e-popup.c | 2 +- e-util/e-text-event-processor.c | 3 +- e-util/e-util.c | 15 --------- e-util/e-xml-utils.c | 8 +++-- 14 files changed, 29 insertions(+), 101 deletions(-) delete mode 100644 e-util/e-i18n.h (limited to 'e-util') 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 + + ** Fixes part of bug #419524 + + * Include instead of . + + * 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 * 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 #include -#include +#include #include #include #include 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 -#include +#include #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 #include -#include +#include #include #include 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 #include #include -#include +#include #include #include 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 -#include +#include #include #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 - * - * 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 - -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 -#include +#include #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 -#include +#include #include #include 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 -#include +#include #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 -#include "e-i18n.h" +#include + #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 -#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 #include -#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, -- cgit v1.2.3