dialog_prefs.html 20.5 KB
Newer Older
pokergaming's avatar
pokergaming committed
1
2
3
<!DOCTYPE html>
<html>
  <head>
4
    <link id="page_style" rel="stylesheet" type="text/css" href="css/default.css">
pokergaming's avatar
pokergaming committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  </head>
  <body>
    <div class="container noselect">
      <div class="menu">
        <span data-i18n="[title]prefs.heading.audio_tt">
          <a onclick="display_pref('audio');"
             data-i18n="prefs.heading.audio">
          </a> 
        </span>
        <span data-i18n="[title]prefs.heading.midi_tt">
          <a onclick="display_pref('midi');"
             data-i18n="prefs.heading.midi"></a> 
        </span>
        <span data-i18n="[title]prefs.heading.gui_tt">
          <a onclick="display_pref('gui');"
             data-i18n="prefs.heading.gui"></a> 
        </span>
      </div>

      <fieldset id="audio">
        <legend data-i18n="prefs.heading.audio"></legend>
26
        <select id="audio_api" onchange="change_api(this);">
27
28
        </select>
        <br/>
29
        <label data-i18n="[title]prefs.audio.sr_tt">
30
          <span data-i18n="prefs.audio.sr"></span>
31
32
33
34
          <input type="text"
                 id="rate"
                 name="rate"
                 onchange="attr_change(this);">
35
36
        </label>
        <br/>
37
        <label data-i18n="[title]prefs.audio.advance_tt">
38
          <span data-i18n="prefs.audio.advance"></span>
39
40
41
42
          <input type="text"
                 id="advance"
                 name="advance"
                 onchange="attr_change(this);">
43
        </label>
44
45
46
47
48
49
50
        <br/>
        <div id="callback_container" class="hidden">
          <label data-i18n="[title]prefs.audio.callback_tt">
            <span data-i18n="prefs.audio.callback"></span>
            <input type="checkbox" id="callback" name="callback">
          </label>
        </div>
51

52
53
        <select id="blocksize"
                onchange="attr_change(this);">
54
55
56
57
58
59
          <option value="64">64</option>
          <option value="128">128</option>
          <option value="256">256</option>
          <option value="512">512</option>
          <option value="1024">1024</option>
          <option value="2048">2048</option>
pokergaming's avatar
pokergaming committed
60
        </select>
61
        <br/>
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
        <table>
          <tr>
            <td>
              Input Devices
            </td>
            <td>
              <span data-i18n="prefs.audio.channels"></span>
            </td>
          </tr>
          <tr>
            <td>
              <select id="in1" onchange="dev_change(this);"></select>
            </td>
            <td>
              <label data-i18n="[title]prefs.audio.channels_tt">
                <input type="text"
78
79
80
                 id="inchans1"
                 name="inchans1"
                 onchange="dev_change(this);">
81
82
83
84
85
86
87
88
89
90
              </label>
            </td>
          </tr>
          <tr>
            <td>
              <select id="in2" onchange="dev_change(this);"></select>
            </td>
            <td>
              <label data-i18n="[title]prefs.audio.channels_tt">
                <input type="text"
91
92
93
                 id="inchans2"
                 name="inchans2"
                 onchange="dev_change(this);">
94
95
96
97
98
99
100
101
102
103
              </label>
            </td>
          </tr>
          <tr>
            <td>
              <select id="in3" onchange="dev_change(this);"></select>
            </td>
            <td>
              <label data-i18n="[title]prefs.audio.channels_tt">
                <input type="text"
104
105
106
                 id="inchans3"
                 name="inchans3"
                 onchange="dev_change(this);">
107
108
109
110
111
112
113
114
115
116
              </label>
            </td>
          </tr>
          <tr>
            <td>
              <select id="in4" onchange="dev_change(this);"></select>
            </td>
            <td>
              <label data-i18n="[title]prefs.audio.channels_tt">
                <input type="text"
117
118
119
                 id="inchans4"
                 name="inchans4"
                 onchange="dev_change(this);">
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
              </label>
            </td>
          </tr>
          <tr>
            <td>
              Output Devices
            </td>
            <td>
              <span data-i18n="prefs.audio.channels"></span>
            </td>
          </tr>
          <tr>
            <td>
              <select id="out1" onchange="dev_change(this);"></select>
            </td>
            <td>
              <label data-i18n="[title]prefs.audio.channels_tt">
                <input type="text"
