aboutsummaryrefslogtreecommitdiff
path: root/exciter
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2003-09-15 04:43:47 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2003-09-15 04:43:47 +0000
commita431a46da7eefba0c9bc45842a4cd63769eab900 (patch)
tree8b36d0399feae832a0a668e17cea93e5bb58d528 /exciter
parenta2b76c71f48393a78f43606f2bbc34727901f2dd (diff)
updated #ifdef code to make savefn and propertiesfn work under 0.37
svn path=/trunk/externals/unauthorized/; revision=965
Diffstat (limited to 'exciter')
-rw-r--r--exciter/exciter.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/exciter/exciter.c b/exciter/exciter.c
index d9a4310..0fbe21e 100644
--- a/exciter/exciter.c
+++ b/exciter/exciter.c
@@ -810,15 +810,19 @@ void exciter_setup(void)
exciter_widgetbehavior.w_deletefn = exciter_delete;
exciter_widgetbehavior.w_visfn = exciter_vis;
exciter_widgetbehavior.w_clickfn = exciter_click;
- /* As of 0.37, the last two elements of t_widgetbehavoir */
- /* have been removed. <hans@eds.org> */
-#if PD_MAJOR_VERSION == 0
+ /*
+ * <hans@eds.org>: 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)
exciter_widgetbehavior.w_propertiesfn = exciter_properties;
exciter_widgetbehavior.w_savefn = exciter_save;
+#else
+ class_setsavefn(exciter_class, &exciter_save);
+ class_setpropertiesfn(exciter_class, &exciter_properties);
#endif
-#endif
-
class_setwidget(exciter_class, &exciter_widgetbehavior);
class_sethelpsymbol(exciter_class, gensym("help-exciter.pd"));
}