projects
/
xboard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e7b4c63
)
Add default extension in file browser
author
H.G. Muller
<h.g.muller@hccnet.nl>
Fri, 6 May 2011 16:59:26 +0000
(18:59 +0200)
committer
H.G. Muller
<h.g.muller@hccnet.nl>
Sat, 7 May 2011 12:50:27 +0000
(14:50 +0200)
winboard/wsettings.c
patch
|
blob
|
history
diff --git
a/winboard/wsettings.c
b/winboard/wsettings.c
index
e3ddead
..
d628913
100644
(file)
--- a/
winboard/wsettings.c
+++ b/
winboard/wsettings.c
@@
-396,10
+396,12
@@
GetOptionValues(HWND hDlg, ChessProgramState *cps, Option *optionList)
if(!cps && okFunc) ((ButtonCallback*) okFunc)(0);
\r
}
\r
\r
if(!cps && okFunc) ((ButtonCallback*) okFunc)(0);
\r
}
\r
\r
+char *defaultExt[] = { NULL, "pgn", "fen", "exe", "trn", "bin", "log", "ini" };
\r
+
\r
LRESULT CALLBACK SettingsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
\r
{
\r
char buf[MSG_SIZ];
\r
LRESULT CALLBACK SettingsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
\r
{
\r
char buf[MSG_SIZ];
\r
- int i, j;
\r
+ int i, j
, ext
;
\r
\r
switch( message )
\r
{
\r
\r
switch( message )
\r
{
\r
@@
-445,7
+447,8
@@
LRESULT CALLBACK SettingsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
ofn.hwndOwner = hDlg;
\r
ofn.hInstance = hInst;
\r
ofn.lpstrFilter = filter;
\r
ofn.hwndOwner = hDlg;
\r
ofn.hInstance = hInst;
\r
ofn.lpstrFilter = filter;
\r
- ofn.nFilterIndex = 1L + (activeCps ? 0 : activeList[layoutList[(i-2000)/2+1]].max);
\r
+ ofn.nFilterIndex = 1L + (ext = activeCps ? 0 : activeList[layoutList[(i-2000)/2+1]].max);
\r
+ ofn.lpstrDefExt = defaultExt[ext];
\r
ofn.lpstrFile = buf;
\r
ofn.nMaxFile = sizeof(buf);
\r
ofn.lpstrTitle = _("Choose File");
\r
ofn.lpstrFile = buf;
\r
ofn.nMaxFile = sizeof(buf);
\r
ofn.lpstrTitle = _("Choose File");
\r