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 --- pianoroll/pianoroll.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'pianoroll/pianoroll.c') diff --git a/pianoroll/pianoroll.c b/pianoroll/pianoroll.c index 6b8304d..c2d8aff 100644 --- a/pianoroll/pianoroll.c +++ b/pianoroll/pianoroll.c @@ -800,13 +800,18 @@ void pianoroll_setup(void) pianoroll_widgetbehavior.w_deletefn = pianoroll_delete; pianoroll_widgetbehavior.w_visfn = pianoroll_vis; pianoroll_widgetbehavior.w_clickfn = pianoroll_click; - /* As of 0.37, the last two elements of t_widgetbehavoir */ - /* have been removed. */ -#if PD_MAJOR_VERSION == 0 + /* + * : 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) pianoroll_widgetbehavior.w_propertiesfn = pianoroll_properties; pianoroll_widgetbehavior.w_savefn = pianoroll_save; -#endif +#else + class_setsavefn(pianoroll_class, &pianoroll_save); + class_setpropertiesfn(pianoroll_class, &pianoroll_properties); #endif class_setwidget(pianoroll_class, &pianoroll_widgetbehavior); class_sethelpsymbol(pianoroll_class, gensym("help-pianoroll.pd")); -- cgit v1.2.1