From: John Darrington Date: Sat, 11 Sep 2021 05:39:29 +0000 (+0200) Subject: Options dialog: add checkbox for startup tips X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=39e99af63f3280cd2d2d822eb2734371278de9df Options dialog: add checkbox for startup tips --- diff --git a/src/ui/gui/options-dialog.c b/src/ui/gui/options-dialog.c index c500480602..1890f069f4 100644 --- a/src/ui/gui/options-dialog.c +++ b/src/ui/gui/options-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2017 Free Software Foundation + Copyright (C) 2017, 2021 Free Software Foundation 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 @@ -45,6 +45,8 @@ struct options_dialog GtkWidget *maximize; GtkWidget *alert; GtkWidget *raise; + + GtkWidget *show_tips; }; GType @@ -75,11 +77,14 @@ options_dialog (PsppireDataWindow *de) GtkWidget *dialog ; gboolean disp_labels = true; + gboolean show_tips = true; fd.xml = builder_new ("options.ui"); dialog = get_widget_assert (fd.xml, "options-dialog"); + fd.show_tips = get_widget_assert (fd.xml, "checkbutton-show-tips"); + fd.show_labels = get_widget_assert (fd.xml, "radiobutton-labels"); fd.show_names = get_widget_assert (fd.xml, "radiobutton-names"); @@ -105,6 +110,13 @@ options_dialog (PsppireDataWindow *de) !disp_labels); } + if (psppire_conf_get_boolean (fd.conf, + "startup", "show-user-tips", &show_tips)) + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd.show_tips), + show_tips); + } + int what = -1; psppire_conf_get_enum (fd.conf, "VariableLists", "sort-order", @@ -182,6 +194,10 @@ options_dialog (PsppireDataWindow *de) psppire_conf_set_boolean (fd.conf, "OutputWindowAction", "alert", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd.alert))); + + psppire_conf_set_boolean (fd.conf, "startup", "show-user-tips", + gtk_toggle_button_get_active + (GTK_TOGGLE_BUTTON (fd.show_tips))); } g_object_unref (fd.xml); diff --git a/src/ui/gui/options.ui b/src/ui/gui/options.ui index 746926ff87..2d087c79fb 100644 --- a/src/ui/gui/options.ui +++ b/src/ui/gui/options.ui @@ -1,63 +1,59 @@ + - - + - - - - - False + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Options Case True True - False + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - 5 + 5 + 5 5 True - False - 0 - in + False + 0 + in True - False + False vertical True - False + False vertical 5 - start + start Display _Labels True - True - False - True - True + True + False + True + True radiobutton-names @@ -70,11 +66,11 @@ Display _Names True - True - False - True + True + False + True True - True + True True @@ -82,26 +78,25 @@ 1 - + - True - False + True + False - False - False - 2 + False + False + 2 - Sort by L_abel True - True - False - True - True + True + False + True + True radiobutton-sort-by-name @@ -114,11 +109,11 @@ Sort by Na_me True - True - False - True + True + False + True True - True + True True @@ -130,11 +125,11 @@ Do not S_ort True - True - False - True + True + False + True True - True + True radiobutton-sort-by-name @@ -155,7 +150,7 @@ True - False + False Variable Lists @@ -166,95 +161,143 @@ 0 - - + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + vertical + PSPPIRE_BUTTON_OK_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK + + + False + False + end + 1 + + + + True - False - 0 - in + False + vertical - + True - False - vertical - spread + False + 0 + in - - Ma_ximize + True - True - False - True - True + False + vertical + spread + + + Ma_ximize + True + True + False + True + True + + + True + True + 0 + + + + + _Raise + True + True + False + True + True + + + True + True + 1 + + + + + Aler_t + True + True + False + True + True + + + True + True + 2 + + - - True - True - 0 - - - - _Raise + + True - True - False - True - True + False + Output Window Action - - True - True - 1 - + + + True + True + 0 + + + + + True + False + 0 - - Aler_t + True - True - False - True - True + False + 12 + + + Show Tips + True + True + False + True + + + + + + + True + False + Startup Options - - True - True - 2 - - - - - True - False - Output Window Action - + + False + True + 1 + - - - - - vertical - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - PSPPIRE_BUTTON_OK_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK - - False - False - end - 1 + True + True + 2 - -