From a431a46da7eefba0c9bc45842a4cd63769eab900 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 15 Sep 2003 04:43:47 +0000 Subject: updated #ifdef code to make savefn and propertiesfn work under 0.37 svn path=/trunk/externals/unauthorized/; revision=965 --- cooled~/cooled~.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'cooled~') diff --git a/cooled~/cooled~.c b/cooled~/cooled~.c index d0fd468..d0641d1 100644 --- a/cooled~/cooled~.c +++ b/cooled~/cooled~.c @@ -1365,11 +1365,18 @@ void cooled_tilde_setup(void) cooled_widgetbehavior.w_deletefn = cooled_delete; cooled_widgetbehavior.w_visfn = cooled_vis; cooled_widgetbehavior.w_clickfn = cooled_click; -#if PD_MAJOR_VERSION == 0 -#if PD_MINOR_VERSION < 37 || !defined(PD_MINOR_VERSION) + /* + * : As of 0.37, pd does not have these last + * two elements in t_widgetbehavoir anymore. + * see pd/src/notes.txt: + * savefunction and dialog into class structure + */ +#if PD_MINOR_VERSION < 37 || !defined(PD_MINOR_VERSION) cooled_widgetbehavior.w_propertiesfn = cooled_properties; cooled_widgetbehavior.w_savefn = cooled_save; -#endif +#else + class_setsavefn(cooled_class, &cooled_save); + class_setpropertiesfn(cooled_class, &cooled_properties); #endif CLASS_MAINSIGNALIN( cooled_class, t_cooled, x_f ); -- cgit v1.2.1