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 --- playlist/playlist.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'playlist') diff --git a/playlist/playlist.c b/playlist/playlist.c index a79f4c4..a4d7522 100644 --- a/playlist/playlist.c +++ b/playlist/playlist.c @@ -742,14 +742,20 @@ void playlist_setup(void) playlist_widgetbehavior.w_deletefn = playlist_delete; playlist_widgetbehavior.w_visfn = playlist_vis; playlist_widgetbehavior.w_clickfn = playlist_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) playlist_widgetbehavior.w_propertiesfn = playlist_properties; playlist_widgetbehavior.w_savefn = playlist_save; +#else + class_setsavefn(playlist_class, &playlist_save); + class_setpropertiesfn(playlist_class, &playlist_properties); #endif -#endif + class_setwidget(playlist_class, &playlist_widgetbehavior); class_sethelpsymbol(playlist_class, gensym("help-playlist.pd")); } -- cgit v1.2.1