diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-09-17 17:11:34 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-09-17 17:11:34 +0000 |
commit | 08fc7edfdd32ac8d58e16ae53466e3ec85755678 (patch) | |
tree | e63d1ec3419f8eb953cc22ef0736b89495dc94e4 | |
parent | 56f42d7be8dac65f70ebfa0cc5107d5b8a88ffef (diff) |
merged relevant changes from Pd-extended 0.42
svn path=/trunk/externals/bbogart/; revision=14153
-rw-r--r-- | entry/entry.c | 9 | ||||
-rw-r--r-- | popup/popup.c | 22 |
2 files changed, 4 insertions, 27 deletions
diff --git a/entry/entry.c b/entry/entry.c index bc4860f..50adfbc 100644 --- a/entry/entry.c +++ b/entry/entry.c @@ -17,7 +17,6 @@ * GNU General Public License for more details. */ #include <m_pd.h> -#include <m_imp.h> #include <g_canvas.h> #include <stdio.h> #include <string.h> @@ -362,7 +361,7 @@ static void entry_displace(t_gobj *z, t_glist *glist, int dx, int dy) text_xpix(&x->x_obj, glist) + x->x_width, text_ypix(&x->x_obj, glist) + x->x_height-2);*/ // entry_drawme(x, glist, 0); - canvas_fixlinesfor(glist_getcanvas(glist), (t_text*) x); + canvas_fixlinesfor(glist, (t_text*) x); } DEBUG(post("displace end");); } @@ -425,7 +424,7 @@ static void entry_delete(t_gobj *z, t_glist *glist) { DEBUG(post("entry_delete: glist %lx", glist);); t_text *x = (t_text *)z; - canvas_deletelinesfor(glist_getcanvas(glist), x); + canvas_deletelinesfor(glist, x); } @@ -433,15 +432,11 @@ static void entry_vis(t_gobj *z, t_glist *glist, int vis) { t_entry *x = (t_entry*)z; DEBUG(post("entry_vis: vis %d canvas %lx glist %lx", vis, x->x_canvas, glist);); - t_rtext *y; if (vis) { - y = (t_rtext *) rtext_new(glist, (t_text *)z); entry_drawme(x, glist, 1); } else { - y = glist_findrtext(glist, (t_text *)z); entry_erase(x, glist); - rtext_free(y); } } diff --git a/popup/popup.c b/popup/popup.c index 9da8a94..1ea98a3 100644 --- a/popup/popup.c +++ b/popup/popup.c @@ -28,10 +28,6 @@ #pragma warning( disable : 4305 ) #endif -#if PD_MINOR_VERSION < 37 -#define t_rtext t_text -#endif - #ifndef IOWIDTH #define IOWIDTH 4 #endif @@ -268,7 +264,7 @@ static void popup_displace(t_gobj *z, t_glist *glist, text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height-2); popup_drawme(x, glist, 0); - canvas_fixlinesfor(glist_getcanvas(glist),(t_text*) x); + canvas_fixlinesfor(glist,(t_text*) x); } DEBUG(post("displace end");) } @@ -320,27 +316,13 @@ static void popup_delete(t_gobj *z, t_glist *glist) static void popup_vis(t_gobj *z, t_glist *glist, int vis) { t_popup* s = (t_popup*)z; - t_rtext *y; - DEBUG(post("vis start");) + DEBUG(post("vis: %d",vis);) if (vis) { -#ifdef PD_MINOR_VERSION - /* JMZ: create an editor if there is none; - * on 0.42 there might be none IF [popup] is contained within a gop - */ -#if PD_MINOR_VERSION > 41 - canvas_create_editor(glist); -#endif - y = (t_rtext *) rtext_new(glist, (t_text *)z); -#else - y = (t_rtext *) rtext_new(glist, (t_text *)z,0,0); -#endif popup_drawme(s, glist, 1); } else { - y = glist_findrtext(glist, (t_text *)z); popup_erase(s,glist); - rtext_free(y); } DEBUG(post("vis end");) |