aboutsummaryrefslogtreecommitdiff
path: root/grid
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 /grid
parenta2b76c71f48393a78f43606f2bbc34727901f2dd (diff)
updated #ifdef code to make savefn and propertiesfn work under 0.37
svn path=/trunk/externals/unauthorized/; revision=965
Diffstat (limited to 'grid')
-rw-r--r--grid/grid.c13
-rw-r--r--grid/grid2.c13
2 files changed, 18 insertions, 8 deletions
diff --git a/grid/grid.c b/grid/grid.c
index 5042f4e..2f61374 100644
--- a/grid/grid.c
+++ b/grid/grid.c
@@ -669,13 +669,18 @@ void grid_setup(void)
grid_widgetbehavior.w_deletefn = grid_delete;
grid_widgetbehavior.w_visfn = grid_vis;
grid_widgetbehavior.w_clickfn = grid_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)
grid_widgetbehavior.w_propertiesfn = grid_properties;
grid_widgetbehavior.w_savefn = grid_save;
-#endif
+#else
+ class_setsavefn(grid_class, &grid_save);
+ class_setpropertiesfn(grid_class, &grid_properties);
#endif
class_setwidget(grid_class, &grid_widgetbehavior);
class_sethelpsymbol(grid_class, gensym("help-grid.pd"));
diff --git a/grid/grid2.c b/grid/grid2.c
index 426e2d2..070aa04 100644
--- a/grid/grid2.c
+++ b/grid/grid2.c
@@ -535,13 +535,18 @@ void grid_setup(void)
grid_widgetbehavior.w_deletefn = grid_delete;
grid_widgetbehavior.w_visfn = grid_vis;
grid_widgetbehavior.w_clickfn = grid_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)
grid_widgetbehavior.w_propertiesfn = grid_properties;
grid_widgetbehavior.w_savefn = grid_save;
-#endif
+#else
+ class_setsavefn(grid_class, &grid_save);
+ class_setpropertiesfn(grid_class, &grid_properties);
#endif
class_setwidget(grid_class, &grid_widgetbehavior);
class_sethelpsymbol(grid_class, gensym("help-grid.pd"));