#include <assert.h>
#include <libintl.h>
+#include "progname.h"
+#include "relocatable.h"
#include "data-editor.h"
+
#include <libpspp/version.h>
#include <libpspp/copyleft.h>
#include <data/file-handle-def.h>
struct casefile_factory *factory;
PsppireDict *dictionary = 0;
-
gchar *filename=0;
GError *err = 0;
gchar *vers;
- gtk_init (&argc, &argv);
+ set_program_name (argv[0]);
+
+ if ( ! gtk_parse_args (&argc, &argv) )
+ {
+ perror ("Error parsing arguments");
+ exit (1);
+ }
+
if ( (vers = gtk_check_version (GTK_MAJOR_VERSION,
GTK_MINOR_VERSION,
GTK_MICRO_VERSION)) )
bind_textdomain_codeset (PACKAGE, "UTF-8");
+ gdk_init (&argc, &argv);
+
/* Create the model for the var_sheet */
the_var_store = psppire_var_store_new (dictionary);
return true;
}
+#define PIXBUF_NEW_FROM_FILE(FILE) \
+ gdk_pixbuf_new_from_file (relocate (PKGDATADIR "/" FILE), 0)
void
GdkPixbuf *pixbuf;
- pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/value-labels.png", 0);
+ pixbuf = PIXBUF_NEW_FROM_FILE ("value-labels.png");
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
gtk_icon_factory_add ( factory, "pspp-value-labels", icon_set);
- pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/weight-cases.png", 0);
+ pixbuf = PIXBUF_NEW_FROM_FILE ("weight-cases.png");
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
gtk_icon_factory_add ( factory, "pspp-weight-cases", icon_set);
- pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/goto-variable.png", 0);
+ pixbuf = PIXBUF_NEW_FROM_FILE ("goto-variable.png");
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
gtk_icon_factory_add ( factory, "pspp-goto-variable", icon_set);
- pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/insert-variable.png", 0);
+ pixbuf = PIXBUF_NEW_FROM_FILE ("insert-variable.png");
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
gtk_icon_factory_add ( factory, "pspp-insert-variable", icon_set);
- pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/insert-case.png", 0);
+ pixbuf = PIXBUF_NEW_FROM_FILE ("insert-case.png");
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
gtk_icon_factory_add ( factory, "pspp-insert-case", icon_set);
- pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/split-file.png", 0);
+ pixbuf = PIXBUF_NEW_FROM_FILE ("split-file.png");
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
gtk_icon_factory_add ( factory, "pspp-split-file", icon_set);
- pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/select-cases.png", 0);
+ pixbuf = PIXBUF_NEW_FROM_FILE ("select-cases.png");
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
gtk_icon_factory_add ( factory, "pspp-select-cases", icon_set);
- gtk_icon_factory_add_default (factory);
-}
+ pixbuf = PIXBUF_NEW_FROM_FILE ("recent-dialogs.png");
+ icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
+ g_object_unref (pixbuf);
+ gtk_icon_factory_add ( factory, "pspp-recent-dialogs", icon_set);
+ gtk_icon_factory_add_default (factory);
+}
+