Merge commit 'origin/stable'
[pspp-builds.git] / src / ui / gui / main.c
index bab489a5aad88b13072822e4b113df887b8094a4..f68f2ad66a24ab3b4a1f774594de76c783dc895a 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+#include <config.h>
 #include <gtk/gtk.h>
 #include "psppire.h"
 #include "progname.h"
 #include <stdlib.h>
 #include <getopt.h>
+#include <gl/relocatable.h>
 
 #include <libpspp/version.h>
 #include <libpspp/copyleft.h>
@@ -44,7 +46,7 @@ create_splash_window (void)
   gtk_window_set_type_hint (GTK_WINDOW (splash),
                            GDK_WINDOW_TYPE_HINT_SPLASHSCREEN);
 
-  image = gtk_image_new_from_file (PKGDATADIR "/splash.png");
+  image = gtk_image_new_from_file (relocate (PKGDATADIR "/splash.png"));
 
   gtk_container_add (GTK_CONTAINER (splash), image);
 
@@ -57,7 +59,7 @@ static gboolean
 hide_splash_window (gpointer data)
 {
   GtkWidget *splash = data;
-  gtk_widget_hide (splash);
+  gtk_widget_destroy (splash);
   gtk_window_set_auto_startup_notification (TRUE);
   return FALSE;
 }
@@ -94,7 +96,7 @@ main (int argc, char *argv[])
   gchar *filename = 0;
   gboolean show_splash = TRUE;
   GError *err = 0;
-  gchar *vers;
+  const gchar *vers;
 
   set_program_name (argv[0]);
 
@@ -108,7 +110,7 @@ main (int argc, char *argv[])
                                 GTK_MINOR_VERSION,
                                 GTK_MICRO_VERSION)) )
     {
-      g_critical (vers);
+      g_warning (vers);
     }
 
   /* Deal with options like --version, --help etc */