summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-11-22 01:07:56 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-11-22 01:07:56 (GMT)
commitf5672abdd11a9f7e0e96109ff950859f37003c94 (patch)
tree95808ee2b7a376a126e5bfd48d7c4e5f88bf30a0 /win
parent9ac5469d91524a1aa16e4cb648daba3f605305b1 (diff)
downloadtk-f5672abdd11a9f7e0e96109ff950859f37003c94.zip
tk-f5672abdd11a9f7e0e96109ff950859f37003c94.tar.gz
tk-f5672abdd11a9f7e0e96109ff950859f37003c94.tar.bz2
[Bug 2307837] avoid some locale-dependent failures by using id's or an english constraint
Diffstat (limited to 'win')
-rw-r--r--win/tkWinTest.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/win/tkWinTest.c b/win/tkWinTest.c
index bd7c3e3..14f32ce 100644
--- a/win/tkWinTest.c
+++ b/win/tkWinTest.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinTest.c,v 1.21 2008/11/08 18:44:40 dkf Exp $
+ * RCS: @(#) $Id: tkWinTest.c,v 1.22 2008/11/22 01:07:56 patthoyts Exp $
*/
#include "tkWinInt.h"
@@ -33,6 +33,9 @@ static int TestfindwindowObjCmd(ClientData clientData,
static int TestgetwindowinfoObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
+static int TestwinlocaleObjCmd(ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *const objv[]);
MODULE_SCOPE int TkplatformtestInit(Tcl_Interp *interp);
static Tk_GetSelProc SetSelectionResult;
@@ -70,7 +73,8 @@ TkplatformtestInit(
(ClientData) Tk_MainWindow(interp), NULL);
Tcl_CreateObjCommand(interp, "testgetwindowinfo", TestgetwindowinfoObjCmd,
(ClientData) Tk_MainWindow(interp), NULL);
-
+ Tcl_CreateObjCommand(interp, "testwinlocale", TestwinlocaleObjCmd,
+ (ClientData) Tk_MainWindow(interp), NULL);
return TCL_OK;
}
@@ -292,6 +296,8 @@ TestwineventCmd(
child = GetWindow(child, GW_HWNDNEXT);
}
if (child == NULL) {
+ Tcl_AppendResult(interp, "could not find a control matching \"",
+ argv[2], "\"", NULL);
return TCL_ERROR;
}
}
@@ -467,6 +473,23 @@ TestgetwindowinfoObjCmd(
return TCL_OK;
}
+static int
+TestwinlocaleObjCmd(
+ ClientData clientData, /* Main window for application. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[]) /* Argument values. */
+{
+ Tk_Window tkwin = (Tk_Window) clientData;
+
+ if (objc != 1) {
+ Tcl_WrongNumArgs(interp, 1, objv, NULL);
+ return TCL_ERROR;
+ }
+ Tcl_SetObjResult(interp, Tcl_NewIntObj((int)GetThreadLocale()));
+ return TCL_OK;
+}
+
/*
* Local Variables:
* mode: c