summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fe8abbf)
pedantic fiddlings with the new config-box stuff to cure some.
git-svn-id: svn://svn.tartarus.org/sgt/putty@2909
cda61777-01e9-0310-a592-
d414129be87e
#include <assert.h>
#include <limits.h>
#include <stdarg.h>
#include <assert.h>
#include <limits.h>
#include <stdarg.h>
#define DEFINE_INTORPTR_FNS
#define DEFINE_INTORPTR_FNS
while (va_arg(ap, char *) != NULL) {
i++;
if (c->radio.shortcut == NO_SHORTCUT)
while (va_arg(ap, char *) != NULL) {
i++;
if (c->radio.shortcut == NO_SHORTCUT)
- va_arg(ap, int); /* char promotes to int in arg lists */
- va_arg(ap, intorptr);
+ (void)va_arg(ap, int); /* char promotes to int in arg lists */
+ (void)va_arg(ap, intorptr);
}
va_end(ap);
c->radio.nbuttons = i;
}
va_end(ap);
c->radio.nbuttons = i;
void cmdline_error(char *, ...);
/*
void cmdline_error(char *, ...);
/*
+ * Exports from config.c.
+ */
+void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
+ int midsession, int protocol);
+
+/*
* X11 auth mechanisms we know about.
*/
enum {
* X11 auth mechanisms we know about.
*/
enum {
#include <windows.h>
#include <commctrl.h>
#include <assert.h>
#include <windows.h>
#include <commctrl.h>
#include <assert.h>
#include "winstuff.h"
#include "misc.h"
#include "winstuff.h"
#include "misc.h"
SWP_NOACTIVATE | SWP_NOCOPYBITS |
SWP_NOMOVE | SWP_NOZORDER);
}
SWP_NOACTIVATE | SWP_NOCOPYBITS |
SWP_NOMOVE | SWP_NOZORDER);
}
*/
char *staticwrap(struct ctlpos *cp, HWND hwnd, char *text, int *lines)
{
*/
char *staticwrap(struct ctlpos *cp, HWND hwnd, char *text, int *lines)
{
- HFONT font = (HFONT) cp->font;
HDC hdc = GetDC(hwnd);
int lpx = GetDeviceCaps(hdc, LOGPIXELSX);
int width, nlines, j;
HDC hdc = GetDC(hwnd);
int lpx = GetDeviceCaps(hdc, LOGPIXELSX);
int width, nlines, j;
if ((int)wParam == hdl->listid) {
DRAGLISTINFO *dlm = (DRAGLISTINFO *)lParam;
if ((int)wParam == hdl->listid) {
DRAGLISTINFO *dlm = (DRAGLISTINFO *)lParam;
+ int dest = 0; /* initialise to placate gcc */
switch (dlm->uNotification) {
case DL_BEGINDRAG:
hdl->dummyitem =
switch (dlm->uNotification) {
case DL_BEGINDRAG:
hdl->dummyitem =
- char shortcuts[MAX_SHORTCUTS_PER_CTRL], nshortcuts;
+ char shortcuts[MAX_SHORTCUTS_PER_CTRL];
+ int nshortcuts;
- int i, base_id, num_ids, orig_tabdelay;
+ int i, base_id, num_ids;
void *data;
base_id = *id;
void *data;
base_id = *id;
for (i = 0; i < s->ncontrols; i++) {
union control *ctrl = s->ctrls[i];
for (i = 0; i < s->ncontrols; i++) {
union control *ctrl = s->ctrls[i];
- orig_tabdelay = FALSE;
-
/*
* Generic processing that pertains to all control types.
* At the end of this if statement, we'll have produced
/*
* Generic processing that pertains to all control types.
* At the end of this if statement, we'll have produced
assert(!ctrl->generic.tabdelay);
ctrl = ctrl->tabdelay.ctrl;
assert(!ctrl->generic.tabdelay);
ctrl = ctrl->tabdelay.ctrl;
for (i = 0; i < ntabdelays; i++)
if (tabdelayed[i] == ctrl)
for (i = 0; i < ntabdelays; i++)
if (tabdelayed[i] == ctrl)
pos = tabdelays[i]; /* structure copy */
pos = tabdelays[i]; /* structure copy */
+ colstart = colspan = -1; /* indicate this was tab-delayed */
+
} else {
/*
* If it wasn't one of those, it's a genuine control;
} else {
/*
* If it wasn't one of those, it's a genuine control;
break;
default:
assert(!"Can't happen");
break;
default:
assert(!"Can't happen");
+ num_ids = 0; /* placate gcc */
/*
* Update the ypos in all columns crossed by this
* control.
/*
* Update the ypos in all columns crossed by this
* control.
/*
* Look up the control ID in our data.
*/
/*
* Look up the control ID in our data.
*/
for (i = 0; i < dp->nctrltrees; i++) {
c = winctrl_findbyid(dp->controltrees[i], LOWORD(wParam));
if (c)
for (i = 0; i < dp->nctrltrees; i++) {
c = winctrl_findbyid(dp->controltrees[i], LOWORD(wParam));
if (c)
* checked before generating an event.
*/
if (msg == WM_COMMAND &&
* checked before generating an event.
*/
if (msg == WM_COMMAND &&
- HIWORD(wParam) == BN_CLICKED ||
- HIWORD(wParam) == BN_DOUBLECLICKED &&
+ (HIWORD(wParam) == BN_CLICKED ||
+ HIWORD(wParam) == BN_DOUBLECLICKED) &&
IsDlgButtonChecked(dp->hwnd, LOWORD(wParam))) {
ctrl->generic.handler(ctrl, dp, dp->data, EVENT_VALCHANGE);
}
IsDlgButtonChecked(dp->hwnd, LOWORD(wParam))) {
ctrl->generic.handler(ctrl, dp, dp->data, EVENT_VALCHANGE);
}
/*
* Look up the control ID in our data.
*/
/*
* Look up the control ID in our data.
*/
for (i = 0; i < dp->nctrltrees; i++) {
c = winctrl_findbyid(dp->controltrees[i], id);
if (c)
for (i = 0; i < dp->nctrltrees; i++) {
c = winctrl_findbyid(dp->controltrees[i], id);
if (c)
int msg;
assert(c &&
(c->ctrl->generic.type == CTRL_LISTBOX ||
int msg;
assert(c &&
(c->ctrl->generic.type == CTRL_LISTBOX ||
- c->ctrl->generic.type == CTRL_EDITBOX &&
- c->ctrl->editbox.has_list));
+ (c->ctrl->generic.type == CTRL_EDITBOX &&
+ c->ctrl->editbox.has_list)));
msg = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
LB_RESETCONTENT : CB_RESETCONTENT);
SendDlgItemMessage(dp->hwnd, c->base_id+1, msg, 0, 0);
msg = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
LB_RESETCONTENT : CB_RESETCONTENT);
SendDlgItemMessage(dp->hwnd, c->base_id+1, msg, 0, 0);
int msg;
assert(c &&
(c->ctrl->generic.type == CTRL_LISTBOX ||
int msg;
assert(c &&
(c->ctrl->generic.type == CTRL_LISTBOX ||
- c->ctrl->generic.type == CTRL_EDITBOX &&
- c->ctrl->editbox.has_list));
+ (c->ctrl->generic.type == CTRL_EDITBOX &&
+ c->ctrl->editbox.has_list)));
msg = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
LB_DELETESTRING : CB_DELETESTRING);
SendDlgItemMessage(dp->hwnd, c->base_id+1, msg, index, 0);
msg = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
LB_DELETESTRING : CB_DELETESTRING);
SendDlgItemMessage(dp->hwnd, c->base_id+1, msg, index, 0);
int msg;
assert(c &&
(c->ctrl->generic.type == CTRL_LISTBOX ||
int msg;
assert(c &&
(c->ctrl->generic.type == CTRL_LISTBOX ||
- c->ctrl->generic.type == CTRL_EDITBOX &&
- c->ctrl->editbox.has_list));
+ (c->ctrl->generic.type == CTRL_EDITBOX &&
+ c->ctrl->editbox.has_list)));
msg = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
LB_ADDSTRING : CB_ADDSTRING);
SendDlgItemMessage(dp->hwnd, c->base_id+1, msg, 0, (LPARAM)text);
msg = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
LB_ADDSTRING : CB_ADDSTRING);
SendDlgItemMessage(dp->hwnd, c->base_id+1, msg, 0, (LPARAM)text);
int msg, msg2, index;
assert(c &&
(c->ctrl->generic.type == CTRL_LISTBOX ||
int msg, msg2, index;
assert(c &&
(c->ctrl->generic.type == CTRL_LISTBOX ||
- c->ctrl->generic.type == CTRL_EDITBOX &&
- c->ctrl->editbox.has_list));
+ (c->ctrl->generic.type == CTRL_EDITBOX &&
+ c->ctrl->editbox.has_list)));
msg = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
LB_ADDSTRING : CB_ADDSTRING);
msg2 = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
msg = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
LB_ADDSTRING : CB_ADDSTRING);
msg2 = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
struct winctrls {
tree234 *byctrl, *byid;
};
struct winctrls {
tree234 *byctrl, *byid;
};
+struct controlset;
+struct controlbox;
+
void winctrl_init(struct winctrls *);
void winctrl_cleanup(struct winctrls *);
void winctrl_add(struct winctrls *, struct winctrl *);
void winctrl_init(struct winctrls *);
void winctrl_cleanup(struct winctrls *);
void winctrl_add(struct winctrls *, struct winctrl *);
struct ctlpos *cp, struct controlset *s, int *id);
int winctrl_handle_command(struct dlgparam *dp, UINT msg,
WPARAM wParam, LPARAM lParam);
struct ctlpos *cp, struct controlset *s, int *id);
int winctrl_handle_command(struct dlgparam *dp, UINT msg,
WPARAM wParam, LPARAM lParam);
+void winctrl_rem_shortcuts(struct dlgparam *dp, struct winctrl *c);
+int winctrl_context_help(struct dlgparam *dp, HWND hwnd, int id);
+
+/*
+ * Exports from wincfg.c.
+ */
+void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
+ int midsession);
/*
* Exports from windlg.c.
/*
* Exports from windlg.c.
void showeventlog(HWND);
void showabout(HWND);
void force_normal(HWND hwnd);
void showeventlog(HWND);
void showabout(HWND);
void force_normal(HWND hwnd);
+void modal_about_box(HWND hwnd);
+void show_help(HWND hwnd);
/*
* Exports from sizetip.c.
/*
* Exports from sizetip.c.