Skip to content

Commit

Permalink
Remove (apparent) unneeded Tk_GetUid() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Aug 31, 2024
1 parent 1d8ae06 commit 0775a7c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion generic/tkImgPhoto.c
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ ParseSubcommandOptions(
}
*optIndexPtr = ++index;
optPtr->background = Tk_GetColor(interp, Tk_MainWindow(interp),
Tk_GetUid(Tcl_GetString(objv[index])));
Tcl_GetString(objv[index]));
if (!optPtr->background) {
return TCL_ERROR;
}
Expand Down
2 changes: 1 addition & 1 deletion macosx/tkMacOSXWm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3003,7 +3003,7 @@ WmIconbitmapCmd(
wmPtr->hints.flags &= ~IconPixmapHint;
}
} else {
pixmap = Tk_GetBitmap(interp, (Tk_Window)winPtr, Tk_GetUid(str));
pixmap = Tk_GetBitmap(interp, (Tk_Window)winPtr, str);
if (pixmap == None) {
return TCL_ERROR;
}
Expand Down
2 changes: 1 addition & 1 deletion unix/tkUnix3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ TkpGetShadows(

if (borderPtr->shadow == None) {
borderPtr->shadow = Tk_GetBitmap(NULL, tkwin,
Tk_GetUid("gray50"));
"gray50");
if (borderPtr->shadow == None) {
Tcl_Panic("TkpGetShadows couldn't allocate bitmap for border");
}
Expand Down
11 changes: 5 additions & 6 deletions win/tkWin3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,17 +350,17 @@ TkpGetShadows(
if ((TkWinIndexOfColor(borderPtr->bgColorPtr) == COLOR_3DFACE)
|| (TkWinIndexOfColor(borderPtr->bgColorPtr) == COLOR_WINDOW)) {
borderPtr->darkColorPtr = Tk_GetColor(NULL, tkwin,
Tk_GetUid("SystemButtonShadow"));
"SystemButtonShadow");
gcValues.foreground = borderPtr->darkColorPtr->pixel;
borderPtr->darkGC = Tk_GetGC(tkwin, GCForeground, &gcValues);
borderPtr->lightColorPtr = Tk_GetColor(NULL, tkwin,
Tk_GetUid("SystemButtonHighlight"));
"SystemButtonHighlight");
gcValues.foreground = borderPtr->lightColorPtr->pixel;
borderPtr->lightGC = Tk_GetGC(tkwin, GCForeground, &gcValues);
((WinBorder*)borderPtr)->dark2ColorPtr = Tk_GetColor(NULL, tkwin,
Tk_GetUid("System3dDarkShadow"));
"System3dDarkShadow");
((WinBorder*)borderPtr)->light2ColorPtr = Tk_GetColor(NULL, tkwin,
Tk_GetUid("System3dLight"));
"System3dLight");
return;
}
darkColor.red = 0;
Expand Down Expand Up @@ -466,8 +466,7 @@ TkpGetShadows(
}

if (borderPtr->shadow == None) {
borderPtr->shadow = Tk_GetBitmap((Tcl_Interp *) NULL, tkwin,
Tk_GetUid("gray50"));
borderPtr->shadow = Tk_GetBitmap(NULL, tkwin, "gray50");
if (borderPtr->shadow == None) {
Tcl_Panic("TkpGetShadows couldn't allocate bitmap for border");
}
Expand Down
2 changes: 1 addition & 1 deletion win/tkWinWm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3080,7 +3080,7 @@ WmAttributesCmd(
}
} else {
XColor *cPtr =
Tk_GetColor(interp, tkwin, Tk_GetUid(crefstr));
Tk_GetColor(interp, tkwin, crefstr);
if (cPtr == NULL) {
return TCL_ERROR;
}
Expand Down

0 comments on commit 0775a7c

Please sign in to comment.