X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire.c;h=d18788150fbb97eb5f66edac01ffebe1efade87d;hb=ad024edf80de3f4d8c720eb3e9af80d3cd8a18f3;hp=665ec8254c75d59067ba6b86b43e3038cc9978e2;hpb=f19d8882cd0ecbf7811c73c2a3cf9ffe422d39d5;p=pspp-builds.git diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index 665ec825..d1878815 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -1,22 +1,22 @@ /* - PSPPIRE --- A Graphical User Interface for PSPP - Copyright (C) 2004, 2005 Free Software Foundation - Written by John Darrington + PSPPIRE --- A Graphical User Interface for PSPP + Copyright (C) 2004, 2005, 2006 Free Software Foundation + Written by John Darrington - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ /* * Initial main.c file generated by Glade. Edit as required. @@ -73,18 +73,14 @@ main(int argc, char *argv[]) data_store = psppire_data_store_new(the_dictionary, the_cases); - /* load the interface */ - xml = glade_xml_new("psppire.glade", NULL, NULL); + xml = glade_xml_new(PKGDATADIR "/psppire.glade", NULL, NULL); - if ( !xml ) - { - g_print("Is psppire.glade in current directory?\n"); - return 1; - } + if ( !xml ) return 1; GtkWidget *data_editor = get_widget_assert(xml, "data_editor"); - gtk_window_set_icon_from_file(GTK_WINDOW(data_editor), "psppicon.png",0); + gtk_window_set_icon_from_file(GTK_WINDOW(data_editor), + PKGDATADIR "/psppicon.png",0); /* connect the signals in the interface */ glade_xml_signal_autoconnect(xml); @@ -112,11 +108,11 @@ static bool parse_command_line (int *argc, char ***argv) { static struct option long_options[] = - { - {"help", no_argument, NULL, 'h'}, - {"version", no_argument, NULL, 'V'}, - {0, 0, 0, 0}, - }; + { + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'V'}, + {0, 0, 0, 0}, + }; int c; @@ -129,11 +125,12 @@ parse_command_line (int *argc, char ***argv) switch (c) { case 'h': - puts("Usage: ./psppire\nMust be run from the directory containing psppire.glade"); + g_print("Usage: psppire {|--help|--version}\n"); return false; case 'V': - puts (version); - puts (legal); + g_print(version); + g_print("\n"); + g_print(legal); return false; default: assert (0);