]> spindle.queued.net Git - midori/commitdiff
Move around headers and localization code
authorChristian Dywan <christian@twotoasts.de>
Fri, 15 Aug 2008 00:03:55 +0000 (02:03 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 15 Aug 2008 00:03:55 +0000 (02:03 +0200)
midori/gjs.c
midori/main.c
midori/midori-addons.c
midori/sokoke.c

index ca8426557d12681bd7bdc691014bb5a2ea343442..b0ddd6f436152a82f320aeb082e624e65b10107e 100644 (file)
@@ -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);
index f195b464b384d26177170d23277a4f855f8692d8..be6861f05db040992bf8c20a180ded5b186ad6c1 100644 (file)
@@ -9,6 +9,10 @@
  See the file COPYING for the full license text.
 */
 
+#if HAVE_CONFIG_H
+    #include <config.h>
+#endif
+
 #include "main.h"
 
 #include "sokoke.h"
 #include <string.h>
 #include <gtk/gtk.h>
 
-#if HAVE_CONFIG_H
-    #include "config.h"
-#endif
-
 #ifdef ENABLE_NLS
     #include <libintl.h>
 #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 */
index d5d8aae06ea83335cb2ec55f91a4cbd90bf7cfa0..bc7d835716ecd4ffd7e971579dde80e86edd21c6 100644 (file)
  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 "sokoke.h"
 #include "gjs.h"
+
 #include <webkit/webkit.h>
 #include <JavaScriptCore/JavaScript.h>
 #include <glib/gi18n.h>
index 663a99e8017d84f9922cd8bce7032068db481f52..ccd99177dc3830029baac9b24c418f008d35938e 100644 (file)
@@ -9,9 +9,11 @@
  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"
 
 #ifdef HAVE_UNISTD_H