X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fui%2Fgui%2Fpsppire.c;h=0467746333c07960ecef3ae8d984c9182c5109ce;hb=015e221b0f8578afee769528572c76387f26c629;hp=ff155d68fe71cc66e97dff9572a06435adae7045;hpb=d96e59d1c5f17bd3b4b3b757640851731fde3c78;p=pspp diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index ff155d68fe..0467746333 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -16,8 +16,11 @@ #include +#include #include #include +#include +#include #include "relocatable.h" @@ -28,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -44,8 +46,6 @@ #include "psppire-var-store.h" #include "psppire-data-store.h" #include "helper.h" -#include "data-sheet.h" -#include "var-sheet.h" #include "message-dialog.h" #include "output-viewer.h" @@ -67,6 +67,10 @@ replace_casereader (struct casereader *s) psppire_data_store_set_case_file (the_data_store, pcf); } +#define _(msgid) gettext (msgid) +#define N_(msgid) msgid + + void initialize (void) { @@ -78,14 +82,13 @@ initialize (void) bindtextdomain (PACKAGE, locale_dir); - textdomain (PACKAGE); glade_init (); - fmt_init (); + gsl_set_error_handler_off (); fn_init (); outp_init (); - settings_init (); + settings_init (&viewer_width, &viewer_length); fh_init (); the_source_stream = create_source_stream ( @@ -111,13 +114,17 @@ initialize (void) outp_configure_driver_line ( ss_cstr ("gui:ascii:screen:squeeze=on headers=off top-margin=0 " - "bottom-margin=0 paginate=off length=50 " - "width=" OUTPUT_LINE_WIDTH_str " emphasis=none " + "bottom-margin=0 paginate=off length=auto width=auto " + "emphasis=none " "output-file=\"" OUTPUT_FILE_NAME "\" append=yes")); unlink (OUTPUT_FILE_NAME); journal_enable (); + textdomain (PACKAGE); + + /* Ignore alarm clock signals */ + signal (SIGALRM, SIG_IGN); new_data_window (NULL, NULL); } @@ -133,6 +140,7 @@ de_initialize (void) } + struct icon_info { const char *file_name; @@ -182,6 +190,26 @@ create_icon_factory (void) } } + { + /* Create our own "pspp-stock-reset" item, using the + GTK_STOCK_REFRESH icon set */ + + GtkStockItem items[] = { + {"pspp-stock-reset", N_("_Reset"), 0, 0, PACKAGE}, + {"pspp-stock-select", N_("_Select"), 0, 0, PACKAGE} + }; + + + gtk_stock_add (items, 2); + gtk_icon_factory_add (factory, "pspp-stock-reset", + gtk_icon_factory_lookup_default (GTK_STOCK_REFRESH) + ); + + gtk_icon_factory_add (factory, "pspp-stock-select", + gtk_icon_factory_lookup_default (GTK_STOCK_INDEX) + ); + } + gtk_icon_factory_add_default (factory); }