diff options
Diffstat (limited to 'win/tkWinDialog.c')
| -rw-r--r-- | win/tkWinDialog.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 6332f66..264c3ec 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -153,7 +153,8 @@ typedef struct { typedef struct OFNData { Tcl_Interp *interp; /* Interp, used only if debug is turned on, - * for setting the "tk_dialog" variable. */ + * for setting the variable + * "::tk::test::dialog::testDialog". */ int dynFileBufferSize; /* Dynamic filename buffer size, stored to * avoid shrinking and expanding the buffer * when selection changes */ @@ -588,7 +589,7 @@ static int MakeFilter(Tcl_Interp *interp, Tcl_Obj *valuePtr, static UINT APIENTRY OFNHookProc(HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam); static LRESULT CALLBACK MsgBoxCBTProc(int nCode, WPARAM wParam, LPARAM lParam); -static void SetTkDialog(void *clientData); +static void SetTestDialog(void *clientData); static const char *ConvertExternalFilename(LPCWSTR, Tcl_DString *); /* @@ -646,9 +647,9 @@ EatSpuriousMessageBugFix(void) * TkWinDialogDebug -- * * Function to turn on/off debugging support for common dialogs under - * windows. The variable "tk_debug" is set to the identifier of the - * dialog window when the modal dialog window pops up and it is safe to - * send messages to the dialog. + * windows. The variable "::tk::test::dialog::testDialog" is set to the + * identifier of the dialog window when the modal dialog window pops up + * and it is safe to send messages to the dialog. * * Results: * None. @@ -872,7 +873,7 @@ ColorDlgHookProc( } if (tsdPtr->debugFlag) { tsdPtr->debugInterp = (Tcl_Interp *) ccPtr->lpTemplateName; - Tcl_DoWhenIdle(SetTkDialog, hDlg); + Tcl_DoWhenIdle(SetTestDialog, hDlg); } return TRUE; } @@ -1839,7 +1840,7 @@ GetFileName( * * OFNHookProc -- * - * Dialog box hook function. This is used to set the "tk_dialog" + * Dialog box hook function. This is used to set the "::tk::test::dialog::testDialog" * variable for test/debugging when the dialog is ready to receive * messages. When multiple file selection is enabled this function * is used to process the list of names. @@ -1985,7 +1986,7 @@ OFNHookProc( if (ofnData->interp != NULL) { hdlg = GetParent(hdlg); tsdPtr->debugInterp = ofnData->interp; - Tcl_DoWhenIdle(SetTkDialog, hdlg); + Tcl_DoWhenIdle(SetTestDialog, hdlg); } TkWinSetUserData(hdlg, NULL); } @@ -2572,7 +2573,7 @@ ChooseDirectoryValidateProc( if (tsdPtr->debugFlag) { tsdPtr->debugInterp = (Tcl_Interp *) chooseDirSharedData->interp; - Tcl_DoWhenIdle(SetTkDialog, hwnd); + Tcl_DoWhenIdle(SetTestDialog, hwnd); } chooseDirSharedData->retDir[0] = '\0'; switch (message) { @@ -2947,18 +2948,19 @@ MsgBoxCBTProc( /* * ---------------------------------------------------------------------- * - * SetTkDialog -- + * SetTestDialog -- * - * Records the HWND for a native dialog in the 'tk_dialog' variable so - * that the test-suite can operate on the correct dialog window. Use of - * this is enabled when a test program calls TkWinDialogDebug by calling - * the test command 'tkwinevent debug 1'. + * Records the HWND for a native dialog in the variable + * "::tk::test::dialog::testDialog" so that the test-suite can operate + * on the correct dialog window. Use of this is enabled when a test + * program calls TkWinDialogDebug by calling the test command + * 'testwinevent debug 1'. * * ---------------------------------------------------------------------- */ static void -SetTkDialog( +SetTestDialog( void *clientData) { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) @@ -2966,7 +2968,8 @@ SetTkDialog( char buf[32]; snprintf(buf, sizeof(buf), "0x%" TCL_Z_MODIFIER "x", (size_t)clientData); - Tcl_SetVar2(tsdPtr->debugInterp, "tk_dialog", NULL, buf, TCL_GLOBAL_ONLY); + Tcl_SetVar2(tsdPtr->debugInterp, "::tk::test::dialog::testDialog", NULL, + buf, TCL_GLOBAL_ONLY); } /* @@ -3100,7 +3103,7 @@ HookProc( phd->hwnd = hwndDlg; if (tsdPtr->debugFlag) { tsdPtr->debugInterp = phd->interp; - Tcl_DoWhenIdle(SetTkDialog, hwndDlg); + Tcl_DoWhenIdle(SetTestDialog, hwndDlg); } if (phd->titleObj != NULL) { Tcl_DString title; |
