diff --git a/pd/nw/pd_canvas.html b/pd/nw/pd_canvas.html index 9a975903cf1463ddff63b51b66a84ed77d42c5fe..6b1296350730934c210ddb19a60c02231c78bd68 100644 --- a/pd/nw/pd_canvas.html +++ b/pd/nw/pd_canvas.html @@ -430,7 +430,7 @@ function nw_create_patch_window_menus (name) { editMenu.append(new nw.MenuItem({ label: l('menu.redo'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.redo_tt') })); @@ -540,8 +540,10 @@ function nw_create_patch_window_menus (name) { editMenu.append(new nw.MenuItem({ label: l('menu.tidyup'), - click: menu_generic, - key: 'a', + click: function() { + pdgui.pdsend(name + " tidy"); + }, + key: 'y', modifiers: "ctrl", tooltip: l('menu.tidyup_tt') })); @@ -549,7 +551,7 @@ function nw_create_patch_window_menus (name) { editMenu.append(new nw.MenuItem({ label: l('menu.tofront'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.tofront_tt'), })); @@ -557,7 +559,7 @@ function nw_create_patch_window_menus (name) { editMenu.append(new nw.MenuItem({ label: l('menu.toback'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.toback_tt'), })); @@ -569,7 +571,7 @@ function nw_create_patch_window_menus (name) { editMenu.append(new nw.MenuItem({ label: l('menu.font'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.font_tt'), })); @@ -579,7 +581,7 @@ function nw_create_patch_window_menus (name) { click: function() { pdgui.pdsend(name + " magicglass 0"); }, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.cordinspector_tt'), })); @@ -591,7 +593,7 @@ function nw_create_patch_window_menus (name) { editMenu.append(new nw.MenuItem({ label: l('menu.find'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.find_tt'), })); @@ -599,7 +601,7 @@ function nw_create_patch_window_menus (name) { editMenu.append(new nw.MenuItem({ label: l('menu.findagain'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.findagain') })); @@ -607,7 +609,7 @@ function nw_create_patch_window_menus (name) { editMenu.append(new nw.MenuItem({ label: l('menu.finderror'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.finderror_tt'), })); @@ -619,7 +621,7 @@ function nw_create_patch_window_menus (name) { editMenu.append(new nw.MenuItem({ label: l('menu.autotips'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.autotips_tt'), })); @@ -639,7 +641,7 @@ function nw_create_patch_window_menus (name) { editMenu.append(new nw.MenuItem({ label: l('menu.preferences'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.preferences_tt') })); @@ -856,7 +858,7 @@ proc menu_array {name} { // leaving out some placement logic... see pd.tk menu_graph pdgui.pdsend(name + " graph NULL 0 0 0 0 30 30 0 30"); }, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.graph_tt'), })); @@ -867,7 +869,7 @@ proc menu_array {name} { pdgui.pdsend(name + " dirty 1"); pdgui.pdsend(name + " menuarray"); }, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.array_tt'), })); @@ -906,7 +908,7 @@ proc menu_array {name} { winmanMenu.append(new nw.MenuItem({ label: l('menu.parentwin'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.parentwin_tt'), })); @@ -914,7 +916,7 @@ proc menu_array {name} { winmanMenu.append(new nw.MenuItem({ label: l('menu.pdwin'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.pdwin_tt'), })); @@ -956,7 +958,7 @@ proc menu_array {name} { mediaMenu.append(new nw.MenuItem({ label: l('menu.test'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.test_tt'), })); @@ -964,7 +966,7 @@ proc menu_array {name} { mediaMenu.append(new nw.MenuItem({ label: l('menu.loadmeter'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.loadmeter_tt'), })); @@ -990,7 +992,7 @@ proc menu_array {name} { helpMenu.append(new nw.MenuItem({ label: l('menu.manual'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.manual'), })); @@ -998,7 +1000,7 @@ proc menu_array {name} { helpMenu.append(new nw.MenuItem({ label: l('menu.browser'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.browser_tt'), })); @@ -1010,7 +1012,7 @@ proc menu_array {name} { helpMenu.append(new nw.MenuItem({ label: l('menu.l2ork_list'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.l2ork_list_tt'), })); @@ -1018,7 +1020,7 @@ proc menu_array {name} { helpMenu.append(new nw.MenuItem({ label: l('menu.pd_list'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.pd_list_tt'), })); @@ -1026,7 +1028,7 @@ proc menu_array {name} { helpMenu.append(new nw.MenuItem({ label: l('menu.forums'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.forums_tt'), })); @@ -1034,7 +1036,7 @@ proc menu_array {name} { helpMenu.append(new nw.MenuItem({ label: l('menu.irc'), click: menu_generic, - key: 'a', +// key: 'a', modifiers: "ctrl", tooltip: l('menu.irc_tt'), })); diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index 3e07180c0e9a3e155d342da6932d84eec24376c6..a7a5e07555e530ab4b9c31327b59c62e7bda9fae 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -2192,15 +2192,27 @@ return; } } +function elem_displace(elem, dx, dy) { + var t = elem.transform.baseVal.getItem(0); + t.matrix.e += dx; + t.matrix.f += dy; +} + + // used for tidy up +function gui_text_displace(name, tag, dx, dy) { + elem_displace(get_gobj(name, tag), dx, dy); +} + function gui_canvas_displace_withtag(name, dx, dy) { - var pwin = patchwin[name]; + var pwin = patchwin[name], i; var ol = pwin.window.document.getElementsByClassName('selected'); - for (var i = 0; i < ol.length; i++) { - var elem = ol[i].transform.baseVal.getItem(0); - var new_tx = dx + elem.matrix.e; - var new_ty = dy + elem.matrix.f; - elem.matrix.e = new_tx; - elem.matrix.f = new_ty; + for (i = 0; i < ol.length; i++) { + elem_displace(ol[i], dx, dy); +// var elem = ol[i].transform.baseVal.getItem(0); +// var new_tx = dx + elem.matrix.e; +// var new_ty = dy + elem.matrix.f; +// elem.matrix.e = new_tx; +// elem.matrix.f = new_ty; } // elem.setAttributeNS(null, 'transform', // 'translate(' + new_tx + ',' + new_ty + ')'); diff --git a/pd/src/g_text.c b/pd/src/g_text.c index 941afff2e7f8c47f12f79079f3869c2a3accc239..a7982b5049b70dde51d92b740a13167a8b79cfe8 100644 --- a/pd/src/g_text.c +++ b/pd/src/g_text.c @@ -1474,9 +1474,12 @@ static void text_displace(t_gobj *z, t_glist *glist, if (glist_isvisible(glist)) { t_rtext *y = glist_findrtext(glist, x); - rtext_displace(y, dx, dy); - text_drawborder(x, glist, rtext_gettag(y), - rtext_width(y), rtext_height(y), 0); + gui_vmess("gui_text_displace", "ssii", + canvas_tag(glist), rtext_gettag(y), dx, dy); +// t_rtext *y = glist_findrtext(glist, x); +// rtext_displace(y, dx, dy); +// text_drawborder(x, glist, rtext_gettag(y), +// rtext_width(y), rtext_height(y), 0); canvas_fixlinesfor(glist_getcanvas(glist), x); } }