diff options
author | fvogel <fvogelnew1@free.fr> | 2016-05-12 21:42:49 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-05-12 21:42:49 (GMT) |
commit | 285b73d3427cf1e29de1ddc1a6ee2a3a138901a6 (patch) | |
tree | 4c76447ab90db6a3082e142f4355b42285cffb8c | |
parent | 496aa58fc7b28242708064b4bd4f75a055ded9e2 (diff) | |
download | tk-285b73d3427cf1e29de1ddc1a6ee2a3a138901a6.zip tk-285b73d3427cf1e29de1ddc1a6ee2a3a138901a6.tar.gz tk-285b73d3427cf1e29de1ddc1a6ee2a3a138901a6.tar.bz2 |
Aligned GenerateModifiedEvent() on GenerateUndoStackEvent() regarding generation of the event for each peertip_446_canundo
-rw-r--r-- | generic/tkText.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/generic/tkText.c b/generic/tkText.c index 5522154..a9b7527 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -5241,10 +5241,7 @@ TextEditCmd( */ if ((!oldModified) != (!setModified)) { - for (textPtr = textPtr->sharedTextPtr->peers; textPtr != NULL; - textPtr = textPtr->next) { - GenerateModifiedEvent(textPtr); - } + GenerateModifiedEvent(textPtr); } break; case EDIT_REDO: @@ -5391,7 +5388,8 @@ TextGetText( * * Send an event that the text was modified. This is equivalent to: * event generate $textWidget <<Modified>> - * + * for all peers of $textWidget. +* * Results: * None * @@ -5405,8 +5403,11 @@ static void GenerateModifiedEvent( TkText *textPtr) /* Information about text widget. */ { - Tk_MakeWindowExist(textPtr->tkwin); - TkSendVirtualEvent(textPtr->tkwin, "Modified", NULL); + for (textPtr = textPtr->sharedTextPtr->peers; textPtr != NULL; + textPtr = textPtr->next) { + Tk_MakeWindowExist(textPtr->tkwin); + TkSendVirtualEvent(textPtr->tkwin, "Modified", NULL); + } } /* @@ -5460,7 +5461,6 @@ UpdateDirtyFlag( TkSharedText *sharedTextPtr)/* Information about text widget. */ { int oldDirtyFlag; - TkText *textPtr; /* * If we've been forced to be dirty, we stay dirty (until explicitly @@ -5491,10 +5491,7 @@ UpdateDirtyFlag( } if (sharedTextPtr->isDirty == 0 || oldDirtyFlag == 0) { - for (textPtr = sharedTextPtr->peers; textPtr != NULL; - textPtr = textPtr->next) { - GenerateModifiedEvent(textPtr); - } + GenerateModifiedEvent(sharedTextPtr->peers); } } |