projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The WinSock library is now loaded at run-time, which means we can
[u/mdw/putty]
/
wincfg.c
diff --git
a/wincfg.c
b/wincfg.c
index
7e3d5c0
..
4c3d8a9
100644
(file)
--- a/
wincfg.c
+++ b/
wincfg.c
@@
-3,8
+3,6
@@
* box.
*/
* box.
*/
-#include <windows.h>
-
#include <assert.h>
#include <stdlib.h>
#include <assert.h>
#include <stdlib.h>
@@
-103,10
+101,10
@@
void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
dlg_stdcheckbox_handler, I(offsetof(Config,ctrlaltkeys)));
/*
dlg_stdcheckbox_handler, I(offsetof(Config,ctrlaltkeys)));
/*
- * Windows allows an arbitrary .WAV to be played as a bell
. For
- *
this we must search the existing controlset for
the
- *
radio-button set controlling the `beep' option, and add an
- *
extra button
to it.
+ * Windows allows an arbitrary .WAV to be played as a bell
, and
+ *
also the use of the PC speaker. For this we must search
the
+ *
existing controlset for the radio-button set controlling the
+ *
`beep' option, and add extra buttons
to it.
*
* Note that although this _looks_ like a hideous hack, it's
* actually all above board. The well-defined interface to the
*
* Note that although this _looks_ like a hideous hack, it's
* actually all above board. The well-defined interface to the
@@
-127,18
+125,22
@@
void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
if (c->generic.type == CTRL_RADIO &&
c->generic.context.i == offsetof(Config, beep)) {
assert(c->generic.handler == dlg_stdradiobutton_handler);
if (c->generic.type == CTRL_RADIO &&
c->generic.context.i == offsetof(Config, beep)) {
assert(c->generic.handler == dlg_stdradiobutton_handler);
- c->radio.nbuttons
++
;
+ c->radio.nbuttons
+= 2
;
c->radio.buttons =
sresize(c->radio.buttons, c->radio.nbuttons, char *);
c->radio.buttons[c->radio.nbuttons-1] =
dupstr("Play a custom sound file");
c->radio.buttons =
sresize(c->radio.buttons, c->radio.nbuttons, char *);
c->radio.buttons[c->radio.nbuttons-1] =
dupstr("Play a custom sound file");
+ c->radio.buttons[c->radio.nbuttons-2] =
+ dupstr("Beep using the PC speaker");
c->radio.buttondata =
sresize(c->radio.buttondata, c->radio.nbuttons, intorptr);
c->radio.buttondata[c->radio.nbuttons-1] = I(BELL_WAVEFILE);
c->radio.buttondata =
sresize(c->radio.buttondata, c->radio.nbuttons, intorptr);
c->radio.buttondata[c->radio.nbuttons-1] = I(BELL_WAVEFILE);
+ c->radio.buttondata[c->radio.nbuttons-2] = I(BELL_PCSPEAKER);
if (c->radio.shortcuts) {
c->radio.shortcuts =
sresize(c->radio.shortcuts, c->radio.nbuttons, char);
c->radio.shortcuts[c->radio.nbuttons-1] = NO_SHORTCUT;
if (c->radio.shortcuts) {
c->radio.shortcuts =
sresize(c->radio.shortcuts, c->radio.nbuttons, char);
c->radio.shortcuts[c->radio.nbuttons-1] = NO_SHORTCUT;
+ c->radio.shortcuts[c->radio.nbuttons-2] = NO_SHORTCUT;
}
break;
}
}
break;
}
@@
-267,6
+269,10
@@
void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
ctrl_checkbox(s, "Attempt to use logical palettes", 'l',
HELPCTX(colours_logpal),
dlg_stdcheckbox_handler, I(offsetof(Config,try_palette)));
ctrl_checkbox(s, "Attempt to use logical palettes", 'l',
HELPCTX(colours_logpal),
dlg_stdcheckbox_handler, I(offsetof(Config,try_palette)));
+ ctrl_checkbox(s, "Use system colours", 's',
+ HELPCTX(colours_system),
+ dlg_stdcheckbox_handler, I(offsetof(Config,system_colour)));
+
/*
* Resize-by-changing-font is a Windows insanity.
/*
* Resize-by-changing-font is a Windows insanity.