+ GtkWidget *sp = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ const gchar *filename = PKGDATADIR "/splash.png";
+ const char *relocated_filename = relocate (filename);
+ GtkWidget *l = gtk_image_new_from_file (relocated_filename);
+ if (filename != relocated_filename)
+ free (CONST_CAST (char *, relocated_filename));
+
+ gtk_container_add (GTK_CONTAINER (sp), l);
+ gtk_window_set_type_hint (GTK_WINDOW (sp),
+ GDK_WINDOW_TYPE_HINT_SPLASHSCREEN);
+ gtk_window_set_position (GTK_WINDOW (sp), GTK_WIN_POS_CENTER);
+ gtk_window_set_skip_pager_hint (GTK_WINDOW (sp), TRUE);
+ gtk_window_set_skip_taskbar_hint (GTK_WINDOW (sp), TRUE);
+ gtk_window_set_focus_on_map (GTK_WINDOW (sp), FALSE);
+ gtk_window_set_accept_focus (GTK_WINDOW (sp), FALSE);
+
+ GdkGeometry hints;
+ hints.max_height = 100;
+ hints.max_width = 200;
+ gtk_window_set_geometry_hints (GTK_WINDOW (sp),
+ NULL, &hints, GDK_HINT_MAX_SIZE);
+
+
+ gtk_window_set_gravity (GTK_WINDOW (sp), GDK_GRAVITY_CENTER);
+
+ gtk_window_set_modal (GTK_WINDOW (sp), TRUE);
+ gtk_window_set_decorated (GTK_WINDOW (sp), FALSE);
+ gtk_window_set_keep_above (GTK_WINDOW (sp), TRUE);
+ gtk_widget_show_all (sp);
+ return sp;
+}
+
+
+static gint
+on_local_options (GApplication * application,
+ GVariantDict * options, gpointer user_data)
+{
+ {
+ GVariant *b =
+ g_variant_dict_lookup_value (options, "no-unique",
+ G_VARIANT_TYPE_BOOLEAN);
+ if (b)
+ {
+ GApplicationFlags flags = g_application_get_flags (application);
+ flags |= G_APPLICATION_NON_UNIQUE;
+ g_application_set_flags (application, flags);
+ g_variant_unref (b);
+ }
+ }
+ {
+ GVariant *b =
+ g_variant_dict_lookup_value (options, "no-splash",
+ G_VARIANT_TYPE_BOOLEAN);
+ if (b)
+ g_variant_unref (b);
+ else
+ start_time = g_get_monotonic_time ();
+ }
+
+
+ return -1;
+}
+
+/* Use the imperitive mood for all entries in this table.
+ Each entry should end with a period. */
+static const char *tips[] =
+ {
+#ifdef _WIN32
+ N_("PSPP runs best on free platforms such as GNU and GNU/Linux. Windows is a non-free system. As such, certain features might work sub-optimally. For best results use a free system instead."),
+#endif
+ N_("Right click on variable lists to change between viewing the variables' names and their labels."),
+ N_("Click \"Paste\" instead of \"OK\" when running procedures. This allows you to edit your commands before running them and you have better control over your work."),
+ N_("Directly import your spreadsheets using the \"File | Import Data\" menu."),
+ N_("For an easy way to convert string variables into numerically encoded variables, use \"Automatic Recode\" which preserves the variable names as labels."),
+ N_("When browsing large data sets, use \"Windows | Split\" to see both ends of the data in the same view."),
+ N_("Export your reports to ODT format for easy editing with the Libreoffice.org suite."),
+ N_("Use \"Edit | Options\" to have your Output window automatically appear when statistics are generated."),
+ N_("To easily reorder your variables, drag and drop them in the Variable View or the Data View.")
+ };
+
+#define N_TIPS (sizeof tips / sizeof tips[0])
+
+static void
+user_tip (GApplication *app)
+{
+ PsppireConf *conf = psppire_conf_new ();
+
+ gboolean show_tip = TRUE;
+ psppire_conf_get_boolean (conf, "startup", "show-user-tips", &show_tip);