summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-05-04 20:11:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-05-04 20:11:56 (GMT)
commit3528a7dc2c54d77374454e8e8619a7ad513f247c (patch)
tree038d513e93bda5b2c001675e7b786f021be09e54 /win
parent16e762c07d7e4052ad584723a65851d7ced2a31b (diff)
downloadtk-3528a7dc2c54d77374454e8e8619a7ad513f247c.zip
tk-3528a7dc2c54d77374454e8e8619a7ad513f247c.tar.gz
tk-3528a7dc2c54d77374454e8e8619a7ad513f247c.tar.bz2
Alphabetize some string tables
Diffstat (limited to 'win')
-rw-r--r--win/tkWinDialog.c16
-rw-r--r--win/tkWinSysTray.c4
-rw-r--r--win/tkWinWm.c28
-rw-r--r--win/ttkWinXPTheme.c12
4 files changed, 30 insertions, 30 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 07997e2..0bfc7f1 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -744,8 +744,8 @@ Tk_ChooseColorObjCmd(
optionPtr = objv[i];
valuePtr = objv[i + 1];
- if (Tcl_GetIndexFromObjStruct(interp, optionPtr, optionStrings,
- sizeof(char *), "option", TCL_EXACT, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, optionPtr, optionStrings,
+ "option", TCL_EXACT, &index) != TCL_OK) {
return TCL_ERROR;
}
if (i + 1 == objc) {
@@ -2767,8 +2767,8 @@ Tk_MessageBoxObjCmd(
optionPtr = objv[i];
valuePtr = objv[i + 1];
- if (Tcl_GetIndexFromObjStruct(interp, optionPtr, optionStrings,
- sizeof(char *), "option", TCL_EXACT, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, optionPtr, optionStrings,
+ "option", TCL_EXACT, &index) != TCL_OK) {
return TCL_ERROR;
}
if (i + 1 == objc) {
@@ -3164,7 +3164,7 @@ HookProc(
*/
enum FontchooserOption {
- FontchooserParent, FontchooserTitle, FontchooserFont, FontchooserCmd,
+ FontchooserCmd, FontchooserFont, FontchooserParent, FontchooserTitle,
FontchooserVisible
};
@@ -3241,7 +3241,7 @@ FontchooserConfigureCmd(
HookData *hdPtr = NULL;
int i, r = TCL_OK;
static const char *const optionStrings[] = {
- "-parent", "-title", "-font", "-command", "-visible", NULL
+ "-command", "-font", "-parent", "-title", "-visible", NULL
};
hdPtr = (HookData *)Tcl_GetAssocData(interp, "::tk::fontchooser", NULL);
@@ -3268,8 +3268,8 @@ FontchooserConfigureCmd(
for (i = 1; i < objc; i += 2) {
int optionIndex;
- if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
- sizeof(char *), "option", 0, &optionIndex) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, objv[i], optionStrings,
+ "option", 0, &optionIndex) != TCL_OK) {
return TCL_ERROR;
}
if (objc == 2) {
diff --git a/win/tkWinSysTray.c b/win/tkWinSysTray.c
index 73d5d37..b71a301 100644
--- a/win/tkWinSysTray.c
+++ b/win/tkWinSysTray.c
@@ -925,9 +925,9 @@ WinSystrayCmd(
};
enum { CMD_ADD, CMD_DELETE, CMD_MODIFY };
static const char *const optStrings[] = {
- "-image", "-text", "-callback", NULL
+ "-callback", "-image", "-text", NULL
};
- enum { OPT_IMAGE, OPT_TEXT, OPT_CALLBACK };
+ enum { OPT_CALLBACK, OPT_IMAGE, OPT_TEXT };
int cmd, opt;
HICON hIcon;
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 87c236e..e568f0c 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -2721,8 +2721,8 @@ Tk_WmObjCmd(
return TCL_OK;
}
- if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
- sizeof(char *), "option", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings,
+ "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
@@ -3514,8 +3514,8 @@ WmFocusmodelCmd(
return TCL_OK;
}
- if (Tcl_GetIndexFromObjStruct(interp, objv[3], optionStrings,
- sizeof(char *), "argument", 0,&index) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings,
+ "argument", 0,&index) != TCL_OK) {
return TCL_ERROR;
}
if (index == OPT_ACTIVE) {
@@ -4829,8 +4829,8 @@ WmPositionfromCmd(
if (*Tcl_GetString(objv[3]) == '\0') {
wmPtr->sizeHintsFlags &= ~(USPosition|PPosition);
} else {
- if (Tcl_GetIndexFromObjStruct(interp, objv[3], optionStrings,
- sizeof(char *), "argument", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings,
+ "argument", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
if (index == OPT_USER) {
@@ -5056,8 +5056,8 @@ WmSizefromCmd(
if (*Tcl_GetString(objv[3]) == '\0') {
wmPtr->sizeHintsFlags &= ~(USSize|PSize);
} else {
- if (Tcl_GetIndexFromObjStruct(interp, objv[3], optionStrings,
- sizeof(char *), "argument", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings,
+ "argument", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
if (index == OPT_USER) {
@@ -5186,8 +5186,8 @@ WmStackorderCmd(
ckfree(windows);
- if (Tcl_GetIndexFromObjStruct(interp, objv[3], optionStrings,
- sizeof(char *), "argument", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings,
+ "argument", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
if (index == OPT_ISABOVE) {
@@ -5227,10 +5227,10 @@ WmStateCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
- "normal", "iconic", "withdrawn", "zoomed", NULL
+ "iconic", "normal", "withdrawn", "zoomed", NULL
};
enum options {
- OPT_NORMAL, OPT_ICONIC, OPT_WITHDRAWN, OPT_ZOOMED
+ OPT_ICONIC, OPT_NORMAL, OPT_WITHDRAWN, OPT_ZOOMED
};
int index;
@@ -5246,8 +5246,8 @@ WmStateCmd(
Tcl_SetErrorCode(interp, "TK", "WM", "STATE", "ICON", NULL);
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObjStruct(interp, objv[3], optionStrings,
- sizeof(char *), "argument", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings,
+ "argument", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c
index 2500ea2..6917192 100644
--- a/win/ttkWinXPTheme.c
+++ b/win/ttkWinXPTheme.c
@@ -1127,10 +1127,10 @@ Ttk_CreateVsapiElement(
Tcl_DString classBuf;
static const char *const optionStrings[] =
- { "-padding","-width","-height","-margins", "-syssize",
- "-halfheight", "-halfwidth", NULL };
- enum { O_PADDING, O_WIDTH, O_HEIGHT, O_MARGINS, O_SYSSIZE,
- O_HALFHEIGHT, O_HALFWIDTH };
+ { "-halfheight", "-halfwidth", "-height", "-margins", "-padding",
+ "-syssize", "-width", NULL };
+ enum { O_HALFHEIGHT, O_HALFWIDTH, O_HEIGHT, O_MARGINS, O_PADDING,
+ O_SYSSIZE, O_WIDTH };
if (objc < 2) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
@@ -1158,8 +1158,8 @@ Ttk_CreateVsapiElement(
Tcl_SetErrorCode(interp, "TTK", "VSAPI", "MISSING", NULL);
goto retErr;
}
- if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
- sizeof(char *), "option", 0, &option) != TCL_OK)
+ if (Tcl_GetIndexFromObj(interp, objv[i], optionStrings,
+ "option", 0, &option) != TCL_OK)
goto retErr;
switch (option) {
case O_PADDING: