summaryrefslogtreecommitdiffstats
path: root/generic/tkFrame.c
diff options
context:
space:
mode:
authorpeter.spjuth@gmail.com <pspjuth>2003-07-16 23:16:51 (GMT)
committerpeter.spjuth@gmail.com <pspjuth>2003-07-16 23:16:51 (GMT)
commita17dee3633fd636ab82efb7a8db03694db0efaa8 (patch)
tree9e2f5794e14efb7bc6208615b4ae4a496b643880 /generic/tkFrame.c
parentaa6d3548f5b8dbab90e4fd36da21a28042b73932 (diff)
downloadtk-a17dee3633fd636ab82efb7a8db03694db0efaa8.zip
tk-a17dee3633fd636ab82efb7a8db03694db0efaa8.tar.gz
tk-a17dee3633fd636ab82efb7a8db03694db0efaa8.tar.bz2
Make sure all options can be set
to their default value. [Bug #697652]
Diffstat (limited to 'generic/tkFrame.c')
-rw-r--r--generic/tkFrame.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index f4f0a53..928bea1 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkFrame.c,v 1.15 2003/01/22 14:32:59 dkf Exp $
+ * RCS: @(#) $Id: tkFrame.c,v 1.16 2003/07/16 23:16:52 pspjuth Exp $
*/
#include "default.h"
@@ -594,7 +594,7 @@ CreateFrame(clientData, interp, objc, objv, type, appName)
if (useOption == NULL) {
useOption = Tk_GetOption(new, "use", "Use");
}
- if (useOption != NULL) {
+ if ((useOption != NULL) && (*useOption != 0)) {
if (TkpUseWindow(interp, new, useOption) != TCL_OK) {
goto error;
}
@@ -605,6 +605,9 @@ CreateFrame(clientData, interp, objc, objv, type, appName)
if (colormapName == NULL) {
colormapName = Tk_GetOption(new, "colormap", "Colormap");
}
+ if ((colormapName != NULL) && (*colormapName == 0)) {
+ colormapName = NULL;
+ }
if (visualName != NULL) {
visual = Tk_GetVisual(interp, new, visualName, &depth,
(colormapName == NULL) ? &colormap : (Colormap *) NULL);