From: John Darrington Date: Sat, 22 Jun 2013 06:25:36 +0000 (+0200) Subject: Changed the signature of the VARIABLE_CHANGED signal to take the WHAT and OLDVAR... X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b0a7c4234853cb958efd8d087588a3781b0a043;p=pspp Changed the signature of the VARIABLE_CHANGED signal to take the WHAT and OLDVAR parameters Re-implement signal handlers of the variable-changed signal to PsppireDict to take the new WHAT and OLDVAR parameters. --- diff --git a/src/ui/gui/marshaller-list b/src/ui/gui/marshaller-list index 8fec64decd..0f38e6fc2e 100644 --- a/src/ui/gui/marshaller-list +++ b/src/ui/gui/marshaller-list @@ -11,3 +11,4 @@ VOID:BOXED,OBJECT VOID:INT,INT VOID:OBJECT,OBJECT VOID:POINTER,INT,INT +VOID:INT,UINT,POINTER diff --git a/src/ui/gui/psppire-data-sheet.c b/src/ui/gui/psppire-data-sheet.c index 279c36953e..746494eeeb 100644 --- a/src/ui/gui/psppire-data-sheet.c +++ b/src/ui/gui/psppire-data-sheet.c @@ -1909,6 +1909,7 @@ on_variable_display_width_changed (PsppireDict *dict, int dict_index, static void on_variable_changed (PsppireDict *dict, int dict_index, + guint what, const struct variable *oldvar, PsppireDataSheet *data_sheet) { PsppireDataStore *data_store = psppire_data_sheet_get_data_store (data_sheet); diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index 047cca7811..7104d3a30a 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -211,7 +211,7 @@ delete_variable_callback (GObject *obj, const struct variable *var UNUSED, } static void -variable_changed_callback (GObject *obj, gint var_num, gpointer data) +variable_changed_callback (GObject *obj, gint var_num, guint what, const struct variable *oldvar, gpointer data) { } diff --git a/src/ui/gui/psppire-dict.c b/src/ui/gui/psppire-dict.c index 97115b0474..60ccda5200 100644 --- a/src/ui/gui/psppire-dict.c +++ b/src/ui/gui/psppire-dict.c @@ -134,10 +134,13 @@ psppire_dict_class_init (PsppireDictClass *class) G_SIGNAL_RUN_FIRST, 0, NULL, NULL, - g_cclosure_marshal_VOID__INT, + psppire_marshal_VOID__INT_UINT_POINTER, G_TYPE_NONE, - 1, - G_TYPE_INT); + 3, + G_TYPE_INT, + G_TYPE_UINT, + G_TYPE_POINTER + ); @@ -258,7 +261,7 @@ delcb (struct dictionary *d, const struct variable *var, static void mutcb (struct dictionary *d, int idx, unsigned int what, const struct variable *oldvar, void *pd) { - g_signal_emit (pd, signals [VARIABLE_CHANGED], 0, idx); + g_signal_emit (pd, signals [VARIABLE_CHANGED], 0, idx, what, oldvar); } static void diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index 970da7dfbc..9d23cb9656 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -1288,7 +1288,9 @@ refresh_model (PsppireVarSheet *var_sheet) } static void -on_var_changed (PsppireDict *dict, glong row, PsppireVarSheet *var_sheet) +on_var_changed (PsppireDict *dict, glong row, + guint what, const struct variable *oldvar, + PsppireVarSheet *var_sheet) { PsppireEmptyListStore *store;