From: Christian Dywan Date: Fri, 15 Aug 2008 00:03:55 +0000 (+0200) Subject: Move around headers and localization code X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ac30357c03d2d303aa9e96d8c3644c41338fce2;p=midori Move around headers and localization code --- diff --git a/midori/gjs.c b/midori/gjs.c index ca842655..b0ddd6f4 100644 --- a/midori/gjs.c +++ b/midori/gjs.c @@ -384,7 +384,7 @@ gjs_value_get_elements_by_tag_name (GjsValue* value, gchar* script; GjsValue* elements; - g_return_val_if_fail (gjs_value_is_valid (value), NULL); + g_return_val_if_fail (gjs_value_is_object (value), NULL); g_return_val_if_fail (name, NULL); script = g_strdup_printf ("return this.getElementsByTagName ('%s');", name); diff --git a/midori/main.c b/midori/main.c index f195b464..be6861f0 100644 --- a/midori/main.c +++ b/midori/main.c @@ -9,6 +9,10 @@ See the file COPYING for the full license text. */ +#if HAVE_CONFIG_H + #include +#endif + #include "main.h" #include "sokoke.h" @@ -21,10 +25,6 @@ #include #include -#if HAVE_CONFIG_H - #include "config.h" -#endif - #ifdef ENABLE_NLS #include #endif @@ -81,16 +81,6 @@ stock_items_init (void) g_object_unref (factory); } -static void -locale_init (void) -{ -#ifdef ENABLE_NLS - bindtextdomain (GETTEXT_PACKAGE, MIDORI_LOCALEDIR); - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - textdomain (GETTEXT_PACKAGE); -#endif -} - static MidoriWebSettings* settings_new_from_file (const gchar* filename) { @@ -388,7 +378,11 @@ main (int argc, gchar* homepage; MidoriWebList* search_engines; - locale_init (); + #ifdef ENABLE_NLS + bindtextdomain (GETTEXT_PACKAGE, MIDORI_LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + #endif g_set_application_name (_("Midori")); /* Parse cli options */ diff --git a/midori/midori-addons.c b/midori/midori-addons.c index d5d8aae0..bc7d8357 100644 --- a/midori/midori-addons.c +++ b/midori/midori-addons.c @@ -10,12 +10,15 @@ See the file COPYING for the full license text. */ -#include "config.h" +#if HAVE_CONFIG_H + #include +#endif #include "midori-addons.h" #include "sokoke.h" #include "gjs.h" + #include #include #include diff --git a/midori/sokoke.c b/midori/sokoke.c index 663a99e8..ccd99177 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -9,9 +9,11 @@ See the file COPYING for the full license text. */ -#include "sokoke.h" +#if HAVE_CONFIG_H + #include +#endif -#include "config.h" +#include "sokoke.h" #include "main.h" #ifdef HAVE_UNISTD_H