diff options
author | ericm <ericm> | 2000-05-10 00:09:38 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-05-10 00:09:38 (GMT) |
commit | 7ff73db610e3d2efd82c272471c0dfe16d5745b8 (patch) | |
tree | 36475aa7b20157ca2cd0fba5339eb61b1484aead /generic/tkOldConfig.c | |
parent | 5766ce10779959eb0437e49fc4bdb3045982a63d (diff) | |
download | tk-7ff73db610e3d2efd82c272471c0dfe16d5745b8.zip tk-7ff73db610e3d2efd82c272471c0dfe16d5745b8.tar.gz tk-7ff73db610e3d2efd82c272471c0dfe16d5745b8.tar.bz2 |
* doc/button.n: Added documentation for link relief.
* tests/button.test: Added tests for link relief for buttons.
* generic/tk.h (TK_CONFIG_LINK_OK): Added definition of
TK_RELIEF_LINK, TK_OPTION_LINK_OK and TK_CONFIG_LINK_OK. [RFE: 4348]
* generic/tk3d.c: Added support for link relief. [RFE: 4348]
* mac/tkMacButton.c (TkpDisplayButton):
* unix/tkUnixButton.c (TkpDisplayButton): Added support for link
relief. [RFE: 4348]
* generic/tkOldConfig.c (Tk_ConfigureWidget):
* generic/tkConfig.c (DoObjConfig): Added understanding of link
relief, which is allowed only for widgets that have
TK_OPTION_LINK_OK or TK_CONFIG_LINK_OK set for the "-relief"
option. [RFE: 4348]
* generic/tkButton.c: Added TK_OPTION_LINK_OK to "-relief" option
for buttons. [RFE: 4348]
* win/tkWinWm.c (EX_TRANSIENT_STYLE): Removed WS_EX_TOOLWINDOW
style bit, so that transient windows have full-size titlebars
(like the tk_getOpenFile dialog).
* win/tkWinMenu.c (GetMenuSeparatorGeometry): Tweaked height
requested for separator bars to be (linespace - (2*descent))
instead of just (linespace); this makes the separator occupy a
more correct amount of vertical space. [Bug: 5303].
Diffstat (limited to 'generic/tkOldConfig.c')
-rw-r--r-- | generic/tkOldConfig.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c index 9ee2a14..135e83c 100644 --- a/generic/tkOldConfig.c +++ b/generic/tkOldConfig.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: tkOldConfig.c,v 1.6 2000/03/07 00:09:08 ericm Exp $ + * RCS: @(#) $Id: tkOldConfig.c,v 1.7 2000/05/10 00:09:39 ericm Exp $ */ #include "tkPort.h" @@ -486,6 +486,21 @@ DoConfig(interp, tkwin, specPtr, value, valueIsUid, widgRec) if (Tk_GetRelief(interp, uid, (int *) ptr) != TCL_OK) { return TCL_ERROR; } + + /* + * Not all widgets allow the link relief. If the given + * relief is "link" and this widget does not support it, + * display the "invalid relief" error message and return + * TCL_ERROR. + */ + + if ((*ptr == TK_RELIEF_LINK) && \ + ((specPtr->specFlags & TK_CONFIG_LINK_OK) == 0)) { + Tcl_SetResult(interp, "invalid relief \"link\": must be " + "flat, groove, raised, ridge, solid, or sunken", + TCL_STATIC); + return TCL_ERROR; + } break; case TK_CONFIG_CURSOR: case TK_CONFIG_ACTIVE_CURSOR: { |