All subclasses of PsppireDialogAction needed to use GtkActionClass. This widget however
is deprecated in recent Gtk versions. Meaning that all instances of PsppireDialogAction
implementations would provoke a deprecation warning at compile time.
This change avoids that by providing a common function to set GtkActionClass->activate.
Thus, there is now only a single warning instead of many.
static void
psppire_dialog_action_1sks_class_init (PsppireDialogAction1sksClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_1sks_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_1sks_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_binomial_class_init (PsppireDialogActionBinomialClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_binomial_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_binomial_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_chisquare_class_init (PsppireDialogActionChisquareClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_chisquare_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_chisquare_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_compute_class_init (PsppireDialogActionComputeClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_compute_activate);
- action_class->activate = psppire_dialog_action_compute_activate;
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_correlation_class_init (PsppireDialogActionCorrelationClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_correlation_activate);
- action_class->activate = psppire_dialog_action_correlation_activate;
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_count_class_init (PsppireDialogActionCountClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_count_activate;
+ psppire_dialog_action_set_activation (class,psppire_dialog_action_count_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_crosstabs_class_init (PsppireDialogActionCrosstabsClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_crosstabs_activate;
-
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_crosstabs_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_descriptives_class_init (PsppireDialogActionDescriptivesClass *class)
{
- GTK_ACTION_CLASS (class)->activate = psppire_dialog_action_descriptives_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_descriptives_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_examine_class_init (PsppireDialogActionExamineClass *class)
{
- GTK_ACTION_CLASS (class)->activate = psppire_dialog_action_examine_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_examine_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_factor_class_init (PsppireDialogActionFactorClass *class)
{
- GTK_ACTION_CLASS (class)->activate = psppire_dialog_action_factor_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_factor_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_flip_class_init (PsppireDialogActionFlipClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_flip_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_flip_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_frequencies_class_init (PsppireDialogActionFrequenciesClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_frequencies_activate;
-
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_frequencies_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_indep_samps_class_init (PsppireDialogActionIndepSampsClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_indep_samps_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_indep_samps_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_k_related_class_init (PsppireDialogActionKRelatedClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_k_related_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_k_related_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_kmeans_class_init (PsppireDialogActionKmeansClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_kmeans_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_kmeans_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_logistic_class_init (PsppireDialogActionLogisticClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_logistic_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_logistic_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_means_class_init (PsppireDialogActionMeansClass *class)
{
- GTK_ACTION_CLASS (class)->activate = psppire_dialog_action_means_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_means_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_oneway_class_init (PsppireDialogActionOnewayClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_oneway_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_oneway_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_paired_class_init (PsppireDialogActionPairedClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
GObjectClass *object_class = G_OBJECT_CLASS (class);
-
- action_class->activate = psppire_dialog_action_paired_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_paired_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
- object_class->finalize = psppire_dialog_action_paired_finalize;
+ object_class->finalize = psppire_dialog_action_paired_finalize;
}
static void
psppire_dialog_action_rank_class_init (PsppireDialogActionRankClass *class)
{
- GTK_ACTION_CLASS (class)->activate = psppire_dialog_action_rank_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_rank_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_regression_class_init (PsppireDialogActionRegressionClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_regression_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_regression_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_reliability_class_init (PsppireDialogActionReliabilityClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
PsppireDialogActionClass *pdac = PSPPIRE_DIALOG_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_reliability_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_reliability_activate);
pdac->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_roc_class_init (PsppireDialogActionRocClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_roc_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_roc_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_runs_class_init (PsppireDialogActionRunsClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_runs_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_runs_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_sort_class_init (PsppireDialogActionSortClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
- PsppireDialogActionClass *pdac = PSPPIRE_DIALOG_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_sort_activate;
+ PsppireDialogActionClass *pdac = PSPPIRE_DIALOG_ACTION_CLASS (class);
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_sort_activate);
pdac->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_tt1s_class_init (PsppireDialogActionTt1sClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
GObjectClass *object_class = G_OBJECT_CLASS (class);
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_tt1s_activate);
object_class->finalize = psppire_dialog_action_tt1s_finalize;
- action_class->activate = psppire_dialog_action_tt1s_activate;
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_two_sample_class_init (PsppireDialogActionTwoSampleClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_two_sample_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_two_sample_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_univariate_class_init (PsppireDialogActionUnivariateClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_univariate_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_univariate_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
static void
psppire_dialog_action_var_info_class_init (PsppireDialogActionVarInfoClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_var_info_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_var_info_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
g_signal_connect_swapped (pda->dialog, "refresh", G_CALLBACK (refresh), pda);
}
+
+void
+psppire_dialog_action_set_activation (gpointer class, activation activate)
+{
+ GTK_ACTION_CLASS (class)->activate = activate;
+}
+
void psppire_dialog_action_set_valid_predicate (PsppireDialogAction *act,
ContentsAreValid dialog_state_valid);
+typedef void (*activation) (GtkAction *);
+
+void psppire_dialog_action_set_activation (gpointer class, activation a);
+
+
+
+
G_END_DECLS
#endif /* __PSPPIRE_DIALOG_ACTION_H__ */