138
139
140
                 id="outchans1"
                 name="outchans1"
                 onchange="dev_change(this);">
141
142
143
144
145
146
147
148
149
150
              </label>
            </td>
          </tr>
          <tr>
            <td>
              <select id="out2" onchange="dev_change(this);"></select>
            </td>
            <td>
              <label data-i18n="[title]prefs.audio.channels_tt">
                <input type="text"
151
152
153
                 id="outchans2"
                 name="outchans2"
                 onchange="dev_change(this);">
154
155
156
157
158
159
160
161
162
163
              </label>
            </td>
          </tr>
          <tr>
            <td>
              <select id="out3" onchange="dev_change(this);"></select>
            </td>
            <td>
              <label data-i18n="[title]prefs.audio.channels_tt">
                <input type="text"
164
165
166
                 id="outchans3"
                 name="outchans3"
                 onchange="dev_change(this);">
167
168
169
170
171
172
173
174
175
176
              </label>
            </td>
          </tr>
          <tr>
            <td>
              <select id="out4" onchange="dev_change(this);"></select>
            </td>
            <td>
              <label data-i18n="[title]prefs.audio.channels_tt">
                <input type="text"
177
178
179
                 id="outchans4"
                 name="outchans4"
                 onchange="dev_change(this);">
180
181
182
183
              </label>
            </td>
          </tr>
        </table>
184

pokergaming's avatar
pokergaming committed
185
186
187
188
      </fieldset>

      <fieldset id="midi">
        <legend data-i18n="prefs.heading.midi"></legend>
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
        <select id="midi_api" onchange="change_api(this);">
        </select>
        <br/>
        <select id="midi_in1" onchange="dev_change(this);"></select>
        <br/>
        <select id="midi_in2" onchange="dev_change(this);"></select>
        <br/>
        <select id="midi_in3" onchange="dev_change(this);"></select>
        <br/>
        <select id="midi_in4" onchange="dev_change(this);"></select>
        <br/>

        <select id="midi_out1" onchange="dev_change(this);"></select>
        <br/>
        <select id="midi_out2" onchange="dev_change(this);"></select>
        <br/>
        <select id="midi_out3" onchange="dev_change(this);"></select>
        <br/>
        <select id="midi_out4" onchange="dev_change(this);"></select>
        <br/>

pokergaming's avatar
pokergaming committed
210
211
212
213
214
215
216
217
      </fieldset>

      <fieldset id="gui">
        <legend data-i18n="prefs.heading.gui"></legend>

          <label data-i18n="[title]prefs.gui.presets.gui_preset_tt">
            <span data-i18n="prefs.gui.presets.gui_preset"></span>
          </label>
218
219
          <select id="gui_preset" onchange="gui_preset_change(this);">
            <option data-i18n="prefs.gui.presets.default" value="default">
pokergaming's avatar
pokergaming committed
220
            </option>
221
222
            <option data-i18n="prefs.gui.presets.inverted" value="inverted">
            </option>
223
            <option data-i18n="prefs.gui.presets.vanilla" value="vanilla">
pokergaming's avatar
pokergaming committed
224
            </option>
225
226
            <option data-i18n="prefs.gui.presets.vanilla_inverted" value="vanilla_inverted">
            </option>
227
            <option data-i18n="prefs.gui.presets.extended" value="extended">
pokergaming's avatar
pokergaming committed
228
            </option>
Jonathan Wilkes's avatar
Jonathan Wilkes committed
229
            <option data-i18n="prefs.gui.presets.c64" value="c64">
230
            </option>
Jonathan Wilkes's avatar
Jonathan Wilkes committed
231
232
            <option data-i18n="prefs.gui.presets.subdued" value="subdued">
            </option>
Jonathan Wilkes's avatar
Jonathan Wilkes committed
233
234
            <option data-i18n="prefs.gui.presets.extended" value="extended">
            </option>
Jonathan Wilkes's avatar
Jonathan Wilkes committed
235
236
            <option data-i18n="prefs.gui.presets.strongbad" value="strongbad">
            </option>
pokergaming's avatar
pokergaming committed
237
238
239
240
          </select>

      </fieldset>

