summaryrefslogtreecommitdiffstats
path: root/generic/tkListbox.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-01-21 03:54:41 (GMT)
committerhobbs <hobbs>2000-01-21 03:54:41 (GMT)
commit77936f61de844b8c795063558eda7de3508cdd7b (patch)
treeae734edf048def5a9ec5f3c9eca846a6753fbd01 /generic/tkListbox.c
parent45572469ec5bc7b41c213ee56f0a7db17bfc8cb8 (diff)
downloadtk-77936f61de844b8c795063558eda7de3508cdd7b.zip
tk-77936f61de844b8c795063558eda7de3508cdd7b.tar.gz
tk-77936f61de844b8c795063558eda7de3508cdd7b.tar.bz2
* generic/tkInt.h: moved new TkDisplay useInputMethods structure
element to end to not disturb position of previous elements in the structure (as compared to Tk <=8.2). * generic/tkCanvLine.c (LineCoords): fixed segfault when too few coords were passed to a line with certain options set (it should always have thrown an error anyway). [Bug: 4042] * tests/text.test: * generic/tkText.c: fixed missing " in error case and missing 'dump' in subcommand listing [Bug: 4036] * generic/tkListbox.c: adjusted use of basic string concatenation in (non-K&R behavior) [Bug: 4027] Swapped bg/fg class for -select(bg|fg) for listbox and their items [Bug: 4039]
Diffstat (limited to 'generic/tkListbox.c')
-rw-r--r--generic/tkListbox.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index fd16994..2c587ed 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.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: tkListbox.c,v 1.14 1999/11/29 18:16:21 hobbs Exp $
+ * RCS: @(#) $Id: tkListbox.c,v 1.15 2000/01/21 03:54:42 hobbs Exp $
*/
#include "tkPort.h"
@@ -231,13 +231,13 @@ static Tk_OptionSpec optionSpecs[] = {
Tk_Offset(Listbox, highlightWidth), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
DEF_LISTBOX_RELIEF, -1, Tk_Offset(Listbox, relief), 0, 0, 0},
- {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Background",
+ {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
DEF_LISTBOX_SELECT_COLOR, -1, Tk_Offset(Listbox, selBorder),
0, (ClientData) DEF_LISTBOX_SELECT_MONO, 0},
{TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth",
"BorderWidth", DEF_LISTBOX_SELECT_BD, -1,
Tk_Offset(Listbox, selBorderWidth), 0, 0, 0},
- {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Foreground",
+ {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
DEF_LISTBOX_SELECT_FG_COLOR, -1, Tk_Offset(Listbox, selFgColorPtr),
0, (ClientData) DEF_LISTBOX_SELECT_FG_MONO, 0},
{TK_OPTION_STRING, "-selectmode", "selectMode", "SelectMode",
@@ -279,11 +279,11 @@ static Tk_OptionSpec itemAttrOptionSpecs[] = {
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
(char *) NULL, -1, Tk_Offset(ItemAttr, fgColor),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0},
- {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Background",
+ {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
(char *) NULL, -1, Tk_Offset(ItemAttr, selBorder),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT,
(ClientData) DEF_LISTBOX_SELECT_MONO, 0},
- {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Foreground",
+ {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
(char *) NULL, -1, Tk_Offset(ItemAttr, selFgColor),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT,
(ClientData) DEF_LISTBOX_SELECT_FG_MONO, 0},
@@ -2513,16 +2513,16 @@ GetListboxIndex(interp, listPtr, indexObj, endIsSize, indexPtr)
strtol(start, &end, 0);
if ((start == end) || (*end != ',')) {
Tcl_AppendResult(interp, "bad listbox index \"", stringRep,
- "\": must be active, anchor, end, @x,y, or a "
- "number", (char *)NULL);
+ "\": must be active, anchor, end, @x,y, or a number",
+ (char *)NULL);
return TCL_ERROR;
}
start = end+1;
y = strtol(start, &end, 0);
if ((start == end) || (*end != '\0')) {
Tcl_AppendResult(interp, "bad listbox index \"", stringRep,
- "\": must be active, anchor, end, @x,y, or a "
- "number", (char *)NULL);
+ "\": must be active, anchor, end, @x,y, or a number",
+ (char *)NULL);
return TCL_ERROR;
}
*indexPtr = NearestListboxElement(listPtr, y);