projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed the refresh button on the dialogs.
[pspp-builds.git]
/
src
/
ui
/
gui
/
psppire.c
diff --git
a/src/ui/gui/psppire.c
b/src/ui/gui/psppire.c
index b99f2896074217beed1fc3672dd0cd0a4338019f..f6bf1de36cdd7346360d69bd8315228b977125e5 100644
(file)
--- a/
src/ui/gui/psppire.c
+++ b/
src/ui/gui/psppire.c
@@
-22,8
+22,11
@@
#include <assert.h>
#include <libintl.h>
#include <assert.h>
#include <libintl.h>
+#include "progname.h"
+#include "relocatable.h"
#include "data-editor.h"
#include "data-editor.h"
+
#include <libpspp/version.h>
#include <libpspp/copyleft.h>
#include <data/file-handle-def.h>
#include <libpspp/version.h>
#include <libpspp/copyleft.h>
#include <data/file-handle-def.h>
@@
-96,12
+99,18
@@
main (int argc, char *argv[])
struct casefile_factory *factory;
PsppireDict *dictionary = 0;
struct casefile_factory *factory;
PsppireDict *dictionary = 0;
-
gchar *filename=0;
GError *err = 0;
gchar *vers;
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)) )
if ( (vers = gtk_check_version (GTK_MAJOR_VERSION,
GTK_MINOR_VERSION,
GTK_MICRO_VERSION)) )
@@
-146,6
+155,8
@@
main (int argc, char *argv[])
bind_textdomain_codeset (PACKAGE, "UTF-8");
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);
/* Create the model for the var_sheet */
the_var_store = psppire_var_store_new (dictionary);
@@
-216,6
+227,8
@@
parse_command_line (int *argc, char ***argv, gchar **filename, GError **err)
return true;
}
return true;
}
+#define PIXBUF_NEW_FROM_FILE(FILE) \
+ gdk_pixbuf_new_from_file (relocate (PKGDATADIR "/" FILE), 0)
void
void
@@
-227,43
+240,48
@@
create_icon_factory (void)
GdkPixbuf *pixbuf;
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);
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);
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);
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);
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);
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);
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);
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);
+}
+