241
242
243
244
245
246
247
248
249
250
251
252
253

    <div class="submit_buttons">
      <button type="button" onClick="ok()" data-i18n="[title]prefs.ok_tt">
        <span data-i18n="prefs.ok"></span>
      </button>
      <button type="button" onClick="apply()" data-i18n="[title]prefs.apply_tt">
      <span data-i18n="prefs.apply"></span>
      </button>
      <button type="button" onClick="cancel()" data-i18n="[title]prefs.cancel_tt">
      <span data-i18n="prefs.cancel"></span>
      </button>
      </div>

pokergaming's avatar
pokergaming committed
254
255
    </div>
  <script>
256
"use strict";
257
var gui = require("nw.gui"); 
258
var pdgui = require("./pdgui.js");
pokergaming's avatar
pokergaming committed
259

260
261
// For translations
var l = pdgui.get_local_string;
pokergaming's avatar
pokergaming committed
262

263
264
// Gui presets
pdgui.skin.apply(this);
pokergaming's avatar
pokergaming committed
265

266
var pd_object_callback;
pokergaming's avatar
pokergaming committed
267

268
269
var pd_audio_attrs;
var pd_midi_attrs;
pokergaming's avatar
pokergaming committed
270

271
272
273
274
function ok() {
    apply();
    cancel();
}
pokergaming's avatar
pokergaming committed
275

276
function display_pref(type) {
277
    pdgui.post("here i am with " + type);
278
    var all, i, this_elem;
279
    all = document.getElementsByTagName("fieldset");
280
281
    this_elem = document.getElementById(type);
    for (i = 0; i < all.length; i++) {
282
        all[i].style.setProperty("display", "none");
pokergaming's avatar
pokergaming committed
283
    }
284
        this_elem.style.setProperty("display", "inline");
285
}
pokergaming's avatar
pokergaming committed
286

287
288
289
function gui_preset_change(elem) {
    pdgui.skin.set(elem.value);
}
pokergaming's avatar
pokergaming committed
290

291
292
293
294
295
296
297
298
// callbacks for devices and/or their number of channels
function dev_change(elem) {
    var attrs, id, direction, index;
    // the same logic works for both channels and
    // devices-- we use the variable 'type' to
    // choose the parameter acoordingly
    var type;
    id = elem.id;
299
300
    direction = id.slice(0,2) === "in" ? "in" : "out";
    type = id.indexOf("chans") !== -1 ? "chans" : "devs";
301
302
303
    // This would need to change if there could ever be more than
    // 9 devices
    index = +(id.slice(-1)) - 1;
304
    pdgui.post("direction is " + direction);
305
    attrs = get_attr("pd-" + direction + type, pd_audio_attrs);
306
    attrs[index] = elem.value;
307
308
    pdgui.post("id is " + elem.id);
    pdgui.post("new chan attrs is " + attrs);
309
}
310

311
312
313
314
315
function attr_change(elem) {
    var attr, id;
    attr = pd_audio_attrs;
    id = elem.id;
    attr[attr.indexOf(id) + 1] = elem.value;
316
317
    pdgui.post("id is " + elem.id);
    pdgui.post("value is " + elem.value);
318
}
pokergaming's avatar
pokergaming committed
319

320
321
function get_input(name) {
    var val = document.getElementsByName(name)[0].value;
322
    return val === 0 ? "0" : val;
323
}
pokergaming's avatar
pokergaming committed
324

325
326
327
328
// get a value from the garray attr array
function get_array_value(name, attrs) {
    return attrs[attrs.indexOf(name) + 1];
}
pokergaming's avatar
pokergaming committed
329

330
331
332
// If dev is -1, just change it to 0. Not sure if the Pd audio
// backend requires this, but it's how it works currently.
function kludge_dev(type, attrs, index) {
333
    var dev = get_attr("pd-" + type + "devs", attrs)[index];
334
335
336
    if (dev < 0) { dev = 0; }
    return dev;
}
pokergaming's avatar
pokergaming committed
337

