aboutsummaryrefslogtreecommitdiff
path: root/sonogram~
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 /sonogram~
parenta2b76c71f48393a78f43606f2bbc34727901f2dd (diff)
updated #ifdef code to make savefn and propertiesfn work under 0.37
svn path=/trunk/externals/unauthorized/; revision=965
Diffstat (limited to 'sonogram~')
-rw-r--r--sonogram~/sonogram~-joge.c13
-rw-r--r--sonogram~/sonogram~-yves.c13
-rw-r--r--sonogram~/sonogram~.c13
3 files changed, 27 insertions, 12 deletions
diff --git a/sonogram~/sonogram~-joge.c b/sonogram~/sonogram~-joge.c
index b6e6c97..e9c8927 100644
--- a/sonogram~/sonogram~-joge.c
+++ b/sonogram~/sonogram~-joge.c
@@ -1992,13 +1992,18 @@ void sonogram_tilde_setup(void)
sonogram_widgetbehavior.w_deletefn = sonogram_delete;
sonogram_widgetbehavior.w_visfn = sonogram_vis;
sonogram_widgetbehavior.w_clickfn = sonogram_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)
sonogram_widgetbehavior.w_propertiesfn = NULL;
sonogram_widgetbehavior.w_savefn = sonogram_save;
-#endif
+#else
+ class_setpropertiesfn(sonogram_class, NULL);
+ class_setsavefn(sonogram_class, &sonogram_save);
#endif
CLASS_MAINSIGNALIN( sonogram_class, t_sonogram, x_f );
diff --git a/sonogram~/sonogram~-yves.c b/sonogram~/sonogram~-yves.c
index 6d647ac..4886284 100644
--- a/sonogram~/sonogram~-yves.c
+++ b/sonogram~/sonogram~-yves.c
@@ -1963,13 +1963,18 @@ void sonogram_tilde_setup(void)
sonogram_widgetbehavior.w_deletefn = sonogram_delete;
sonogram_widgetbehavior.w_visfn = sonogram_vis;
sonogram_widgetbehavior.w_clickfn = sonogram_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)
sonogram_widgetbehavior.w_propertiesfn = NULL;
sonogram_widgetbehavior.w_savefn = sonogram_save;
-#endif
+#else
+ class_setpropertiesfn(sonogram_class, NULL);
+ class_setsavefn(sonogram_class, &sonogram_save);
#endif
CLASS_MAINSIGNALIN( sonogram_class, t_sonogram, x_f );
diff --git a/sonogram~/sonogram~.c b/sonogram~/sonogram~.c
index 4d9dfb1..61d12d9 100644
--- a/sonogram~/sonogram~.c
+++ b/sonogram~/sonogram~.c
@@ -2028,13 +2028,18 @@ void sonogram_tilde_setup(void)
sonogram_widgetbehavior.w_deletefn = sonogram_delete;
sonogram_widgetbehavior.w_visfn = sonogram_vis;
sonogram_widgetbehavior.w_clickfn = sonogram_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)
sonogram_widgetbehavior.w_propertiesfn = NULL;
sonogram_widgetbehavior.w_savefn = sonogram_save;
-#endif
+#else
+ class_setpropertiesfn(sonogram_class, NULL);
+ class_setsavefn(sonogram_class, &sonogram_save);
#endif
CLASS_MAINSIGNALIN( sonogram_class, t_sonogram, x_f );