Move around headers and localization code

This commit is contained in:
Christian Dywan 2008-08-15 02:03:55 +02:00
parent 8dbd06ce47
commit 8ac30357c0
4 changed files with 18 additions and 19 deletions

View file

@ -384,7 +384,7 @@ gjs_value_get_elements_by_tag_name (GjsValue* value,
gchar* script; gchar* script;
GjsValue* elements; 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); g_return_val_if_fail (name, NULL);
script = g_strdup_printf ("return this.getElementsByTagName ('%s');", name); script = g_strdup_printf ("return this.getElementsByTagName ('%s');", name);

View file

@ -9,6 +9,10 @@
See the file COPYING for the full license text. See the file COPYING for the full license text.
*/ */
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include "main.h" #include "main.h"
#include "sokoke.h" #include "sokoke.h"
@ -21,10 +25,6 @@
#include <string.h> #include <string.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#if HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef ENABLE_NLS #ifdef ENABLE_NLS
#include <libintl.h> #include <libintl.h>
#endif #endif
@ -81,16 +81,6 @@ stock_items_init (void)
g_object_unref (factory); 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* static MidoriWebSettings*
settings_new_from_file (const gchar* filename) settings_new_from_file (const gchar* filename)
{ {
@ -388,7 +378,11 @@ main (int argc,
gchar* homepage; gchar* homepage;
MidoriWebList* search_engines; 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")); g_set_application_name (_("Midori"));
/* Parse cli options */ /* Parse cli options */

View file

@ -10,12 +10,15 @@
See the file COPYING for the full license text. See the file COPYING for the full license text.
*/ */
#include "config.h" #if HAVE_CONFIG_H
#include <config.h>
#endif
#include "midori-addons.h" #include "midori-addons.h"
#include "sokoke.h" #include "sokoke.h"
#include "gjs.h" #include "gjs.h"
#include <webkit/webkit.h> #include <webkit/webkit.h>
#include <JavaScriptCore/JavaScript.h> #include <JavaScriptCore/JavaScript.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>

View file

@ -9,9 +9,11 @@
See the file COPYING for the full license text. See the file COPYING for the full license text.
*/ */
#include "sokoke.h" #if HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h" #include "sokoke.h"
#include "main.h" #include "main.h"
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H