338
339
340
341
342
// If the device is -1 ('None'), make the number of channels negative.
// This is the way Pd's audio back end turns off the device. (It works
// this way so you can remember your number of channels even if
// you turn off the device.)
function kludge_chans(type, attrs, index) {
343
344
    var dev = get_attr("pd-" + type + "devs", attrs)[index],
        chans = get_attr("pd-" + type + "chans", attrs)[index];
345
346
347
    if (dev < 0 && chans >= 0) { chans *= -1; }
    return chans;
}
pokergaming's avatar
pokergaming committed
348

349
350
function apply() {
    var attrs = pd_audio_attrs;
351
    pdgui.post("we're applying shits!");
352
353

    // Audio dialog
354
    pdgui.pdsend(
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
        "pd audio-dialog",
        kludge_dev("in", attrs, 0),
        kludge_dev("in", attrs, 1),
        kludge_dev("in", attrs, 2),
        kludge_dev("in", attrs, 3),
        kludge_chans("in", attrs, 0),
        kludge_chans("in", attrs, 1),
        kludge_chans("in", attrs, 2),
        kludge_chans("in", attrs, 3),
        kludge_dev("out", attrs, 0),
        kludge_dev("out", attrs, 1),
        kludge_dev("out", attrs, 2),
        kludge_dev("out", attrs, 3),
        kludge_chans("out", attrs, 0),
        kludge_chans("out", attrs, 1),
        kludge_chans("out", attrs, 2),
        kludge_chans("out", attrs, 3),
        get_attr("rate", attrs),
        get_attr("advance", attrs),
        get_attr("cancallback", attrs),
        get_attr("blocksize", attrs)
376
    );
pokergaming's avatar
pokergaming committed
377

378
379
    attrs = pd_midi_attrs;
    // Midi dialog
380
    pdgui.pdsend(
381
382
383
384
385
386
387
388
389
        "pd midi-dialog",
        get_attr("pd-indevs", attrs)[0],
        get_attr("pd-indevs", attrs)[1],
        get_attr("pd-indevs", attrs)[2],
        get_attr("pd-indevs", attrs)[3],
        get_attr("pd-outdevs", attrs)[0],
        get_attr("pd-outdevs", attrs)[1],
        get_attr("pd-outdevs", attrs)[2],
        get_attr("pd-outdevs", attrs)[3],
390
391
        0, // midi_alsain
        0  // midi_alsaout
392
    );
393
}
pokergaming's avatar
pokergaming committed
394

395
396
function cancel() {
    var i, attrs, gfxstub;
397
    pdgui.post("closing the window at this point");
398
    window.close(true);
399
    //pdgui.pdsend(pd_object_callback, "cancel");
400
}
401

402
function change_api(elem) {
403
404
405
    var id = elem.getAttribute("id"),
        value = elem.getAttribute("value");
    if (id === "audio_api") {
406
        pdgui.pdsend("pd audio-setapi", value);
407
    } else {
408
        pdgui.pdsend("pd midi-setapi", value);
409
    }
410
}
411

412
413
414
415
416
function get_attr(name, attrs) {
    return attrs[attrs.indexOf(name) + 1];
}

function populate_apis(elem, apis, current_api) {
417
    pdgui.post("curent api is " + current_api);
418
    var i, opt, api_select = elem;
419
    pdgui.post("apis are " + apis);
420
    for (i = 0; i < apis.length; i += 2) {
421
        opt = document.createElement("option");
422
        opt.textContent = apis[i];
423
        opt.setAttribute("value", apis[i+1]);
424
        api_select.appendChild(opt);
pokergaming's avatar
pokergaming committed
425
    }
426
427
    api_select.value = current_api;
}
pokergaming's avatar
pokergaming committed
428

429
function populate_devs(type, attrs) {
430
    var devs = get_attr(type === "in" ? "sys-indevs" : "sys-outdevs", attrs);
431
    var i, j, opt, elem, chan_elem, chans;
432
433
    pdgui.post("devs are " + devs);
    pdgui.post("type is " + type + 1);
434
    chans = get_attr("pd-" + type + "chans", attrs);
435
436
    for (i = 0; i < 4; i++) {
        elem = document.getElementById(type + (i+1));
437
        chan_elem = document.getElementById(type + "chans" + (i+1));
438
        chan_elem.value = chans[i];
pokergaming's avatar
pokergaming committed
439
        // if the user changed the API, we need to remove the old devs
440
441
        while (elem.firstChild) {
            elem.removeChild(elem.firstChild);
442
        }
pokergaming's avatar
pokergaming committed
443
        // make a dummy device named 'None' with value -1
444
        opt = document.createElement("option");
pokergaming's avatar
pokergaming committed
445
        opt.value = -1;
446
        opt.textContent = "None";
pokergaming's avatar
pokergaming committed
447
        elem.appendChild(opt);
448
        for (j = 0; j < devs.length; j++) {
449
            opt = document.createElement("option");
450
451
452
453
454
            opt.value = j; 
            opt.textContent = devs[j];
            elem.appendChild(opt);
        }
    }
455
456
}

