Also add a comment explaining what it is for.
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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
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);