summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-04-14 20:48:50 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-04-14 20:48:50 (GMT)
commit96cf871d54db54453e7e29dca5a64b7da157a22f (patch)
treef7cbf92ddcedca1bcd5f82cd0b1f055837d1c3da /win
parente9704ff6d001b364f815e856576c9a0446fc8190 (diff)
downloadtk-96cf871d54db54453e7e29dca5a64b7da157a22f.zip
tk-96cf871d54db54453e7e29dca5a64b7da157a22f.tar.gz
tk-96cf871d54db54453e7e29dca5a64b7da157a22f.tar.bz2
Fixed bug #1941740: tk_chooseColor -title was broken in revision 1.40 after some code cleanup. Added tests for this windows dialog to avoid regression.
Diffstat (limited to 'win')
-rw-r--r--win/tkWinDialog.c6
-rw-r--r--win/tkWinTest.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index ec6ede9..da88672 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinDialog.c,v 1.50 2008/01/31 23:31:02 hobbs Exp $
+ * RCS: @(#) $Id: tkWinDialog.c,v 1.51 2008/04/14 20:48:50 patthoyts Exp $
*
*/
@@ -455,13 +455,15 @@ ColorDlgHookProc(
const char *title;
CHOOSECOLOR *ccPtr;
- switch (uMsg) {
+ if (WM_INITDIALOG == uMsg) {
+
/*
* Set the title string of the dialog.
*/
ccPtr = (CHOOSECOLOR *) lParam;
title = (const char *) ccPtr->lCustData;
+
if ((title != NULL) && (title[0] != '\0')) {
Tcl_DString ds;
diff --git a/win/tkWinTest.c b/win/tkWinTest.c
index f92a8cc..0cdcb58 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.15 2008/04/09 20:48:10 nijtmans Exp $
+ * RCS: @(#) $Id: tkWinTest.c,v 1.16 2008/04/14 20:48:51 patthoyts Exp $
*/
#include "tkWinInt.h"
@@ -464,6 +464,9 @@ TestgetwindowinfoObjCmd(
Tcl_ListObjAppendElement(interp, resObj, Tcl_NewStringObj("text", -1));
Tcl_ListObjAppendElement(interp, resObj, textObj);
+ Tcl_ListObjAppendElement(interp, resObj, Tcl_NewStringObj("parent", -1));
+ Tcl_ListObjAppendElement(interp, resObj,
+ Tcl_NewLongObj((long)GetParent(hwnd)));
childrenObj = Tcl_NewListObj(0, NULL);
EnumChildWindows(hwnd, EnumChildrenProc, (LPARAM)childrenObj);