[Patch Preview] move module-init and locale setup from scm to C

Christian Stimming stimming at tuhh.de
Wed Jan 11 04:51:15 EST 2006


Hi,

is it just me or is this patch missing a setlocale(LC_ALL, ""); call, 
especially since that one will be commented out from main.acm? Apart 
from that it looks fine to me. I don't think ordering does matter there.

Christian

That would be a gnucash-bin.c as follows

Index: src/bin/gnucash-bin.c
===================================================================
--- src/bin/gnucash-bin.c.orig
+++ src/bin/gnucash-bin.c
(...)
@@ -38,6 +40,17 @@ inner_main (void *closure, int argc, cha

  int main(int argc, char ** argv)
  {
+
+    /* Does order matter here? */
+#ifdef HAVE_GETTEXT
+    setlocale(LC_ALL, "");
+    bindtextdomain (TEXT_DOMAIN, LOCALE_DIR);
+    textdomain (TEXT_DOMAIN);
+    bind_textdomain_codeset (TEXT_DOMAIN, "UTF-8");
+#endif
+
+    gtk_init (&argc, &argv);
+    gnc_module_system_init();
+
      scm_boot_guile(argc, argv, inner_main, 0);
      exit(0); /* never reached */
  }


More information about the gnucash-devel mailing list