]> cvs.zerfleddert.de Git - micropolis/blobdiff - src/tk/tkcmds.c
Add legacy mode inspired by the work of virtuallyfun/tenox7
[micropolis] / src / tk / tkcmds.c
index 14207ad94618463ba7070d04bdb379f811a51a84..de8394939f9a913fc1511f3f3e977230d3cefaa2 100644 (file)
@@ -500,6 +500,22 @@ WaitWindowProc (
     }
 }
 \f
+static int LegacyMode = 0;
+
+int
+Tk_WinfoCmdSetLegacy (
+    ClientData clientData,     /* Main window associated with
+                                * interpreter. */
+    Tcl_Interp *interp,                /* Current interpreter. */
+    int argc,                  /* Number of arguments. */
+    char **argv                /* Argument strings. */
+)
+{
+    LegacyMode = 1;
+
+    return TCL_OK;
+}
+
 /*
  *----------------------------------------------------------------------
  *
@@ -750,7 +766,7 @@ Tk_WinfoCmd (
            case PseudoColor:   interp->result = "pseudocolor"; break;
            case GrayScale:     interp->result = "grayscale"; break;
            case DirectColor:   interp->result = "directcolor"; break;
-           case TrueColor:     interp->result = "truecolor"; break;
+           case TrueColor:     interp->result = LegacyMode?"pseudocolor":"truecolor"; break;
            case StaticColor:   interp->result = "staticcolor"; break;
            case StaticGray:    interp->result = "staticgray"; break;
            default:            interp->result = "unknown"; break;
Impressum, Datenschutz