aboutsummaryrefslogtreecommitdiff
path: root/cooled~
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 /cooled~
parenta2b76c71f48393a78f43606f2bbc34727901f2dd (diff)
updated #ifdef code to make savefn and propertiesfn work under 0.37
svn path=/trunk/externals/unauthorized/; revision=965
Diffstat (limited to 'cooled~')
-rw-r--r--cooled~/cooled~.c13
1 files changed, 10 insertions, 3 deletions
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)
+ /*
+ * <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)
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 );