457
function populate_midi_devs(type, attrs) {
458
    var devs = get_attr(type === "in" ? "sys-indevs" : "sys-outdevs", attrs);
459
    var i, j, opt, elem, chan_elem, chans;
460
461
    pdgui.post("devs are " + devs);
    pdgui.post("type is " + type + 1);
462
    chans = get_attr("pd-" + type + "chans", attrs);
463
464
    for (i = 0; i < 4; i++) {
        elem = document.getElementById(type + (i+1));
465
        chan_elem = document.getElementById(type + "chans" + (i+1));
466
467
468
469
470
471
        chan_elem.value = chans[i];
        // if the user changed the API, we need to remove the old devs
        while (elem.firstChild) {
            elem.removeChild(elem.firstChild);
        }
        // make a dummy device named 'None' with value -1
472
        opt = document.createElement("option");
473
        opt.value = -1;
474
        opt.textContent = "None";
475
476
        elem.appendChild(opt);
        for (j = 0; j < devs.length; j++) {
477
            opt = document.createElement("option");
478
479
480
481
482
483
484
            opt.value = j; 
            opt.textContent = devs[j];
            elem.appendChild(opt);
        }
    }
}

485
486
function audio_prefs_callback(attrs) {
    pd_audio_attrs = attrs;
487
    var api_select = document.getElementById("audio_api");
488
    var callback, i, j, elem, devs, opt;
489
490
    pdgui.post("audio attrs are " + attrs);
    pdgui.post("attrs length " + attrs.length);
491
492
493
494
    // We can get this callback multiple times while the dialog
    // is open.  This is because an API change requires a query
    // for new properties. So we only populate the api options
    // if they don't already exist
495
    if (api_select.getElementsByTagName("option").length < 1) {
496
497
        populate_apis(
            api_select,
498
499
            attrs[attrs.indexOf("audio-apis") + 1],
            attrs[attrs.indexOf("current-api") + 1]);
500
    }
501

502
503
504
    document.getElementById("rate").value = get_attr("rate", attrs);
    document.getElementById("blocksize").value = get_attr("blocksize", attrs);
    document.getElementById("advance").value = get_attr("advance", attrs);
505

506
    var callback = get_attr("cancallback", attrs);
507
508
    //show the checkbox if the API allows 
    if (callback !== -1) {
509
510
511
        document.getElementById("callback_container")
            .classList.remove("hidden");
        document.getElementById("callback").checked = !!callback;
512
    }
513

514
515
    populate_devs("in", attrs);
    populate_devs("out", attrs);
516

517
518
    set_devs("in", get_attr("pd-indevs", attrs));
    set_devs("out", get_attr("pd-outdevs", attrs));
pokergaming's avatar
pokergaming committed
519

520
521
    // Set chans after the devs (because they may
    // have the side-effect of setting the dev to 'None')
522
523
    set_chans("in", get_attr("pd-inchans", attrs));
    set_chans("out", get_attr("pd-outchans", attrs));
524
525

    pdgui.resize_window(pd_object_callback);
526
}
pokergaming's avatar
pokergaming committed
527

528
529
530
531
function set_devs(type, devs) {
    var i;
    for (i = 0; i < devs.length; i++) {
        document.getElementById(type + (i+1)).value = devs[i];
pokergaming's avatar
pokergaming committed
532
    }
533
}
pokergaming's avatar
pokergaming committed
534

