From c58e07117cf4512ed6863eb86a3b1a1fdff59beb Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Sun, 12 Jul 2015 20:24:39 -0400 Subject: [PATCH] change function name for consistency --- pd/nw/pdgui.js | 6 +++--- pd/nw/todo.txt | 13 +++++++------ pd/src/g_all_guis.c | 4 ++-- pd/src/g_array.c | 2 +- pd/src/g_graph.c | 4 ++-- pd/src/g_scalar.c | 4 ++-- pd/src/g_text.c | 4 ++-- 7 files changed, 19 insertions(+), 18 deletions(-) diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index cec1df8e8..38599c7d0 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -2171,7 +2171,7 @@ function gui_text_new(canvasname, myname, type, isselected, x, y, text, font) { } if (isselected) { - gui_text_select(canvasname, myname); + gui_gobj_select(canvasname, myname); } } @@ -2214,7 +2214,7 @@ function gui_text_redraw_border(cid, tag, x1, y1, x2, y2) { } } -function gui_text_select(cid, tag) { +function gui_gobj_select(cid, tag) { var g = get_gobj(cid, tag); // var b = get_item(cid, tag + 'border'); if (g !== null) { @@ -2228,7 +2228,7 @@ function gui_text_select(cid, tag) { // } } -function gui_text_deselect(cid, tag) { +function gui_gobj_deselect(cid, tag) { // gui_post("deselecting text with tag..." + tag); var gobj = get_gobj(cid, tag) if (gobj !== null) { diff --git a/pd/nw/todo.txt b/pd/nw/todo.txt index 94f55cb74..4a81be8c1 100644 --- a/pd/nw/todo.txt +++ b/pd/nw/todo.txt @@ -51,16 +51,17 @@ Everything else: (A [x] means we've fixed it) [x] "Save As" on an overwrite doesn't seem to clear the dirty flag [ ] figure out why there is a "pd_opendir" global var [ ] pass k12 mode arg -[ ] implement recent files (using Pd's prefs loading mechanism instead of reimplementing gui prefs) +[ ] implement recent files (using Pd's prefs loading mechanism instead of + reimplementing gui prefs) [ ] implement verifyquit [ ] save and saveas dialogs aren't defaulting to the present working directory -[ ] implement automatic scrollbars and svg canvas resizing -[ ] add 'x' type to gui_vmess for saving canvas names, etc., as hex values +[x] implement automatic scrollbars and svg canvas resizing +[x] add 'x' type to gui_vmess for saving canvas names, etc., as hex values [x] destroy (or, more likely, hide) selection rectangle when not needed [ ] change gui_text_select to gui_gobj_select -[ ] make it possible to have the inner cells of hradio change color with the selection, - as the border currently does. Tk just uses the non-hierarchical tags and appends the word - "BASE". (Maybe use an inner <g> to do this.) +[ ] make it possible to have the inner cells of hradio change color with the + selection, as the border currently does. Tk just uses the non-hierarchical + tags and appends the word "BASE". (Maybe use an inner <g> to do this.) [x] make mycnv use its own selection logic [ ] abstract away appendChild [ ] font-size should be set as css property for a class of text, rather than per each gobj in svg diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c index 7e6c20718..526123a44 100644 --- a/pd/src/g_all_guis.c +++ b/pd/src/g_all_guis.c @@ -959,12 +959,12 @@ void iemgui_tag_selected(t_iemgui *x) { if(x->x_selected) { //sys_vgui(".x%lx.c addtag selected withtag x%lx\n", canvas, x); - gui_vmess("gui_text_select", "xx", canvas, x); + gui_vmess("gui_gobj_select", "xx", canvas, x); } else { //sys_vgui(".x%lx.c dtag x%lx selected\n", canvas, x); - gui_vmess("gui_text_deselect", "xx", canvas, x); + gui_vmess("gui_gobj_deselect", "xx", canvas, x); } } diff --git a/pd/src/g_array.c b/pd/src/g_array.c index a41c5787a..b6524584c 100644 --- a/pd/src/g_array.c +++ b/pd/src/g_array.c @@ -1588,7 +1588,7 @@ static void garray_doredraw(t_gobj *client, t_glist *glist) t_scalar *sc = x->x_scalar; char tagbuf[MAXPDSTRING]; sprintf(tagbuf, "scalar%lx", (long unsigned int)sc->sc_vec); - gui_vmess("gui_text_select", "xs", + gui_vmess("gui_gobj_select", "xs", glist_getcanvas(glist), tagbuf); } } diff --git a/pd/src/g_graph.c b/pd/src/g_graph.c index cc2b75f48..06802924a 100644 --- a/pd/src/g_graph.c +++ b/pd/src/g_graph.c @@ -1505,10 +1505,10 @@ static void graph_select(t_gobj *z, t_glist *glist, int state) // (state? "$pd_colors(selection)" : "$pd_colors(graph_border)"), // (state? "$pd_colors(selection)" : "$pd_colors(graph_border)")); if (state) - gui_vmess("gui_text_select", "xs", + gui_vmess("gui_gobj_select", "xs", canvas, rtext_gettag(y)); else - gui_vmess("gui_text_deselect", "xs", + gui_vmess("gui_gobj_deselect", "xs", canvas, rtext_gettag(y)); } diff --git a/pd/src/g_scalar.c b/pd/src/g_scalar.c index 9352813d0..a2f873dbb 100644 --- a/pd/src/g_scalar.c +++ b/pd/src/g_scalar.c @@ -527,7 +527,7 @@ void scalar_select(t_gobj *z, t_glist *owner, int state) // glist_getcanvas(owner), x); //sys_vgui(".x%lx.c addtag scalar_selected withtag {.scalar%lx}\n", // glist_getcanvas(owner), x->sc_vec); - gui_vmess("gui_text_select", "xs", + gui_vmess("gui_gobj_select", "xs", glist_getcanvas(owner), tagbuf); } else @@ -537,7 +537,7 @@ void scalar_select(t_gobj *z, t_glist *owner, int state) // glist_getcanvas(owner), x); //sys_vgui(".x%lx.c dtag .scalar%lx scalar_selected\n", // glist_getcanvas(owner), x->sc_vec); - gui_vmess("gui_text_deselect", "xs", + gui_vmess("gui_gobj_deselect", "xs", glist_getcanvas(owner), tagbuf); } //sys_vgui("pdtk_select_all_gop_widgets .x%lx %lx %d\n", diff --git a/pd/src/g_text.c b/pd/src/g_text.c index cb77f09b6..a937852d7 100644 --- a/pd/src/g_text.c +++ b/pd/src/g_text.c @@ -1631,7 +1631,7 @@ static void text_select(t_gobj *z, t_glist *glist, int state) } //sys_vgui(".x%lx.c addtag selected withtag %sR \n", // glist_getcanvas(glist), rtext_gettag(y)); - gui_vmess("gui_text_select", "xs", + gui_vmess("gui_gobj_select", "xs", glist_getcanvas(glist), rtext_gettag(y)); if (pd_class(&x->te_pd) == text_class && @@ -1671,7 +1671,7 @@ static void text_select(t_gobj *z, t_glist *glist, int state) } //sys_vgui(".x%lx.c dtag %sR selected\n", // glist_getcanvas(glist), rtext_gettag(y)); - gui_vmess("gui_text_deselect", "xs", + gui_vmess("gui_gobj_deselect", "xs", glist_getcanvas(glist), rtext_gettag(y)); -- GitLab