From 6fca007244bd4a7c917f2dc3a6bab87a2ad7461a Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Mon, 24 Aug 2020 12:48:33 +0200 Subject: [PATCH] Added tooltip for statistics in dialogs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This removed the warning: warning: missing initializer for field ‘tooltip’ --- src/ui/gui/psppire-dialog-action-crosstabs.c | 70 ++++++++++--------- .../gui/psppire-dialog-action-descriptives.c | 28 ++++---- .../gui/psppire-dialog-action-frequencies.c | 2 +- 3 files changed, 51 insertions(+), 49 deletions(-) diff --git a/src/ui/gui/psppire-dialog-action-crosstabs.c b/src/ui/gui/psppire-dialog-action-crosstabs.c index 6fc41de0d4..79de22534a 100644 --- a/src/ui/gui/psppire-dialog-action-crosstabs.c +++ b/src/ui/gui/psppire-dialog-action-crosstabs.c @@ -67,37 +67,39 @@ refresh (PsppireDialogAction *rd_) gtk_list_store_clear (GTK_LIST_STORE (liststore)); } -#define CROSSTABS_STATS \ - CS (CHISQ, N_("Chisq")) \ - CS (PHI, N_("Phi")) \ - CS (CC, N_("CC")) \ - CS (LAMBDA, N_("Lambda")) \ - CS (UC, N_("UC")) \ - CS (BTAU, N_("BTau")) \ - CS (CTAU, N_("CTau")) \ - CS (RISK, N_("Risk")) \ - CS (GAMMA, N_("Gamma")) \ - CS (D, N_("D")) \ - CS (KAPPA, N_("Kappa")) \ - CS (ETA, N_("Eta")) \ - CS (CORR, N_("Corr")) \ - CS (STATS_NONE, N_("None")) - - -#define CROSSTABS_CELLS \ - CS (COUNT, N_("Count")) \ - CS (ROW, N_("Row")) \ - CS (COLUMN, N_("Column")) \ - CS (TOTAL, N_("Total")) \ - CS (EXPECTED, N_("Expected")) \ - CS (RESIDUAL, N_("Residual")) \ - CS (SRESIDUAL, N_("Std. Residual")) \ - CS (ASRESIDUAL, N_("Adjusted Std. Residual")) \ - CS (CELLS_NONE, N_("None")) +#define CROSSTABS_STATS \ + CS (CHISQ, N_("Chisq"), N_("Pearson chi-square, " \ + "likelihood ratio, Fisher’s exact test, continuity correction, " \ + "linear-by-linear association.")) \ + CS (PHI, N_("Phi"), NULL) \ + CS (CC, N_("CC"), N_("Contingency coefficient")) \ + CS (LAMBDA, N_("Lambda"), NULL) \ + CS (UC, N_("UC"), N_("Uncertainty coefficient")) \ + CS (BTAU, N_("BTau"), N_("Kendall's Tau-b")) \ + CS (CTAU, N_("CTau"), N_("Kendall's Tau-c")) \ + CS (RISK, N_("Risk"), N_("Relative Risk estimate")) \ + CS (GAMMA, N_("Gamma"), NULL) \ + CS (D, N_("D"), N_("Somer's d")) \ + CS (KAPPA, N_("Kappa"), N_("Cohen's Kappa")) \ + CS (ETA, N_("Eta"), NULL) \ + CS (CORR, N_("Corr"), N_("Spearman correlation, Pearson's r")) \ + CS (STATS_NONE, N_("None"), NULL) + + +#define CROSSTABS_CELLS \ + CS (COUNT, N_("Count"), N_("Frequency Count")) \ + CS (ROW, N_("Row"), N_("Row percent")) \ + CS (COLUMN, N_("Column"), N_("Column percent")) \ + CS (TOTAL, N_("Total"), N_("Total percent")) \ + CS (EXPECTED, N_("Expected"), N_("Expected value")) \ + CS (RESIDUAL, N_("Residual"), NULL) \ + CS (SRESIDUAL, N_("Std. Residual"), N_("Standardized Residual")) \ + CS (ASRESIDUAL, N_("Adjusted Std. Residual"), NULL) \ + CS (CELLS_NONE, N_("None"), NULL) enum { -#define CS(NAME, LABEL) CS_##NAME, +#define CS(NAME, LABEL, TOOLTIP) CS_##NAME, CROSSTABS_STATS #undef CS N_CROSSTABS_STATS @@ -105,7 +107,7 @@ enum enum { -#define CS(NAME, LABEL) CS_##NAME, +#define CS(NAME, LABEL, TOOLTIP) CS_##NAME, CROSSTABS_CELLS #undef CS N_CROSSTABS_CELLS @@ -113,7 +115,7 @@ enum enum { -#define CS(NAME, LABEL) B_CS_##NAME = 1u << CS_##NAME, +#define CS(NAME, LABEL, TOOLTIP) B_CS_##NAME = 1u << CS_##NAME, CROSSTABS_STATS CROSSTABS_CELLS #undef CS @@ -126,17 +128,17 @@ enum static const struct checkbox_entry_item stats[] = { -#define CS(NAME, LABEL) {#NAME, LABEL}, +#define CS(NAME, LABEL, TOOLTIP) {#NAME, LABEL, TOOLTIP}, CROSSTABS_STATS \ - CS(NONE, N_("None")) + CS(NONE, N_("None"), NULL) #undef CS }; static const struct checkbox_entry_item cells[] = { -#define CS(NAME, LABEL) {#NAME, LABEL}, +#define CS(NAME, LABEL, TOOLTIP) {#NAME, LABEL, TOOLTIP}, CROSSTABS_CELLS \ - CS(NONE, N_("None")) + CS(NONE, N_("None"), NULL) #undef CS }; diff --git a/src/ui/gui/psppire-dialog-action-descriptives.c b/src/ui/gui/psppire-dialog-action-descriptives.c index ea899dd21e..a2a554a471 100644 --- a/src/ui/gui/psppire-dialog-action-descriptives.c +++ b/src/ui/gui/psppire-dialog-action-descriptives.c @@ -35,21 +35,21 @@ static void psppire_dialog_action_descriptives_class_init (PsppireDialogAct G_DEFINE_TYPE (PsppireDialogActionDescriptives, psppire_dialog_action_descriptives, PSPPIRE_TYPE_DIALOG_ACTION); -#define DESCRIPTIVE_STATS \ - DS (MEAN, N_("Mean")) \ - DS (STDDEV, N_("Standard deviation")) \ - DS (MINIMUM, N_("Minimum")) \ - DS (MAXIMUM, N_("Maximum")) \ - DS (RANGE, N_("Range")) \ - DS (SUM, N_("Sum")) \ - DS (SEMEAN, N_("Standard error")) \ - DS (VARIANCE, N_("Variance")) \ - DS (KURTOSIS, N_("Kurtosis")) \ - DS (SKEWNESS, N_("Skewness")) +#define DESCRIPTIVE_STATS \ + DS (MEAN, N_("Mean"), NULL) \ + DS (STDDEV, N_("Standard deviation"), NULL) \ + DS (MINIMUM, N_("Minimum"), N_("Minimum value")) \ + DS (MAXIMUM, N_("Maximum"), N_("Maximum value")) \ + DS (RANGE, N_("Range"), NULL) \ + DS (SUM, N_("Sum"), NULL) \ + DS (SEMEAN, N_("Standard error"), N_("Standard error of mean")) \ + DS (VARIANCE, N_("Variance"), NULL) \ + DS (KURTOSIS, N_("Kurtosis"), N_("Kurtosis and standard error of kurtosis")) \ + DS (SKEWNESS, N_("Skewness"), N_("Skewness and standard error of skewness")) enum { -#define DS(NAME, LABEL) DS_##NAME, +#define DS(NAME, LABEL, TOOLTIP) DS_##NAME, DESCRIPTIVE_STATS #undef DS N_DESCRIPTIVE_STATS @@ -57,7 +57,7 @@ enum enum { -#define DS(NAME, LABEL) B_DS_##NAME = 1u << DS_##NAME, +#define DS(NAME, LABEL, TOOLTIP) B_DS_##NAME = 1u << DS_##NAME, DESCRIPTIVE_STATS #undef DS B_DS_ALL = (1u << N_DESCRIPTIVE_STATS) - 1, @@ -67,7 +67,7 @@ enum static const struct checkbox_entry_item stats[] = { -#define DS(NAME, LABEL) {#NAME, LABEL}, +#define DS(NAME, LABEL, TOOLTIP) {#NAME, LABEL, TOOLTIP}, DESCRIPTIVE_STATS #undef DS }; diff --git a/src/ui/gui/psppire-dialog-action-frequencies.c b/src/ui/gui/psppire-dialog-action-frequencies.c index 70726bec13..714745ca26 100644 --- a/src/ui/gui/psppire-dialog-action-frequencies.c +++ b/src/ui/gui/psppire-dialog-action-frequencies.c @@ -73,7 +73,7 @@ enum static const struct checkbox_entry_item stats[] = { -#define FS(NAME, LABEL) {#NAME, LABEL}, +#define FS(NAME, LABEL) {#NAME, LABEL, NULL}, FREQUENCY_STATS #undef FS }; -- 2.30.2