aboutsummaryrefslogtreecommitdiff
path: root/sonogram~
diff options
context:
space:
mode:
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 );