mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
clean up dialog init
This commit is contained in:
parent
047b85624b
commit
621dd87d71
3 changed files with 106 additions and 101 deletions
|
@ -54,6 +54,7 @@ PasswdDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
return TRUE;
|
||||
} else {
|
||||
pState = (PasswdDialogState*)GetWindowLong( hDlg, GWL_USERDATA );
|
||||
if ( !!pState ) {
|
||||
globals = pState->globals;
|
||||
|
||||
switch ( message ) {
|
||||
|
@ -61,7 +62,8 @@ PasswdDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
id = LOWORD(wParam);
|
||||
switch( id ) {
|
||||
case IDOK:
|
||||
ceGetDlgItemText( hDlg, PASS_EDIT, pState->buf, pState->lenp );
|
||||
ceGetDlgItemText( hDlg, PASS_EDIT, pState->buf,
|
||||
pState->lenp );
|
||||
case IDCANCEL:
|
||||
pState->userCancelled = id == IDCANCEL;
|
||||
EndDialog( hDlg, id );
|
||||
|
@ -69,7 +71,7 @@ PasswdDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
} /* PasswdDlg */
|
||||
|
|
|
@ -108,6 +108,7 @@ BlankDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
loadLettersList( hDlg, bState );
|
||||
} else {
|
||||
bState = (BlankDialogState*)GetWindowLong( hDlg, GWL_USERDATA );
|
||||
if ( !!bState ) {
|
||||
|
||||
switch ( message ) {
|
||||
case WM_KEYDOWN: /* key down. Select a list item? */
|
||||
|
@ -132,7 +133,7 @@ BlankDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
EndDialog( hDlg, id );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
|
|
@ -359,6 +359,7 @@ handleOptionsButton( HWND hDlg, CEAppGlobals* globals, GameInfoState* giState )
|
|||
if ( WrapPrefsDialog( hDlg, globals, &state, &giState->prefsPrefs,
|
||||
giState->isNewGame ) ) {
|
||||
giState->prefsChanged = XP_TRUE;
|
||||
giState->colorsChanged = state.colorsChanged;
|
||||
/* nothing to do until user finally does confirm the parent dialog */
|
||||
}
|
||||
} /* handleOptionsButton */
|
||||
|
@ -424,6 +425,7 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
} else {
|
||||
giState = (GameInfoState*)GetWindowLong( hDlg, GWL_USERDATA );
|
||||
if ( !!giState ) {
|
||||
globals = giState->globals;
|
||||
|
||||
switch (message) {
|
||||
|
@ -509,7 +511,7 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
/* return DefWindowProc(hDlg, message, wParam, lParam); */
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return FALSE;
|
||||
} /* GameInfo */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue