1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
Description: fix waveform display with Tcl/Tk 8.5
Transcriber relied on deprecated TK_CONFIG_OPTION_SPECIFIED flag in
order to display the waveform. This is not supported in Tcl/Tk 8.5,
and the waveform was no longer displayed. This patch fixes this
issue.
Author: Claude Barras
Forwarded: not-needed
Reviewed-by: Giulio Paci <giuliopaci@gmail.com>
Last-Update: 2013-11-14
--- a/src/segmt.c
+++ b/src/segmt.c
@@ -359,6 +359,9 @@
int SegmtConfigure( Tcl_Interp *interp, Segmt *a,
int argc, char *argv[], int flags)
{
+ char *previousSegVarName = a->segVarName;
+ char *previousTimeArrayName = a->timeArrayName;
+
/* Unregister traces */
if (a->segVarName != NULL) {
Tcl_UntraceVar(interp, a->segVarName,
@@ -393,8 +396,8 @@
TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
TimeVarProc, (ClientData) a);
}
- if ((configSpecs[OPTION_SEGNAME].specFlags & TK_CONFIG_OPTION_SPECIFIED)
- || (configSpecs[OPTION_TIMENAME].specFlags & TK_CONFIG_OPTION_SPECIFIED)) {
+ if (a->segVarName != previousSegVarName
+ || a->timeArrayName != previousTimeArrayName) {
AskRedraw(a, REALLY|SEGVAR);
}
--- a/src/wavfm.c
+++ b/src/wavfm.c
@@ -483,6 +483,7 @@
{
XGCValues gcValues;
GC newGC;
+ char *previousSignal = w->signal;
if (Tk_ConfigureWidget( interp, w->tkwin, configSpecs,
argc, argv, (char *) w, flags) != TCL_OK) {
@@ -528,7 +529,7 @@
w->selectgc = newGC;
/* New signal name */
- if (configSpecs[OPTION_SIGNAME].specFlags & TK_CONFIG_OPTION_SPECIFIED) {
+ if (w->signal != previousSignal) {
w->prev_begin=0;
w->prev_length=0;
w->prev_width=0;
|