From ebd189cb77758e6429fb138953318cb46567738a Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Wed, 7 Dec 2016 11:37:18 -0500 Subject: [PATCH] cleanup iemgui dialog form names, replacing dashes with underscores. Fix stray bugs in canvas dialog, and clean up css selector names --- pd/nw/css/c64.css | 10 +-- pd/nw/css/default.css | 10 +-- pd/nw/css/extended.css | 10 +-- pd/nw/css/inverted.css | 10 +-- pd/nw/css/strongbad.css | 10 +-- pd/nw/css/subdued.css | 10 +-- pd/nw/css/vanilla.css | 10 +-- pd/nw/css/vanilla_inverted.css | 10 +-- pd/nw/dialog_canvas.html | 26 ++++-- pd/nw/dialog_iemgui.html | 146 ++++++++++++++++----------------- pd/nw/pdgui.js | 1 + pd/src/g_all_guis.c | 4 +- pd/src/g_bang.c | 26 +++--- pd/src/g_canvas.c | 12 +-- pd/src/g_mycanvas.c | 28 +++---- pd/src/g_numbox.c | 30 +++---- pd/src/g_radio.c | 22 ++--- pd/src/g_slider.c | 26 +++--- pd/src/g_toggle.c | 22 ++--- pd/src/g_vumeter.c | 20 ++--- 20 files changed, 229 insertions(+), 214 deletions(-) diff --git a/pd/nw/css/c64.css b/pd/nw/css/c64.css index 9bdac3901..db2b8e856 100644 --- a/pd/nw/css/c64.css +++ b/pd/nw/css/c64.css @@ -405,19 +405,19 @@ label { width: 50%; } -input[name="x-offset"] { +input[name="x_offset"] { width: 2em; } -input[name="y-offset"] { +input[name="y_offset"] { width: 2em; } -input[name="send-symbol"] { +input[name="send_symbol"] { width: 8em; } -input[name="receive-symbol"] { +input[name="receive_symbol"] { width: 8em; } @@ -425,7 +425,7 @@ input[name="label"] { width: 8em; } -input[name="font-size"] { +input[name="font_size"] { width: 3em; } diff --git a/pd/nw/css/default.css b/pd/nw/css/default.css index 0b1512112..74f8761f2 100644 --- a/pd/nw/css/default.css +++ b/pd/nw/css/default.css @@ -536,19 +536,19 @@ label { width: 50%; } -input[name="x-offset"] { +input[name="x_offset"] { width: 2em; } -input[name="y-offset"] { +input[name="y_offset"] { width: 2em; } -input[name="send-symbol"] { +input[name="send_symbol"] { width: 8em; } -input[name="receive-symbol"] { +input[name="receive_symbol"] { width: 8em; } @@ -556,7 +556,7 @@ input[name="label"] { width: 8em; } -input[name="font-size"] { +input[name="font_size"] { width: 3em; } diff --git a/pd/nw/css/extended.css b/pd/nw/css/extended.css index 29d131436..57f6a7926 100644 --- a/pd/nw/css/extended.css +++ b/pd/nw/css/extended.css @@ -393,19 +393,19 @@ label { width: 50%; } -input[name="x-offset"] { +input[name="x_offset"] { width: 2em; } -input[name="y-offset"] { +input[name="y_offset"] { width: 2em; } -input[name="send-symbol"] { +input[name="send_symbol"] { width: 8em; } -input[name="receive-symbol"] { +input[name="receive_symbol"] { width: 8em; } @@ -413,7 +413,7 @@ input[name="label"] { width: 8em; } -input[name="font-size"] { +input[name="font_size"] { width: 3em; } diff --git a/pd/nw/css/inverted.css b/pd/nw/css/inverted.css index 32d15fcb4..768742e7d 100644 --- a/pd/nw/css/inverted.css +++ b/pd/nw/css/inverted.css @@ -419,19 +419,19 @@ label { width: 50%; } -input[name="x-offset"] { +input[name="x_offset"] { width: 2em; } -input[name="y-offset"] { +input[name="y_offset"] { width: 2em; } -input[name="send-symbol"] { +input[name="send_symbol"] { width: 8em; } -input[name="receive-symbol"] { +input[name="receive_symbol"] { width: 8em; } @@ -439,7 +439,7 @@ input[name="label"] { width: 8em; } -input[name="font-size"] { +input[name="font_size"] { width: 3em; } diff --git a/pd/nw/css/strongbad.css b/pd/nw/css/strongbad.css index d2c1b49cc..3363e3440 100644 --- a/pd/nw/css/strongbad.css +++ b/pd/nw/css/strongbad.css @@ -401,19 +401,19 @@ label { width: 50%; } -input[name="x-offset"] { +input[name="x_offset"] { width: 2em; } -input[name="y-offset"] { +input[name="y_offset"] { width: 2em; } -input[name="send-symbol"] { +input[name="send_symbol"] { width: 8em; } -input[name="receive-symbol"] { +input[name="receive_symbol"] { width: 8em; } @@ -421,7 +421,7 @@ input[name="label"] { width: 8em; } -input[name="font-size"] { +input[name="font_size"] { width: 3em; } diff --git a/pd/nw/css/subdued.css b/pd/nw/css/subdued.css index a0f24518d..bb2669bc5 100644 --- a/pd/nw/css/subdued.css +++ b/pd/nw/css/subdued.css @@ -400,19 +400,19 @@ label { width: 50%; } -input[name="x-offset"] { +input[name="x_offset"] { width: 2em; } -input[name="y-offset"] { +input[name="y_offset"] { width: 2em; } -input[name="send-symbol"] { +input[name="send_symbol"] { width: 8em; } -input[name="receive-symbol"] { +input[name="receive_symbol"] { width: 8em; } @@ -420,7 +420,7 @@ input[name="label"] { width: 8em; } -input[name="font-size"] { +input[name="font_size"] { width: 3em; } diff --git a/pd/nw/css/vanilla.css b/pd/nw/css/vanilla.css index 7872df055..9ea516797 100644 --- a/pd/nw/css/vanilla.css +++ b/pd/nw/css/vanilla.css @@ -394,19 +394,19 @@ label { width: 50%; } -input[name="x-offset"] { +input[name="x_offset"] { width: 2em; } -input[name="y-offset"] { +input[name="y_offset"] { width: 2em; } -input[name="send-symbol"] { +input[name="send_symbol"] { width: 8em; } -input[name="receive-symbol"] { +input[name="receive_symbol"] { width: 8em; } @@ -414,7 +414,7 @@ input[name="label"] { width: 8em; } -input[name="font-size"] { +input[name="font_size"] { width: 3em; } diff --git a/pd/nw/css/vanilla_inverted.css b/pd/nw/css/vanilla_inverted.css index 3b5591a17..943de4f46 100644 --- a/pd/nw/css/vanilla_inverted.css +++ b/pd/nw/css/vanilla_inverted.css @@ -399,19 +399,19 @@ label { width: 50%; } -input[name="x-offset"] { +input[name="x_offset"] { width: 2em; } -input[name="y-offset"] { +input[name="y_offset"] { width: 2em; } -input[name="send-symbol"] { +input[name="send_symbol"] { width: 8em; } -input[name="receive-symbol"] { +input[name="receive_symbol"] { width: 8em; } @@ -419,7 +419,7 @@ input[name="label"] { width: 8em; } -input[name="font-size"] { +input[name="font_size"] { width: 3em; } diff --git a/pd/nw/dialog_canvas.html b/pd/nw/dialog_canvas.html index 51fb25788..c8ee42060 100644 --- a/pd/nw/dialog_canvas.html +++ b/pd/nw/dialog_canvas.html @@ -139,7 +139,7 @@ <label class="array-name" data-i18n="[title]canvas.prop.array_name_tt"> <span data-i18n="canvas.prop.array_name"></span> - <input onchange="attr_change(this);" + <input onchange="update_array_attr(this);" class="array-name" type="text" name="array_name" @@ -148,7 +148,7 @@ <label class="array-size" data-i18n="[title]canvas.prop.array_size_tt"> <span data-i18n="canvas.prop.array_size"></span> - <input onchange="attr_change(this);" + <input onchange="update_array_attr(this);" class="array-size" type="text" name="array_size"> @@ -231,7 +231,7 @@ <div class="array-fill"> <label data-i18n="[title]canvas.prop.array_fill_tt"> - <input onchange="attr_change(this);" + <input onchange="update_array_attr(this);" type="color" name="array_fill"> <span data-i18n="canvas.prop.array_fill"></span> @@ -241,7 +241,7 @@ <div class="array-outline"> <label data-i18n="[title]canvas.prop.array_outline_tt"> - <input onchange="attr_change(this);" + <input onchange="update_array_attr(this);" type="color" name="array_outline"> <span data-i18n="canvas.prop.array_outline"></span> @@ -379,14 +379,28 @@ function array_delete_change(elem) { array_attr.array_delete = elem.checked; } -function attr_change(elem) { +// Placeholder for updating gop margins and coords when the dialog window +// is open. Ideally we want to keep a record of all changes so that clicking +// "Cancel" will undo all of the changes made inside the dialog. However this +// is non-trivial with the canvas dialog because of all the state changes +// one can make to an array in the same dialog. For that reason we replace the +// "Cancel" button with one called "Close". +// The function in pdgui to update the form fields when a user drags the +// dimensions and margins is also used for iemguis, which *do* have a "Cancel" +// button. So we just set up a dummy function here to adhere to that interface. +function update_attr(elem) { + // do nothing for now... +} + +function update_array_attr(elem) { var array_index, array_attr, arrays_select, name; arrays_select = document.getElementById("arrays_select"); array_attr = pd_garray_attrs[arrays_select.value]; name = elem.name; array_attr[name] = elem.value; if (elem.name === "array-fill") { - array-fill + // Not sure what this was for... + //array-fill } } diff --git a/pd/nw/dialog_iemgui.html b/pd/nw/dialog_iemgui.html index f53475d55..7825ffa8f 100644 --- a/pd/nw/dialog_iemgui.html +++ b/pd/nw/dialog_iemgui.html @@ -22,14 +22,14 @@ onchange="update_attr(this);"> </td> </tr> - <tr class="selection-size prop hidden"> + <tr class="selection_size prop hidden"> <td> <label data-i18n="[title]iem.select_size_tt"> <span data-i18n="iem.prop.select_size"></span> </label> </td> <td data-i18n="[title]iem.prop.select_size_tt"> - <input type="text" name="selection-size" + <input type="text" name="selection_size" onchange="update_attr(this);"> </td> </tr> @@ -44,14 +44,14 @@ onchange="update_attr(this);"> </td> </tr> - <tr class="nonzero-value prop hidden"> + <tr class="nonzero_value prop hidden"> <td> <label data-i18n="[title]iem.prop.nonzero_value_tt"> <span data-i18n="iem.prop.nonzero_value"></span> </label> </td> <td data-i18n="[title]iem.prop.nonzero_value_tt"> - <input type="text" name="nonzero-value" + <input type="text" name="nonzero_value" onchange="update_attr(this);"> </td> </tr> @@ -75,14 +75,14 @@ onchange="update_attr(this);"> </td> </tr> - <tr class="visible-width prop hidden"> + <tr class="visible_width prop hidden"> <td> <label data-i18n="[title]iem.prop.visible_width_tt"> <span data-i18n="iem.prop.visible_width"></span> </label> </td> <td data-i18n="[title]iem.prop.visible_width_tt"> - <input type="text" name="visible-width" + <input type="text" name="visible_width" onchange="update_attr(this);"> </td> <td> @@ -91,18 +91,18 @@ </label> </td> <td data-i18n="[title]iem.prop.visible_height_tt"> - <input type="text" name="visible-height" + <input type="text" name="visible_height" onchange="update_attr(this);"> </td> </tr> - <tr class="minimum-range prop pair hidden"> + <tr class="minimum_range prop pair hidden"> <td> <label data-i18n="[title]iem.prop.minimum_tt"> <span data-i18n="iem.prop.minimum"></span> </label> </td> <td data-i18n="[title]iem.prop.minimum_tt"> - <input type="text" name="minimum-range" + <input type="text" name="minimum_range" onchange="update_attr(this);"> </td> <td> @@ -110,19 +110,19 @@ <span data-i18n="iem.prop.maximum"></span> </label> </td> - <td data-i18n="[title]iem.prop.maximum_tt"> - <input type="text" name="maximum-range" + <td data-i18n="[title]iem.prop.max_mum_tt"> + <input type="text" name="maximum_range" onchange="update_attr(this);"> </td> </tr> - <tr class="flash-interrupt prop hidden"> + <tr class="flash_interrupt prop hidden"> <td> <label data-i18n="[title]iem.prop.flash_interrupt_tt"> <span data-i18n="iem.prop.flash_interrupt"></span> </label> </td> <td data-i18n="[title]iem.prop.flash_interrupt_tt"> - <input type="text" name="flash-interrupt" + <input type="text" name="flash_interrupt" onchange="update_attr(this);"> </td> <td> @@ -131,11 +131,11 @@ </label> </td> <td data-i18n="[title]iem.prop.flash_hold_tt"> - <input type="text" name="flash-hold" + <input type="text" name="flash_hold" onchange="update_attr(this);"> </td> </tr> - <tr class="log-height prop hidden"> + <tr class="log_height prop hidden"> <td></td><td></td> <td> <label data-i18n="[title]iem.prop.log_height_tt"> @@ -143,7 +143,7 @@ </label> </td> <td> - <input type="text" name="log-height" + <input type="text" name="log_height" onchange="update_attr(this);"> </td> </tr> @@ -158,27 +158,27 @@ <br> </div> - <div class="vu-scale prop hidden"> + <div class="vu_scale prop hidden"> <label data-i18n="[title]iem.prop.vu_scale_tt"> <span data-i18n="iem.prop.vu_scale"></span> - <input type="checkbox" name="vu-scale" value="on" + <input type="checkbox" name="vu_scale" value="on" onchange="update_attr(this);"> </label> <br> </div> - <div class="log-scaling prop hidden"> + <div class="log_scaling prop hidden"> <label data-i18n="[title]iem.prop.log_scale_tt"> - <input type="checkbox" name="log-scaling" value="on" + <input type="checkbox" name="log_scaling" value="on" onchange="update_attr(this);"> <span data-i18n="iem.prop.log_scale"></span> </label> <br> </div> - <div class="steady-on-click prop hidden"> + <div class="steady_on_click prop hidden"> <label data-i18n="[title]iem.prop.steady_tt"> - <input type="checkbox" name="steady-on-click" value="on" + <input type="checkbox" name="steady_on_click" value="on" onchange="update_attr(this);"> <span data-i18n="iem.prop.steady"></span> </label> @@ -190,25 +190,25 @@ <legend data-i18n="iem.prop.heading.messages"></legend> <table> - <tr class="send-symbol prop hidden"> + <tr class="send_symbol prop hidden"> <td> <label data-i18n="[title]iem.prop.send_tt"> <span data-i18n="iem.prop.send"></span> </label> </td> <td data-i18n="[title]iem.prop.send_tt"> - <input type="text" name="send-symbol" + <input type="text" name="send_symbol" onchange="update_attr(this);"> </td> <td> - <tr class="receive-symbol prop hidden"> + <tr class="receive_symbol prop hidden"> <td> <label data-i18n="[title]iem.prop.receive_tt"> <span data-i18n="iem.prop.receive"></span> </label> </td> <td data-i18n="[title]iem.prop.receive_tt"> - <input type="text" name="receive-symbol" + <input type="text" name="receive_symbol" onchange="update_attr(this);"> </td> <td> @@ -236,7 +236,7 @@ </label> </td> <td data-i18n="[title]iem.prop.xoffset_tt"> - <input type="text" name="x-offset" + <input type="text" name="x_offset" onchange="update_attr(this);"> </td> <td> @@ -245,17 +245,17 @@ </label> </td> <td data-i18n="[title]iem.prop.yoffset_tt"> - <input type="text" name="y-offset" + <input type="text" name="y_offset" onchange="update_attr(this);"> </td> </tr> - <tr class="font-style prop hidden"> + <tr class="font_style prop hidden"> <td> <label data-i18n="[title]iem.prop.font_tt"> <span data-i18n="iem.prop.font"></span> </td> <td data-i18n="[title]iem.prop.font_tt"> - <select name="font-style" + <select name="font_style" onchange="update_attr(this);"> <option>DejaVu Sans Mono</option> <option>Helvetica</option> @@ -265,7 +265,7 @@ <td colspan="4"> <label data-i18n="[title]iem.prop.fontsize_tt"> <span data-i18n="iem.prop.fontsize"></span> - <input type="text" name="font-size" + <input type="text" name="font_size" onchange="update_attr(this);"> <label> </td> @@ -276,27 +276,27 @@ <fieldset> <legend data-i18n="iem.prop.heading.colors"></legend> - <div class="background-color prop hidden"> + <div class="background_color prop hidden"> <label data-i18n="[title]iem.prop.bgcolor_tt"> - <input type="color" name="background-color" + <input type="color" name="background_color" onchange="update_attr(this);"> <span data-i18n="iem.prop.bgcolor"></span> </label> <br> </div> - <div class="foreground-color prop hidden"> + <div class="foreground_color prop hidden"> <label data-i18n="[title]iem.prop.fgcolor_tt"> - <input type="color" name="foreground-color" + <input type="color" name="foreground_color" onchange="update_attr(this);"> <span data-i18n="iem.prop.fgcolor"></span> </label> <br> </div> - <div class="label-color prop hidden"> + <div class="label_color prop hidden"> <label data-i18n="[title]iem.prop.label_color_tt"> - <input type="color" name="label-color" + <input type="color" name="label_color" onchange="update_attr(this);"> <span data-i18n="iem.prop.label_color"></span> </label> @@ -305,9 +305,9 @@ </fieldset> <div class="prop hidden"> - <input type="hidden" name="minimum-size"> - <input type="hidden" name="range-schedule"> - <input type="hidden" name="hide-frame"> + <input type="hidden" name="minimum_size"> + <input type="hidden" name="range_schedule"> + <input type="hidden" name="hide_frame"> </div> <div class="submit_buttons"> @@ -391,15 +391,15 @@ function send_params(attrs, create_undo_point) { iemgui_clip_fontsize $id */ - var send_symbol = attrs["send-symbol"], - receive_symbol = attrs["receive-symbol"], + var send_symbol = attrs.send_symbol, + receive_symbol = attrs.receive_symbol, label = attrs["label"]; send_symbol = pd_symbol_carwash(send_symbol); receive_symbol = pd_symbol_carwash(receive_symbol); label = pd_symbol_carwash(label); - var label_x_offset = attrs["x-offset"]; - var label_y_offset = attrs["y-offset"]; + var label_x_offset = attrs.x_offset; + var label_y_offset = attrs.y_offset; // make sure the offset boxes have a value if (!label_x_offset) { @@ -412,52 +412,52 @@ function send_params(attrs, create_undo_point) { var height, width; var size = attrs["size"]; if (size === undefined) { - size = attrs["selection-size"]; + size = attrs.selection_size; } if (size !== undefined) { width = size; height = size; } else { - width = attrs["width"]; - height = attrs["height"]; + width = attrs.width; + height = attrs.height; } - var slot3 = attrs["minimum-range"]; - var slot4 = attrs["maximum-range"]; + var slot3 = attrs.minimum_range; + var slot4 = attrs.maximum_range; if (slot3 === undefined) { - slot3 = attrs["flash-interrupt"]; - slot4 = attrs["flash-hold"]; + slot3 = attrs.flash_interrupt; + slot4 = attrs.flash_hold; } if (slot3 === undefined) { - slot3 = attrs["visible-width"]; - slot4 = attrs["visible-height"]; + slot3 = attrs.visible_width; + slot4 = attrs.visible_height; } if (slot3 === undefined) { // toggle - slot3 = attrs["nonzero-value"]; + slot3 = attrs.nonzero_value; if (slot3 === undefined) { slot3 = 0; } slot4 = 0; } - var slot5 = attrs["log-scaling"] ? +attrs["log-scaling"] : 0; - // Hack to accomodate the vu-scale property, which exists in the same + var slot5 = attrs.log_scaling ? +attrs.log_scaling : 0; + // Hack to accomodate the vu_scale property, which exists in the same // slot as this one - var log_scaling_div = document.querySelector(".log-scaling"); + var log_scaling_div = document.querySelector(".log_scaling"); var no_log_display = log_scaling_div.classList.contains("hidden"); if (no_log_display) { - slot5 = attrs["vu-scale"] ? +attrs["vu-scale"] : 0; + slot5 = attrs.vu_scale ? +attrs.vu_scale : 0; } var init = +attrs["init"]; if (!init) { init = 0; } - var slot7 = attrs["log-height"]; + var slot7 = attrs.log_height; if (slot7 === undefined) { slot7 = attrs["number"]; } @@ -465,34 +465,34 @@ function send_params(attrs, create_undo_point) { slot7 = 0; } - var font_style = attrs["font-style"]; + var font_style = attrs.font_style; //if (font_style !== null) { font_style = 0; } - var font_size = attrs["font-size"]; + var font_size = attrs.font_size; if (font_size === undefined) { font_size = 0; } // [vu] doesn't have a foreground color - var foreground_color = attrs["foreground-color"] ? - attrs["foreground-color"] : 0; - var background_color = attrs["background-color"]; - var label_color = attrs["label-color"]; + var foreground_color = attrs.foreground_color ? + attrs.foreground_color : 0; + var background_color = attrs.background_color; + var label_color = attrs.label_color; - var slot18 = attrs["steady-on-click"] ? +attrs["steady-on-click"] : 0; + var slot18 = attrs.steady_on_click ? +attrs.steady_on_click : 0; pdgui.pdsend(pd_object_callback, "dialog", width, height, - slot3, // bng: flash-interrupt - // slider: min-range - // toggle: nonzero-value + slot3, // bng: flash_interrupt + // slider: min_range + // toggle: nonzero_value // my_canvas: visible_width - slot4, // bng: flash-hold - // slider: max-range + slot4, // bng: flash_hold + // slider: max_range // my_canvas: visible_height slot5, // slider: lin/log thingy // nbx: lin/log - // vu: vu-scale + // vu: vu_scale init, - slot7, // log-height or vradio/hradio number + slot7, // log_height or vradio/hradio number send_symbol, receive_symbol, label, label_x_offset, label_y_offset, font_style, font_size, diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index 03392b089..e92043279 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -4200,6 +4200,7 @@ function gui_iemgui_dialog(did, attr_array) { function gui_dialog_set_field(did, field_name, value) { var elem = dialogwin[did].window.document.getElementsByName(field_name)[0]; elem.value = value; + dialogwin[did].window.update_attr(elem); } // Used when undoing a font size change when the font dialog is open diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c index c264c3780..80640fc7b 100644 --- a/pd/src/g_all_guis.c +++ b/pd/src/g_all_guis.c @@ -819,8 +819,8 @@ void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y) { { int new_x = x->x_ldx + h->h_dragx; int new_y = x->x_ldy + h->h_dragy; - properties_set_field_int(properties, "x-offset", new_x); - properties_set_field_int(properties, "y-offset", new_y); + properties_set_field_int(properties, "x_offset", new_x); + properties_set_field_int(properties, "y_offset", new_y); } x->x_ldx += dx; x->x_ldy += dy; diff --git a/pd/src/g_bang.c b/pd/src/g_bang.c index c03552f87..b07e90efa 100644 --- a/pd/src/g_bang.c +++ b/pd/src/g_bang.c @@ -263,49 +263,49 @@ static void bng_properties(t_gobj *z, t_glist *owner) gui_s("size"); gui_i(x->x_gui.x_w); - gui_s("minimum-size"); + gui_s("minimum_size"); gui_i(IEM_GUI_MINSIZE); - gui_s("range-schedule"); // no idea what this is... + gui_s("range_schedule"); // no idea what this is... gui_i(2); - gui_s("flash-interrupt"); + gui_s("flash_interrupt"); gui_i(x->x_flashtime_break); - gui_s("flash-hold"); + gui_s("flash_hold"); gui_i(x->x_flashtime_hold); gui_s("init"); gui_i(x->x_gui.x_loadinit); - gui_s("send-symbol"); + gui_s("send_symbol"); gui_s(srl[0]->s_name); - gui_s("receive-symbol"); + gui_s("receive_symbol"); gui_s(srl[1]->s_name); gui_s("label"); gui_s(srl[2]->s_name); - gui_s("x-offset"); + gui_s("x_offset"); gui_i(x->x_gui.x_ldx); - gui_s("y-offset"); + gui_s("y_offset"); gui_i(x->x_gui.x_ldy); - gui_s("font-style"); + gui_s("font_style"); gui_i(x->x_gui.x_font_style); - gui_s("font-size"); + gui_s("font_size"); gui_i(x->x_gui.x_fontsize); - gui_s("background-color"); + gui_s("background_color"); gui_i(0xffffff & x->x_gui.x_bcol); - gui_s("foreground-color"); + gui_s("foreground_color"); gui_i(0xffffff & x->x_gui.x_fcol); - gui_s("label-color"); + gui_s("label_color"); gui_i(0xffffff & x->x_gui.x_lcol); gui_end_array(); diff --git a/pd/src/g_canvas.c b/pd/src/g_canvas.c index e36703d6d..30172e9b0 100644 --- a/pd/src/g_canvas.c +++ b/pd/src/g_canvas.c @@ -2257,8 +2257,8 @@ void canvasgop__clickhook(t_scalehandle *sh, int newstate) int properties = gfxstub_haveproperties((void *)x); if (properties) { - properties_set_field_int(properties,"n.canvasdialog.x.f2.entry3",x->gl_pixwidth); - properties_set_field_int(properties,"n.canvasdialog.y.f2.entry3",x->gl_pixheight); + properties_set_field_int(properties,"x-pix",x->gl_pixwidth); + properties_set_field_int(properties,"y-pix",x->gl_pixheight); } if (glist_isvisible(x)) @@ -2351,9 +2351,9 @@ void canvasgop__motionhook(t_scalehandle *sh, t_floatarg mouse_x, if (properties) { properties_set_field_int(properties, - "n.canvasdialog.x.f2.entry3",x->gl_pixwidth + sh->h_dragx); + "x-pix",x->gl_pixwidth + sh->h_dragx); properties_set_field_int(properties, - "n.canvasdialog.y.f2.entry3",x->gl_pixheight + sh->h_dragy); + "y-pix",x->gl_pixheight + sh->h_dragy); } } else //enter if move_gop hook @@ -2362,9 +2362,9 @@ void canvasgop__motionhook(t_scalehandle *sh, t_floatarg mouse_x, if (properties) { properties_set_field_int(properties, - "n.canvasdialog.x.f2.entry4",x->gl_xmargin + dx); + "x-margin",x->gl_xmargin + dx); properties_set_field_int(properties, - "n.canvasdialog.y.f2.entry4",x->gl_ymargin + dy); + "y-margin",x->gl_ymargin + dy); } x->gl_xmargin += dx; x->gl_ymargin += dy; diff --git a/pd/src/g_mycanvas.c b/pd/src/g_mycanvas.c index e51690b31..fc5ee264a 100644 --- a/pd/src/g_mycanvas.c +++ b/pd/src/g_mycanvas.c @@ -192,24 +192,24 @@ static void my_canvas_properties(t_gobj *z, t_glist *owner) gui_start_array(); gui_s("type"); gui_s("cnv"); - gui_s("selection-size"); gui_i(x->x_gui.x_w); - gui_s("visible-width"); gui_i(x->x_vis_w); - gui_s("visible-height"); gui_i(x->x_vis_h); - gui_s("minimum-size"); gui_i(IEM_GUI_MINSIZE); + gui_s("selection_size"); gui_i(x->x_gui.x_w); + gui_s("visible_width"); gui_i(x->x_vis_w); + gui_s("visible_height"); gui_i(x->x_vis_h); + gui_s("minimum_size"); gui_i(IEM_GUI_MINSIZE); - gui_s("range-schedule"); // no idea what this is... + gui_s("range_schedule"); // no idea what this is... gui_i(0); - gui_s("send-symbol"); gui_s(srl[0]->s_name); - gui_s("receive-symbol"); gui_s(srl[1]->s_name); + gui_s("send_symbol"); gui_s(srl[0]->s_name); + gui_s("receive_symbol"); gui_s(srl[1]->s_name); gui_s("label"); gui_s(srl[2]->s_name); - gui_s("x-offset"); gui_i(x->x_gui.x_ldx); - gui_s("y-offset"); gui_i(x->x_gui.x_ldy); - gui_s("font-style"); gui_i(x->x_gui.x_font_style); - gui_s("font-size"); gui_i(x->x_gui.x_fontsize); - gui_s("background-color"); gui_i(0xffffff & x->x_gui.x_bcol); - gui_s("foreground-color"); gui_i(0xffffff & x->x_gui.x_fcol); - gui_s("label-color"); gui_i(0xffffff & x->x_gui.x_lcol); + gui_s("x_offset"); gui_i(x->x_gui.x_ldx); + gui_s("y_offset"); gui_i(x->x_gui.x_ldy); + gui_s("font_style"); gui_i(x->x_gui.x_font_style); + gui_s("font_size"); gui_i(x->x_gui.x_fontsize); + gui_s("background_color"); gui_i(0xffffff & x->x_gui.x_bcol); + gui_s("foreground_color"); gui_i(0xffffff & x->x_gui.x_fcol); + gui_s("label_color"); gui_i(0xffffff & x->x_gui.x_lcol); gui_end_array(); gui_end_vmess(); diff --git a/pd/src/g_numbox.c b/pd/src/g_numbox.c index 890b6928a..a46532bcc 100644 --- a/pd/src/g_numbox.c +++ b/pd/src/g_numbox.c @@ -349,7 +349,7 @@ static void my_numbox__motionhook(t_scalehandle *sh, { properties_set_field_int(properties,"width",x->x_scalewidth); properties_set_field_int(properties,"height",x->x_scaleheight); - properties_set_field_int(properties,"font-size",x->x_tmpfontsize); + properties_set_field_int(properties,"font_size",x->x_tmpfontsize); } } scalehandle_dragon_label(sh,mouse_x, mouse_y); @@ -478,22 +478,22 @@ static void my_numbox_properties(t_gobj *z, t_glist *owner) gui_s("type"); gui_s("nbx"); gui_s("width"); gui_i(x->x_gui.x_w); gui_s("height"); gui_i(x->x_gui.x_h); - gui_s("minimum-range"); gui_f(x->x_min); - gui_s("maximum-range"); gui_f(x->x_max); - gui_s("log-scaling"); gui_i(x->x_lin0_log1); - gui_s("log-height"); gui_i(x->x_log_height); + gui_s("minimum_range"); gui_f(x->x_min); + gui_s("maximum_range"); gui_f(x->x_max); + gui_s("log_scaling"); gui_i(x->x_lin0_log1); + gui_s("log_height"); gui_i(x->x_log_height); gui_s("init"); gui_i(x->x_gui.x_loadinit); - gui_s("send-symbol"); gui_s(srl[0]->s_name); - gui_s("receive-symbol"); gui_s(srl[1]->s_name); + gui_s("send_symbol"); gui_s(srl[0]->s_name); + gui_s("receive_symbol"); gui_s(srl[1]->s_name); gui_s("label"); gui_s(srl[2]->s_name); - gui_s("x-offset"); gui_i(x->x_gui.x_ldx); - gui_s("y-offset"); gui_i(x->x_gui.x_ldy); - gui_s("font-style"); gui_i(x->x_gui.x_font_style); - gui_s("font-size"); gui_i(x->x_gui.x_fontsize); - gui_s("background-color"); gui_i(0xffffff & x->x_gui.x_bcol); - gui_s("foreground-color"); gui_i(0xffffff & x->x_gui.x_fcol); - gui_s("label-color"); gui_i(0xffffff & x->x_gui.x_lcol); - gui_s("hide-frame"); gui_i(x->x_hide_frame); + gui_s("x_offset"); gui_i(x->x_gui.x_ldx); + gui_s("y_offset"); gui_i(x->x_gui.x_ldy); + gui_s("font_style"); gui_i(x->x_gui.x_font_style); + gui_s("font_size"); gui_i(x->x_gui.x_fontsize); + gui_s("background_color"); gui_i(0xffffff & x->x_gui.x_bcol); + gui_s("foreground_color"); gui_i(0xffffff & x->x_gui.x_fcol); + gui_s("label_color"); gui_i(0xffffff & x->x_gui.x_lcol); + gui_s("hide_frame"); gui_i(x->x_hide_frame); gui_end_array(); gui_end_vmess(); } diff --git a/pd/src/g_radio.c b/pd/src/g_radio.c index b04d85b69..6a7f2e0a6 100644 --- a/pd/src/g_radio.c +++ b/pd/src/g_radio.c @@ -252,9 +252,9 @@ static void radio_properties(t_gobj *z, t_glist *owner) gui_s("type"); gui_s(x->x_orient ? "vradio" : "hradio"); gui_s("size"); gui_i(x->x_gui.x_w); - gui_s("minimum-size"); gui_i(IEM_GUI_MINSIZE); + gui_s("minimum_size"); gui_i(IEM_GUI_MINSIZE); - gui_s("range-schedule"); // no idea what this is... + gui_s("range_schedule"); // no idea what this is... gui_i(0); gui_s("hchange"); // no idea... @@ -262,16 +262,16 @@ static void radio_properties(t_gobj *z, t_glist *owner) gui_s("init"); gui_i(x->x_gui.x_loadinit); gui_s("number"); gui_i(x->x_number); - gui_s("send-symbol"); gui_s(srl[0]->s_name); - gui_s("receive-symbol"); gui_s(srl[1]->s_name); + gui_s("send_symbol"); gui_s(srl[0]->s_name); + gui_s("receive_symbol"); gui_s(srl[1]->s_name); gui_s("label"); gui_s(srl[2]->s_name); - gui_s("x-offset"); gui_i(x->x_gui.x_ldx); - gui_s("y-offset"); gui_i(x->x_gui.x_ldy); - gui_s("font-style"); gui_i(x->x_gui.x_font_style); - gui_s("font-size"); gui_i(x->x_gui.x_fontsize); - gui_s("background-color"); gui_i(0xffffff & x->x_gui.x_bcol); - gui_s("foreground-color"); gui_i(0xffffff & x->x_gui.x_fcol); - gui_s("label-color"); gui_i(0xffffff & x->x_gui.x_lcol); + gui_s("x_offset"); gui_i(x->x_gui.x_ldx); + gui_s("y_offset"); gui_i(x->x_gui.x_ldy); + gui_s("font_style"); gui_i(x->x_gui.x_font_style); + gui_s("font_size"); gui_i(x->x_gui.x_fontsize); + gui_s("background_color"); gui_i(0xffffff & x->x_gui.x_bcol); + gui_s("foreground_color"); gui_i(0xffffff & x->x_gui.x_fcol); + gui_s("label_color"); gui_i(0xffffff & x->x_gui.x_lcol); gui_end_array(); gui_end_vmess(); diff --git a/pd/src/g_slider.c b/pd/src/g_slider.c index 41e015dc1..cc061b6f3 100644 --- a/pd/src/g_slider.c +++ b/pd/src/g_slider.c @@ -283,21 +283,21 @@ static void slider_properties(t_gobj *z, t_glist *owner) gui_s("type"); gui_s(x->x_orient ? "vsl" : "hsl"); gui_s("width"); gui_i(x->x_gui.x_w); gui_s("height"); gui_i(x->x_gui.x_h); - gui_s("minimum-range"); gui_f(x->x_min); - gui_s("maximum-range"); gui_f(x->x_max); - gui_s("log-scaling"); gui_i(x->x_lin0_log1); + gui_s("minimum_range"); gui_f(x->x_min); + gui_s("maximum_range"); gui_f(x->x_max); + gui_s("log_scaling"); gui_i(x->x_lin0_log1); gui_s("init"); gui_i(x->x_gui.x_loadinit); - gui_s("steady-on-click"); gui_i(x->x_steady); - gui_s("send-symbol"); gui_s(srl[0]->s_name); - gui_s("receive-symbol"); gui_s(srl[1]->s_name); + gui_s("steady_on_click"); gui_i(x->x_steady); + gui_s("send_symbol"); gui_s(srl[0]->s_name); + gui_s("receive_symbol"); gui_s(srl[1]->s_name); gui_s("label"); gui_s(srl[2]->s_name); - gui_s("x-offset"); gui_i(x->x_gui.x_ldx); - gui_s("y-offset"); gui_i(x->x_gui.x_ldy); - gui_s("font-style"); gui_i(x->x_gui.x_font_style); - gui_s("font-size"); gui_i(x->x_gui.x_fontsize); - gui_s("background-color"); gui_i(0xffffff & x->x_gui.x_bcol); - gui_s("foreground-color"); gui_i(0xffffff & x->x_gui.x_fcol); - gui_s("label-color"); gui_i(0xffffff & x->x_gui.x_lcol); + gui_s("x_offset"); gui_i(x->x_gui.x_ldx); + gui_s("y_offset"); gui_i(x->x_gui.x_ldy); + gui_s("font_style"); gui_i(x->x_gui.x_font_style); + gui_s("font_size"); gui_i(x->x_gui.x_fontsize); + gui_s("background_color"); gui_i(0xffffff & x->x_gui.x_bcol); + gui_s("foreground_color"); gui_i(0xffffff & x->x_gui.x_fcol); + gui_s("label_color"); gui_i(0xffffff & x->x_gui.x_lcol); gui_end_array(); gui_end_vmess(); diff --git a/pd/src/g_toggle.c b/pd/src/g_toggle.c index c5de31838..9292f1d08 100644 --- a/pd/src/g_toggle.c +++ b/pd/src/g_toggle.c @@ -219,10 +219,10 @@ static void toggle_properties(t_gobj *z, t_glist *owner) gui_s("size"); gui_i(x->x_gui.x_w); - gui_s("minimum-size"); + gui_s("minimum_size"); gui_i(IEM_GUI_MINSIZE); - gui_s("nonzero-value"); + gui_s("nonzero_value"); gui_f(x->x_nonzero); gui_s("nonzero_schedule"); // no idea what this is... @@ -231,34 +231,34 @@ static void toggle_properties(t_gobj *z, t_glist *owner) gui_s("init"); gui_i(x->x_gui.x_loadinit); - gui_s("send-symbol"); + gui_s("send_symbol"); gui_s(srl[0]->s_name); - gui_s("receive-symbol"); + gui_s("receive_symbol"); gui_s(srl[1]->s_name); gui_s("label"); gui_s(srl[2]->s_name); - gui_s("x-offset"); + gui_s("x_offset"); gui_i(x->x_gui.x_ldx); - gui_s("y-offset"); + gui_s("y_offset"); gui_i(x->x_gui.x_ldy); - gui_s("font-style"); + gui_s("font_style"); gui_i(x->x_gui.x_font_style); - gui_s("font-size"); + gui_s("font_size"); gui_i(x->x_gui.x_fontsize); - gui_s("background-color"); + gui_s("background_color"); gui_i(0xffffff & x->x_gui.x_bcol); - gui_s("foreground-color"); + gui_s("foreground_color"); gui_i(0xffffff & x->x_gui.x_fcol); - gui_s("label-color"); + gui_s("label_color"); gui_i(0xffffff & x->x_gui.x_lcol); gui_end_array(); diff --git a/pd/src/g_vumeter.c b/pd/src/g_vumeter.c index a3365d178..159e385d7 100644 --- a/pd/src/g_vumeter.c +++ b/pd/src/g_vumeter.c @@ -522,21 +522,21 @@ static void vu_properties(t_gobj *z, t_glist *owner) gui_s("width"); gui_i(x->x_gui.x_w); gui_s("height"); gui_i(x->x_gui.x_h); - gui_s("vu-scale"); gui_i(x->x_scale); + gui_s("vu_scale"); gui_i(x->x_scale); - gui_s("minimum-size"); gui_i(IEM_GUI_MINSIZE); + gui_s("minimum_size"); gui_i(IEM_GUI_MINSIZE); - gui_s("range-schedule"); // no idea what this is... + gui_s("range_schedule"); // no idea what this is... gui_i(2); - gui_s("receive-symbol"); gui_s(srl[1]->s_name); + gui_s("receive_symbol"); gui_s(srl[1]->s_name); gui_s("label"); gui_s(srl[2]->s_name); - gui_s("x-offset"); gui_i(x->x_gui.x_ldx); - gui_s("y-offset"); gui_i(x->x_gui.x_ldy); - gui_s("font-style"); gui_i(x->x_gui.x_font_style); - gui_s("font-size"); gui_i(x->x_gui.x_fontsize); - gui_s("background-color"); gui_i(0xffffff & x->x_gui.x_bcol); - gui_s("label-color"); gui_i(0xffffff & x->x_gui.x_lcol); + gui_s("x_offset"); gui_i(x->x_gui.x_ldx); + gui_s("y_offset"); gui_i(x->x_gui.x_ldy); + gui_s("font_style"); gui_i(x->x_gui.x_font_style); + gui_s("font_size"); gui_i(x->x_gui.x_fontsize); + gui_s("background_color"); gui_i(0xffffff & x->x_gui.x_bcol); + gui_s("label_color"); gui_i(0xffffff & x->x_gui.x_lcol); gui_end_array(); gui_end_vmess(); -- GitLab