]> git.sur5r.net Git - glabels/blobdiff - src/glabels-batch.c
Removed laste vestiges of windowing system or dbus dependencies from glabels-batch.
[glabels] / src / glabels-batch.c
index 78f7f072aed43d30b984ccdaeb70cf0c360eab86..64dbb0caf69dc216d0b077cbb8cdff56df60f030 100644 (file)
 
 #include <math.h>
 
-#include <libglabels/libglabels.h>
+#include <libglabels.h>
 #include "merge-init.h"
+#include "template-history.h"
+#include "font-history.h"
 #include "xml-label.h"
 #include "print.h"
 #include "print-op.h"
@@ -88,7 +90,7 @@ main (int argc, char **argv)
        gchar             *utf8_filename;
         GError            *error = NULL;
 
-        bindtextdomain (GETTEXT_PACKAGE, GLABELS_LOCALEDIR);
+        bindtextdomain (GETTEXT_PACKAGE, GLABELS_LOCALE_DIR);
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
         textdomain (GETTEXT_PACKAGE);
 
@@ -98,8 +100,8 @@ main (int argc, char **argv)
        g_option_context_add_main_entries (option_context, option_entries, GETTEXT_PACKAGE);
 
 
-        /* Initialize minimal gnome program */
-        gtk_init (&argc, &argv);
+        /* Initialize minimal gtk program */
+        gtk_parse_args (&argc, &argv);
         if (!g_option_context_parse (option_context, &argc, &argv, &error))
        {
                g_print(_("%s\nRun '%s --help' to see a full list of available command line options.\n"),
@@ -127,7 +129,9 @@ main (int argc, char **argv)
         gl_debug_init ();
         gl_merge_init ();
         lgl_db_init ();
-       gl_prefs_init ();
+        gl_prefs_init_null ();
+       gl_template_history_init_null ();
+       gl_font_history_init_null ();
 
         /* now print the files */
         for (p = file_list; p; p = p->next) {
@@ -141,7 +145,7 @@ main (int argc, char **argv)
                         if (input != NULL) {
                                 if (merge != NULL) {
                                         gl_merge_set_src(merge, input);
-                                        gl_label_set_merge(label, merge);
+                                        gl_label_set_merge(label, merge, FALSE);
                                 } else {
                                         fprintf ( stderr,
                                                   _("cannot perform document merge with glabels file %s\n"),