From ed208cf009043f0bf319a4e919c279d5b1401f36 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Fri, 11 Dec 2015 08:18:20 +0100 Subject: [PATCH] Rename psppire_dialog_action_get_pointer -> psppire_dialog_action_get_hash_table Also add a comment explaining what it is for. --- src/ui/gui/psppire-dialog-action-1sks.c | 2 +- src/ui/gui/psppire-dialog-action-barchart.c | 2 +- src/ui/gui/psppire-dialog-action-binomial.c | 2 +- src/ui/gui/psppire-dialog-action-chisquare.c | 2 +- src/ui/gui/psppire-dialog-action-compute.c | 2 +- .../gui/psppire-dialog-action-correlation.c | 2 +- src/ui/gui/psppire-dialog-action-count.c | 2 +- src/ui/gui/psppire-dialog-action-crosstabs.c | 2 +- .../gui/psppire-dialog-action-descriptives.c | 2 +- src/ui/gui/psppire-dialog-action-examine.c | 2 +- src/ui/gui/psppire-dialog-action-factor.c | 2 +- src/ui/gui/psppire-dialog-action-flip.c | 2 +- .../gui/psppire-dialog-action-frequencies.c | 2 +- src/ui/gui/psppire-dialog-action-histogram.c | 2 +- .../gui/psppire-dialog-action-indep-samps.c | 2 +- src/ui/gui/psppire-dialog-action-k-related.c | 2 +- src/ui/gui/psppire-dialog-action-kmeans.c | 2 +- src/ui/gui/psppire-dialog-action-logistic.c | 2 +- src/ui/gui/psppire-dialog-action-means.c | 2 +- src/ui/gui/psppire-dialog-action-oneway.c | 2 +- src/ui/gui/psppire-dialog-action-paired.c | 2 +- src/ui/gui/psppire-dialog-action-rank.c | 2 +- src/ui/gui/psppire-dialog-action-regression.c | 2 +- .../gui/psppire-dialog-action-reliability.c | 2 +- src/ui/gui/psppire-dialog-action-roc.c | 2 +- src/ui/gui/psppire-dialog-action-runs.c | 2 +- .../gui/psppire-dialog-action-scatterplot.c | 2 +- src/ui/gui/psppire-dialog-action-sort.c | 2 +- src/ui/gui/psppire-dialog-action-tt1s.c | 2 +- src/ui/gui/psppire-dialog-action-two-sample.c | 2 +- src/ui/gui/psppire-dialog-action-univariate.c | 2 +- src/ui/gui/psppire-dialog-action-var-info.c | 2 +- src/ui/gui/psppire-dialog-action.c | 20 +++++++++++++------ src/ui/gui/psppire-dialog-action.h | 2 +- 34 files changed, 47 insertions(+), 39 deletions(-) diff --git a/src/ui/gui/psppire-dialog-action-1sks.c b/src/ui/gui/psppire-dialog-action-1sks.c index 0d25f3e7ce..fda5b4b479 100644 --- a/src/ui/gui/psppire-dialog-action-1sks.c +++ b/src/ui/gui/psppire-dialog-action-1sks.c @@ -122,7 +122,7 @@ psppire_dialog_action_1sks_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogAction1sks *act = PSPPIRE_DIALOG_ACTION_1SKS (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-barchart.c b/src/ui/gui/psppire-dialog-action-barchart.c index 6059c46439..34ac62b5a1 100644 --- a/src/ui/gui/psppire-dialog-action-barchart.c +++ b/src/ui/gui/psppire-dialog-action-barchart.c @@ -120,7 +120,7 @@ psppire_dialog_action_barchart_activate (GtkAction *a) PsppireDialogActionBarchart *act = PSPPIRE_DIALOG_ACTION_BARCHART (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-binomial.c b/src/ui/gui/psppire-dialog-action-binomial.c index 0f63e0652f..2efcc6c4b0 100644 --- a/src/ui/gui/psppire-dialog-action-binomial.c +++ b/src/ui/gui/psppire-dialog-action-binomial.c @@ -102,7 +102,7 @@ psppire_dialog_action_binomial_activate (GtkAction *a) PsppireDialogActionBinomial *act = PSPPIRE_DIALOG_ACTION_BINOMIAL (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-chisquare.c b/src/ui/gui/psppire-dialog-action-chisquare.c index ca08698ae0..00b6d22a4f 100644 --- a/src/ui/gui/psppire-dialog-action-chisquare.c +++ b/src/ui/gui/psppire-dialog-action-chisquare.c @@ -134,7 +134,7 @@ psppire_dialog_action_chisquare_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionChisquare *act = PSPPIRE_DIALOG_ACTION_CHISQUARE (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-compute.c b/src/ui/gui/psppire-dialog-action-compute.c index 01c9136ee0..e40dcd8958 100644 --- a/src/ui/gui/psppire-dialog-action-compute.c +++ b/src/ui/gui/psppire-dialog-action-compute.c @@ -461,7 +461,7 @@ psppire_dialog_action_compute_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionCompute *act = PSPPIRE_DIALOG_ACTION_COMPUTE (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-correlation.c b/src/ui/gui/psppire-dialog-action-correlation.c index 4dd10f3b42..e3f7017fff 100644 --- a/src/ui/gui/psppire-dialog-action-correlation.c +++ b/src/ui/gui/psppire-dialog-action-correlation.c @@ -97,7 +97,7 @@ psppire_dialog_action_correlation_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionCorrelation *act = PSPPIRE_DIALOG_ACTION_CORRELATION (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-count.c b/src/ui/gui/psppire-dialog-action-count.c index 69174950b1..84e4bda76b 100644 --- a/src/ui/gui/psppire-dialog-action-count.c +++ b/src/ui/gui/psppire-dialog-action-count.c @@ -150,7 +150,7 @@ psppire_dialog_action_count_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionCount *act = PSPPIRE_DIALOG_ACTION_COUNT (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-crosstabs.c b/src/ui/gui/psppire-dialog-action-crosstabs.c index aa5c86cc85..e451ea4136 100644 --- a/src/ui/gui/psppire-dialog-action-crosstabs.c +++ b/src/ui/gui/psppire-dialog-action-crosstabs.c @@ -208,7 +208,7 @@ psppire_dialog_action_crosstabs_activate (GtkAction *a) PsppireDialogActionCrosstabs *act = PSPPIRE_DIALOG_ACTION_CROSSTABS (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-descriptives.c b/src/ui/gui/psppire-dialog-action-descriptives.c index 2d6cca337d..ac437f425c 100644 --- a/src/ui/gui/psppire-dialog-action-descriptives.c +++ b/src/ui/gui/psppire-dialog-action-descriptives.c @@ -199,7 +199,7 @@ psppire_dialog_action_descriptives_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionDescriptives *act = PSPPIRE_DIALOG_ACTION_DESCRIPTIVES (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-examine.c b/src/ui/gui/psppire-dialog-action-examine.c index a2248671d5..841280a23d 100644 --- a/src/ui/gui/psppire-dialog-action-examine.c +++ b/src/ui/gui/psppire-dialog-action-examine.c @@ -203,7 +203,7 @@ psppire_dialog_action_examine_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionExamine *act = PSPPIRE_DIALOG_ACTION_EXAMINE (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-factor.c b/src/ui/gui/psppire-dialog-action-factor.c index de33c5c5fa..cefa7f5a76 100644 --- a/src/ui/gui/psppire-dialog-action-factor.c +++ b/src/ui/gui/psppire-dialog-action-factor.c @@ -301,7 +301,7 @@ psppire_dialog_action_factor_activate (GtkAction *a) GtkWidget *extraction_button ; GtkWidget *rotation_button ; - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-flip.c b/src/ui/gui/psppire-dialog-action-flip.c index 39f6efe864..03fc9d9ce1 100644 --- a/src/ui/gui/psppire-dialog-action-flip.c +++ b/src/ui/gui/psppire-dialog-action-flip.c @@ -95,7 +95,7 @@ psppire_dialog_action_flip_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionFlip *act = PSPPIRE_DIALOG_ACTION_FLIP (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-frequencies.c b/src/ui/gui/psppire-dialog-action-frequencies.c index 1135e8a4fd..7b69c8efa9 100644 --- a/src/ui/gui/psppire-dialog-action-frequencies.c +++ b/src/ui/gui/psppire-dialog-action-frequencies.c @@ -259,7 +259,7 @@ psppire_dialog_action_frequencies_activate (GtkAction * a) PsppireDialogActionFrequencies *act = PSPPIRE_DIALOG_ACTION_FREQUENCIES (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-histogram.c b/src/ui/gui/psppire-dialog-action-histogram.c index 08ffc1ad22..49d2a5f45b 100644 --- a/src/ui/gui/psppire-dialog-action-histogram.c +++ b/src/ui/gui/psppire-dialog-action-histogram.c @@ -65,7 +65,7 @@ psppire_dialog_action_histogram_activate (GtkAction *a) PsppireDialogActionHistogram *act = PSPPIRE_DIALOG_ACTION_HISTOGRAM (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-indep-samps.c b/src/ui/gui/psppire-dialog-action-indep-samps.c index 08529e43e8..dac62af76c 100644 --- a/src/ui/gui/psppire-dialog-action-indep-samps.c +++ b/src/ui/gui/psppire-dialog-action-indep-samps.c @@ -292,7 +292,7 @@ psppire_dialog_action_indep_samps_activate (GtkAction *a) PsppireDialogActionIndepSamps *act = PSPPIRE_DIALOG_ACTION_INDEP_SAMPS (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-k-related.c b/src/ui/gui/psppire-dialog-action-k-related.c index 16f0f721c3..1c4d0c094d 100644 --- a/src/ui/gui/psppire-dialog-action-k-related.c +++ b/src/ui/gui/psppire-dialog-action-k-related.c @@ -110,7 +110,7 @@ psppire_dialog_action_k_related_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionKRelated *act = PSPPIRE_DIALOG_ACTION_K_RELATED (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-kmeans.c b/src/ui/gui/psppire-dialog-action-kmeans.c index c1c913b37d..39be5670b7 100644 --- a/src/ui/gui/psppire-dialog-action-kmeans.c +++ b/src/ui/gui/psppire-dialog-action-kmeans.c @@ -87,7 +87,7 @@ psppire_dialog_action_kmeans_activate (GtkAction *a) PsppireDialogActionKmeans *act = PSPPIRE_DIALOG_ACTION_KMEANS (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-logistic.c b/src/ui/gui/psppire-dialog-action-logistic.c index 074b8e1456..15f7d6b9e5 100644 --- a/src/ui/gui/psppire-dialog-action-logistic.c +++ b/src/ui/gui/psppire-dialog-action-logistic.c @@ -102,7 +102,7 @@ psppire_dialog_action_logistic_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); GtkWidget *opts_button; - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-means.c b/src/ui/gui/psppire-dialog-action-means.c index 090a9eb13a..5c84c0f219 100644 --- a/src/ui/gui/psppire-dialog-action-means.c +++ b/src/ui/gui/psppire-dialog-action-means.c @@ -97,7 +97,7 @@ psppire_dialog_action_means_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionMeans *act = PSPPIRE_DIALOG_ACTION_MEANS (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-oneway.c b/src/ui/gui/psppire-dialog-action-oneway.c index 604c271f57..35e2d39966 100644 --- a/src/ui/gui/psppire-dialog-action-oneway.c +++ b/src/ui/gui/psppire-dialog-action-oneway.c @@ -226,7 +226,7 @@ psppire_dialog_action_oneway_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionOneway *act = PSPPIRE_DIALOG_ACTION_ONEWAY (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-paired.c b/src/ui/gui/psppire-dialog-action-paired.c index fdd9a2b34d..b6bd72f677 100644 --- a/src/ui/gui/psppire-dialog-action-paired.c +++ b/src/ui/gui/psppire-dialog-action-paired.c @@ -155,7 +155,7 @@ psppire_dialog_action_paired_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionPaired *act = PSPPIRE_DIALOG_ACTION_PAIRED (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-rank.c b/src/ui/gui/psppire-dialog-action-rank.c index c120fe260d..460044bbe1 100644 --- a/src/ui/gui/psppire-dialog-action-rank.c +++ b/src/ui/gui/psppire-dialog-action-rank.c @@ -212,7 +212,7 @@ psppire_dialog_action_rank_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionRank *act = PSPPIRE_DIALOG_ACTION_RANK (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-regression.c b/src/ui/gui/psppire-dialog-action-regression.c index fd168c4350..402c1d62fd 100644 --- a/src/ui/gui/psppire-dialog-action-regression.c +++ b/src/ui/gui/psppire-dialog-action-regression.c @@ -147,7 +147,7 @@ psppire_dialog_action_regression_activate (GtkAction *a) PsppireDialogActionRegression *act = PSPPIRE_DIALOG_ACTION_REGRESSION (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-reliability.c b/src/ui/gui/psppire-dialog-action-reliability.c index c3d035cfbd..3f5d0769ca 100644 --- a/src/ui/gui/psppire-dialog-action-reliability.c +++ b/src/ui/gui/psppire-dialog-action-reliability.c @@ -126,7 +126,7 @@ psppire_dialog_action_reliability_activate (GtkAction *a) PsppireDialogActionReliability *act = PSPPIRE_DIALOG_ACTION_RELIABILITY (a); GtkTreeModel *liststore ; - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-roc.c b/src/ui/gui/psppire-dialog-action-roc.c index 03748f2946..a2d53a1531 100644 --- a/src/ui/gui/psppire-dialog-action-roc.c +++ b/src/ui/gui/psppire-dialog-action-roc.c @@ -126,7 +126,7 @@ psppire_dialog_action_roc_activate (GtkAction *a) PsppireDialogActionRoc *act = PSPPIRE_DIALOG_ACTION_ROC (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-runs.c b/src/ui/gui/psppire-dialog-action-runs.c index 62d6b27754..1ef281db46 100644 --- a/src/ui/gui/psppire-dialog-action-runs.c +++ b/src/ui/gui/psppire-dialog-action-runs.c @@ -133,7 +133,7 @@ psppire_dialog_action_runs_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionRuns *act = PSPPIRE_DIALOG_ACTION_RUNS (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-scatterplot.c b/src/ui/gui/psppire-dialog-action-scatterplot.c index 3b89d443a3..f3b3707861 100644 --- a/src/ui/gui/psppire-dialog-action-scatterplot.c +++ b/src/ui/gui/psppire-dialog-action-scatterplot.c @@ -96,7 +96,7 @@ psppire_dialog_action_scatterplot_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionScatterplot *act = PSPPIRE_DIALOG_ACTION_SCATTERPLOT (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-sort.c b/src/ui/gui/psppire-dialog-action-sort.c index 024a659de1..c911d437f7 100644 --- a/src/ui/gui/psppire-dialog-action-sort.c +++ b/src/ui/gui/psppire-dialog-action-sort.c @@ -95,7 +95,7 @@ psppire_dialog_action_sort_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionSort *act = PSPPIRE_DIALOG_ACTION_SORT (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-tt1s.c b/src/ui/gui/psppire-dialog-action-tt1s.c index 4bf486340d..f6f1cf618e 100644 --- a/src/ui/gui/psppire-dialog-action-tt1s.c +++ b/src/ui/gui/psppire-dialog-action-tt1s.c @@ -108,7 +108,7 @@ psppire_dialog_action_tt1s_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionTt1s *act = PSPPIRE_DIALOG_ACTION_TT1S (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-two-sample.c b/src/ui/gui/psppire-dialog-action-two-sample.c index ce08e05271..b10ee4c137 100644 --- a/src/ui/gui/psppire-dialog-action-two-sample.c +++ b/src/ui/gui/psppire-dialog-action-two-sample.c @@ -174,7 +174,7 @@ psppire_dialog_action_two_sample_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionTwoSample *act = PSPPIRE_DIALOG_ACTION_TWO_SAMPLE (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-univariate.c b/src/ui/gui/psppire-dialog-action-univariate.c index 664dd36e43..c388075be0 100644 --- a/src/ui/gui/psppire-dialog-action-univariate.c +++ b/src/ui/gui/psppire-dialog-action-univariate.c @@ -88,7 +88,7 @@ psppire_dialog_action_univariate_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionUnivariate *act = PSPPIRE_DIALOG_ACTION_UNIVARIATE (a); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action-var-info.c b/src/ui/gui/psppire-dialog-action-var-info.c index b8336d224b..31580dd9f9 100644 --- a/src/ui/gui/psppire-dialog-action-var-info.c +++ b/src/ui/gui/psppire-dialog-action-var-info.c @@ -169,7 +169,7 @@ psppire_dialog_action_var_info_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionVarInfo *act = PSPPIRE_DIALOG_ACTION_VAR_INFO (pda); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); GtkBuilder *xml = g_hash_table_lookup (thing, a); if (!xml) { diff --git a/src/ui/gui/psppire-dialog-action.c b/src/ui/gui/psppire-dialog-action.c index a97421f7ea..70b89ea286 100644 --- a/src/ui/gui/psppire-dialog-action.c +++ b/src/ui/gui/psppire-dialog-action.c @@ -106,21 +106,29 @@ on_destroy_dataset (GObject *w) g_hash_table_unref (t); } +/* Each toplevel widget - that is the data window, which generally has a 1-1 association + with a dataset - has an associated GHashTable. + + This GHashTable is keyed by the address of a PsppireDialogAction, and its values + are user determined pointers (typically a GtkBuilder*). + + This is useful for storing the state of dialogs so they can persist between invocations. +*/ GHashTable * -psppire_dialog_action_get_pointer (PsppireDialogAction *act) +psppire_dialog_action_get_hash_table (PsppireDialogAction *act) { set_toplevel (act); - GHashTable *thing = g_object_get_data (G_OBJECT (act->toplevel), "thing-table"); - if (thing == NULL) + GHashTable *t = g_object_get_data (G_OBJECT (act->toplevel), "thing-table"); + if (t == NULL) { - thing = g_hash_table_new_full (g_direct_hash, g_direct_equal, 0, g_object_unref); - g_object_set_data (G_OBJECT (act->toplevel), "thing-table", thing); + t = g_hash_table_new_full (g_direct_hash, g_direct_equal, 0, g_object_unref); + g_object_set_data (G_OBJECT (act->toplevel), "thing-table", t); g_object_set_data (G_OBJECT (act->toplevel), "widget-list", NULL); g_signal_connect (act->toplevel, "destroy", G_CALLBACK (on_destroy_dataset), NULL); } - return thing; + return t; } static void diff --git a/src/ui/gui/psppire-dialog-action.h b/src/ui/gui/psppire-dialog-action.h index 215d89a52a..3996379843 100644 --- a/src/ui/gui/psppire-dialog-action.h +++ b/src/ui/gui/psppire-dialog-action.h @@ -100,7 +100,7 @@ typedef void (*activation) (GtkAction *); void psppire_dialog_action_set_activation (gpointer class, activation a); -GHashTable *psppire_dialog_action_get_pointer (PsppireDialogAction *act); +GHashTable *psppire_dialog_action_get_hash_table (PsppireDialogAction *act); -- 2.30.2