diff options
author | gcramer <remarcg@gmx.net> | 2017-05-09 15:01:35 (GMT) |
---|---|---|
committer | gcramer <remarcg@gmx.net> | 2017-05-09 15:01:35 (GMT) |
commit | 341e0d8b25a5ac4bd20c05cc9a5b925095c1e264 (patch) | |
tree | faa11691ee02c714973a51c3a849f4b4953340d2 | |
parent | cba39b335ef5c26c1cac5b10c2247fb495b0909d (diff) | |
download | tk-341e0d8b25a5ac4bd20c05cc9a5b925095c1e264.zip tk-341e0d8b25a5ac4bd20c05cc9a5b925095c1e264.tar.gz tk-341e0d8b25a5ac4bd20c05cc9a5b925095c1e264.tar.bz2 |
(1) All depreciation warnings prefixed with "tk::text: ".
(2) New section "DEPRECIATION WARNINGS" in manual.
-rw-r--r-- | doc/text.n | 63 | ||||
-rw-r--r-- | generic/tkText.c | 15 | ||||
-rw-r--r-- | generic/tkTextMark.c | 2 | ||||
-rw-r--r-- | generic/tkTextTag.c | 8 |
4 files changed, 77 insertions, 11 deletions
@@ -4463,6 +4463,69 @@ be displayed and no text modifications will take place. .PP The behavior of texts can be changed by defining new bindings for individual widgets or by redefining the class bindings. +.SH "DEPRECIATION WARNINGS" +.PP +Some functions/options now are marked as deprecated and will be removed in a +later version. Here is an overview about all possible depreciation warnings, +with possible solutions: +.PP +.IP \(bu 3 +\fBtk::text: Option "-startline" is deprecated, please use option "-startindex".\fR +.IP +Replace all occurrences of +.QW "\fB$w -startline 4\fR" +with +.QW "\fB$w -startindex 4.0\fR". +.IP \(bu 3 +\fBtk::text: Option "-endline" is deprecated, please use option "-endindex".\fR +.IP +Replace all occurrences of +.QW "\fB$w -endline 4\fR" +with +.QW "\fB$w -endindex 3.end\fR" . +.IP \(bu 3 +\fBtk::text: Attempt to modify a disabled widget is deprecated.\fR +.IP +Remove this useless expression, a disabled widget cannot be +modified. +.IP \(bu 3 +\fBtk::text: Attempt to modify a dead widget is deprecated.\fR +.IP +Remove this useless expression, a dead widget (does not contains +linesand do not show an insertion cursor) cannot be modified. +.IP \(bu 3 +\fBtk::text: Command "edit canredo" is deprecated, please use "edit info".\fR +.IP +Replace all occurrences +.QW "\fB[$w edit canredo]\fR" +with +.QW "\fB[set [$w edit info](redodepth)]\fR" . +.IP \(bu 3 +\fBtk::text: Command "edit canundo" is deprecated, please use "edit info".\fR +.IP +Replace all occurrences +.QW "\fB[$w edit canundo]\fR" +with +.QW "\fB[set [$w edit info](undodepth)]\fR" . +.IP \(bu 3 +\fBtk::text: "begin" is a reserved index identifier and shouldn't be used for mark names anymore.\fR +.IP +Replace this mark name with a different mark name, +but do this at all places where \fBbegin\fR is used as a name for a mark. +.IP \(bu 3 +\fBtk::text: Tag option "-overstrikefg" is deprecated, please use option "-overstrikecolor".\fR +.IP +Replace all occurrences +.QW "\fB$w tag configure -overstrikefg black\fR" +with +.QW "\fB$w tag configure -overstrikecolor black\fR" . +.IP \(bu 3 +\fBtk::text: Tag option "-underlinefg" is deprecated, please use option "-underlinecolor".\fR +.IP +Replace all occurrences +.QW "\fB$w tag configure -underlinefg black\fR" +with +.QW "\fB$w tag configure -underlinecolor black\fR" . .SH "KNOWN ISSUES" .SS "ISSUES CONCERNING INDICES" .PP diff --git a/generic/tkText.c b/generic/tkText.c index df9d61a..b1825e9 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -713,14 +713,15 @@ AllocStatistic() static void WarnAboutDeprecatedStartLineOption() { static bool printWarning = true; if (printWarning) { - fprintf(stderr, "Option \"-startline\" is deprecated, please use option \"-startindex\"\n"); + fprintf(stderr, "Option \"-startline\" is deprecated, please use option \"-startindex\".\n"); printWarning = false; } } static void WarnAboutDeprecatedEndLineOption() { static bool printWarning = true; if (printWarning) { - fprintf(stderr, "Option \"-endline\" is deprecated, please use option \"-endindex\"\n"); + fprintf(stderr, "tk::text: Option \"-endline\" is deprecated, " + "please use option \"-endindex\".\n"); printWarning = false; } } @@ -1248,7 +1249,7 @@ TkTextAttemptToModifyDisabledWidget( #if SUPPORT_DEPRECATED_MODS_OF_DISABLED_WIDGET static bool showWarning = true; if (showWarning) { - fprintf(stderr, "Attempt to modify a disabled widget is deprecated\n"); + fprintf(stderr, "tk::text: Attempt to modify a disabled widget is deprecated.\n"); showWarning = false; } return TCL_OK; @@ -1282,7 +1283,7 @@ TkTextAttemptToModifyDeadWidget( #if SUPPORT_DEPRECATED_MODS_OF_DISABLED_WIDGET static bool showWarning = true; if (showWarning) { - fprintf(stderr, "Attempt to modify a dead widget is deprecated\n"); + fprintf(stderr, "tk::text: Attempt to modify a dead widget is deprecated.\n"); showWarning = false; } return TCL_OK; @@ -8939,7 +8940,8 @@ TextEditCmd( if (warnDeprecated) { warnDeprecated = false; - fprintf(stderr, "Command \"edit canredo\" is deprecated, please use \"edit info\"\n"); + fprintf(stderr, "tk::text: Command \"edit canredo\" is deprecated, " + "please use \"edit info\".\n"); } if (objc != 3) { Tcl_WrongNumArgs(interp, 3, objv, NULL); @@ -8957,7 +8959,8 @@ TextEditCmd( if (warnDeprecated) { warnDeprecated = false; - fprintf(stderr, "Command \"edit canundo\" is deprecated, please use \"edit info\"\n"); + fprintf(stderr, "tk::text: Command \"edit canundo\" is deprecated, " + "please use \"edit info\".\n"); } if (objc != 3) { Tcl_WrongNumArgs(interp, 3, objv, NULL); diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c index 4889de1..8fb8c85 100644 --- a/generic/tkTextMark.c +++ b/generic/tkTextMark.c @@ -852,7 +852,7 @@ TkTextMarkCmd( static bool printWarning = true; if (printWarning) { - fprintf(stderr, "\"begin\" is a reserved index identifier and shouldn't " + fprintf(stderr, "tk::text: \"begin\" is a reserved index identifier and shouldn't " "be used for mark names anymore.\n"); printWarning = false; } diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index 07e7926..e8e3cd2 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -1104,15 +1104,15 @@ TkConfigureTag( if (mask & TK_TEXT_DEPRECATED_OVERSTRIKE_FG) { if (warnAboutOverstrikeFg) { - fprintf(stderr, "Tag option \"-overstrikefg\" is deprecated, please use option " - "\"-overstrikecolor\"\n"); + fprintf(stderr, "tk::text: Tag option \"-overstrikefg\" is deprecated, " + "please use option \"-overstrikecolor\".\n"); warnAboutOverstrikeFg = false; } } if (mask & TK_TEXT_DEPRECATED_UNDERLINE_FG) { if (warnAboutUnderlineFg) { - fprintf(stderr, "Tag option \"-underlinefg\" is deprecated, please use option " - "\"-underlinecolor\"\n"); + fprintf(stderr, "tk::text: Tag option \"-underlinefg\" is deprecated, " + "please use option \"-underlinecolor\".\n"); warnAboutUnderlineFg = false; } } |