~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Patch from Theo Markettos: apparently "BSD-derived IP stacks fall over when
[sgt/putty]
/
winctrls.c
diff --git
a/winctrls.c
b/winctrls.c
index
204bc4a
..
0fb4b9f
100644
(file)
--- a/
winctrls.c
+++ b/
winctrls.c
@@
-13,17
+13,14
@@
* button.
*/
* button.
*/
-#include <windows.h>
-#include <commctrl.h>
#include <assert.h>
#include <ctype.h>
#include <assert.h>
#include <ctype.h>
-#include "
winstuff
.h"
+#include "
putty
.h"
#include "misc.h"
#include "dialog.h"
#include "misc.h"
#include "dialog.h"
-#include "puttymem.h"
-#include
"putty.h"
+#include
<commctrl.h>
#define GAPBETWEEN 3
#define GAPWITHIN 1
#define GAPBETWEEN 3
#define GAPWITHIN 1
@@
-287,6
+284,7
@@
void radioline(struct ctlpos *cp, char *text, int id, int nacross, ...)
if (!btext)
break;
bid = va_arg(ap, int);
if (!btext)
break;
bid = va_arg(ap, int);
+ nbuttons++;
}
va_end(ap);
buttons = snewn(nbuttons, struct radio);
}
va_end(ap);
buttons = snewn(nbuttons, struct radio);
@@
-2284,8
+2282,9
@@
void dlg_fontsel_set(union control *ctrl, void *dlg, FontSpec fs)
if (fs.height == 0)
buf = dupprintf("Font: %s, %sdefault height", fs.name, boldstr);
else
if (fs.height == 0)
buf = dupprintf("Font: %s, %sdefault height", fs.name, boldstr);
else
- buf = dupprintf("Font: %s, %s%d-point", fs.name, boldstr,
- (fs.height < 0 ? -fs.height : fs.height));
+ buf = dupprintf("Font: %s, %s%d-%s", fs.name, boldstr,
+ (fs.height < 0 ? -fs.height : fs.height),
+ (fs.height < 0 ? "pixel" : "point"));
SetDlgItemText(dp->hwnd, c->base_id+1, buf);
sfree(buf);
}
SetDlgItemText(dp->hwnd, c->base_id+1, buf);
sfree(buf);
}
@@
-2458,7
+2457,7
@@
void dp_init(struct dlgparam *dp)
dp->focused = dp->lastfocused = NULL;
memset(dp->shortcuts, 0, sizeof(dp->shortcuts));
dp->hwnd = NULL;
dp->focused = dp->lastfocused = NULL;
memset(dp->shortcuts, 0, sizeof(dp->shortcuts));
dp->hwnd = NULL;
- dp->errtitle = NULL;
+ dp->
wintitle = dp->
errtitle = NULL;
dp->privdata = newtree234(perctrl_privdata_cmp);
}
dp->privdata = newtree234(perctrl_privdata_cmp);
}
@@
-2482,6
+2481,8
@@
void dp_cleanup(struct dlgparam *dp)
freetree234(dp->privdata);
dp->privdata = NULL;
}
freetree234(dp->privdata);
dp->privdata = NULL;
}
+ sfree(dp->wintitle);
+ sfree(dp->errtitle);
}
void *dlg_get_privdata(union control *ctrl, void *dlg)
}
void *dlg_get_privdata(union control *ctrl, void *dlg)