aboutsummaryrefslogtreecommitdiff
path: root/probalizer
diff options
context:
space:
mode:
Diffstat (limited to 'probalizer')
-rw-r--r--probalizer/probalizer.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/probalizer/probalizer.c b/probalizer/probalizer.c
index e789412..462ff98 100644
--- a/probalizer/probalizer.c
+++ b/probalizer/probalizer.c
@@ -687,13 +687,18 @@ void probalizer_setup(void)
probalizer_widgetbehavior.w_deletefn = probalizer_delete;
probalizer_widgetbehavior.w_visfn = probalizer_vis;
probalizer_widgetbehavior.w_clickfn = probalizer_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)
probalizer_widgetbehavior.w_propertiesfn = probalizer_properties;
probalizer_widgetbehavior.w_savefn = probalizer_save;
-#endif
+#else
+ class_setsavefn(probalizer_class, &probalizer_save);
+ class_setpropertiesfn(probalizer_class, &probalizer_properties);
#endif
class_setwidget(probalizer_class, &probalizer_widgetbehavior);
class_sethelpsymbol(probalizer_class, gensym("help-probalizer.pd"));