535
536
537
function set_chans(type, chans_array) {
    var i;
    for (i = 0; i < chans_array.length; i++) {
538
        document.getElementById(type + "chans" + (i+1)).value = chans_array[i];
539
540
541
        // If no chans, set device to -1 (None)
        if (chans_array[i] < 1) {
            document.getElementById(type + (i+1)).value = -1;
pokergaming's avatar
pokergaming committed
542
        }
pokergaming's avatar
pokergaming committed
543
    }
544
}
pokergaming's avatar
pokergaming committed
545

546
547
function midi_prefs_callback(attrs) {
    pd_midi_attrs = attrs;
548
    var api_select = document.getElementById("midi_api");
549
550
    pdgui.post("midi attrs are " + attrs);
    pdgui.post("attrs length " + attrs.length);
551

552
    if (api_select.getElementsByTagName("option").length < 1) {
553
554
        populate_apis(
            api_select,
555
556
            get_attr("midi-apis", attrs),
            get_attr("current-api", attrs)
557
558
        );
    }
559
560

    pdgui.resize_window(pd_object_callback);
561
}
562
563


564
565
566
567
568
569
570
571
572
// This gets called from the nw_create_window function in index.html
// It provides us with our window id from the C side.  Once we have it
// we can create the menu and register event callbacks
function register_canvas_id(gfxstub, attr_arrays) {
    pd_object_callback = gfxstub;
    add_events(gfxstub);
    translate_form();

    // default to audio preference panel
573
    display_pref("audio");
574
575
576
577
578
579
580
581
582
    // We don't turn on rendering of the "container" div until
    // We've finished displaying all the spans and populating the
    // labels and form elements.  That makes it more efficient and
    // snappier, at least on older machines.  However, we still have
    // to asynchronously request the form values from Pd for audio
    // and MIDI...

    pdgui.pdsend("pd audio-properties"); // request audio pref attrs
    pdgui.pdsend("pd midi-properties");  // request midi pref attrs
583
    document.getElementsByClassName("container")[0].style.setProperty("display", "inline");
584
}
pokergaming's avatar
pokergaming committed
585
586

function tr_text(id) {
587
588
    var elem = document.getElementById("iem.prop." + id);
    elem.textContent = l("iem.prop." + id);
pokergaming's avatar
pokergaming committed
589
590
591
592
593
}

// Stop-gap translator
function translate_form() {
    var i
594
    var elements = document.querySelectorAll("[data-i18n]");
pokergaming's avatar
pokergaming committed
595
596
    for (i = 0; i < elements.length; i++) {
        var data = elements[i].dataset.i18n;
597
        if (data.slice(0,7) === "[title]") {
pokergaming's avatar
pokergaming committed
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
            elements[i].title = l(data.slice(7));
        } else {
            elements[i].textContent = l(data);
        }
    }
}

function populate_form(attr_array) {
    // First, let's put the translated text for the form labels:

    for(var i = 0; i < attr_array.length; i+=2) {
        // Unhide the span with the class with the same name as the id
        var prop_group = document.getElementsByClassName(attr_array[i])[0];
        if (prop_group !== undefined) {
            console.log("the thing here is " + attr_array[i]);
613
            prop_group.classList.remove("hidden");
pokergaming's avatar
pokergaming committed
614
        } else {
615
            pdgui.post("Error: couldn't find iemgui prop group for " + attr_array[i]);
pokergaming's avatar
pokergaming committed
616
617
618
619
        }

        var elem = document.getElementsByName(attr_array[i]);
        if (elem.length > 0) {
620
            if (elem[0].type === "checkbox") {
pokergaming's avatar
pokergaming committed
621
622
                // The attr here is a string, so we need to
                // force it to number, hence the "+" below
623
                pdgui.post("found a CHECKED ITEM!!!");
pokergaming's avatar
pokergaming committed
624
625
626
627
628
629
630
631
632
633
634
635
                elem[0].checked = +attr_array[i+1];
            } else {
                elem[0].value = attr_array[i+1];
            }
        }
    }
}

function add_events(name) {
    // let's handle some events for this window...

    // closing the Window
636
    gui.Window.get().on("close", function() {
pokergaming's avatar
pokergaming committed
637
638
639
640
        // this needs to do whatever the "cancel" button does
        pdgui.remove_dialogwin(pd_object_callback);
        this.close(true);
    });
641
    pdgui.dialog_bindings(name);
pokergaming's avatar
pokergaming committed
642
643
644
645
646
}

  </script>
  </body>
</html>