diff --git a/TeXmacs/progs/generic/document-edit.scm b/TeXmacs/progs/generic/document-edit.scm index ef466562fb..71d0644afc 100644 --- a/TeXmacs/progs/generic/document-edit.scm +++ b/TeXmacs/progs/generic/document-edit.scm @@ -582,10 +582,11 @@ ("document update times" "3" notify-doc-update-times)) (define (wait-update-current-buffer) - (system-wait "Updating current buffer, " "please wait") + (set-message "Updating current buffer ..." "please wait") (update-current-buffer)) (tm-define (update-document what) + (set-cursor-style "wait") (for (.. 0 doc-update-times) (delayed ; allow typesetting/magic to happen before next update (:idle 1) @@ -596,4 +597,5 @@ (generate-all-aux) (wait-update-current-buffer)) ((== what "buffer") (wait-update-current-buffer)) - (else (generate-aux what))))))) + (else (generate-aux what)))))) + (delayed (:idle 1) (set-cursor-style "normal"))) diff --git a/devel/201_86.md b/devel/201_86.md new file mode 100644 index 0000000000..40cc4c651b --- /dev/null +++ b/devel/201_86.md @@ -0,0 +1,32 @@ +# 201_86: Remove popups causing screen flash when inserting Automatic content + +### Issue #2814 : +When using `Insert -> Automatic -> Table of contents / Index / Glossary / List of figures / List of tables`, +the editor shows repeated popup/wait dialogs and visible screen disturbance. + +### How to Test + Open any text document with section/index/glossary markers. + Trigger any of this via `Insert -> Automatic`: + - Table of contents + - Index + - Glossary + - List of figures + - List of tables + Content will be inserted just like before but without popup, Wait cursor appears during the update and resets after. (wait cursor may not be visible due to fast update) + Instead of popup now "Updating current buffer ..." message is shown in status bar. + + +### What Changed + +#### `document-edit.scm`: `system-wait` → `set-message` + wait cursor +- Replaced popup dialog with footer status bar message +- Added `set-cursor-style "wait"/"normal"` around `update-document` + +#### `edit_process.cpp`: `system_wait` → `set_message` +Replaced popup in `generate_bibliography`, `generate_index`, `generate_glossary`. + + +### Why +`system-wait` created popup overlays via `show_wait_indicator` in `qt_gui.cpp`. With 3 update passes +(`doc-update-times=3`), this produced 3-12 popup flashes per operation. Replaced with `set-message` +(footer bar) and `set-cursor-style "wait"` (spinning cursor) for non-intrusive feedback. \ No newline at end of file diff --git a/src/Edit/Process/edit_process.cpp b/src/Edit/Process/edit_process.cpp index 8b659b1d51..b36f2bbc57 100644 --- a/src/Edit/Process/edit_process.cpp +++ b/src/Edit/Process/edit_process.cpp @@ -113,7 +113,7 @@ edit_process_rep::generate_bibliography (string bib, string style, string fname) { #ifdef USE_PLUGIN_BIBTEX if (N (style) == 0) style= "tm-plain"; - system_wait ("Generating bibliography, ", "please wait"); + set_message ("Generating bibliography ... ", "please wait"); if (DEBUG_AUTO) debug_automatic << "Generating bibliography" << " [" << bib << ", " << style << ", " << fname << "]\n"; @@ -420,7 +420,7 @@ make_entry (tree& D, tree t, hashmap refs, bool rec) { void edit_process_rep::generate_index (string idx) { - system_wait ("Generating index, ", "please wait"); + set_message ("Generating index ...", "please wait"); if (DEBUG_AUTO) debug_automatic << "Generating index [" << idx << "]\n"; tree I= copy (buf->data->aux[idx]); hashmap R= buf->data->ref; @@ -467,7 +467,7 @@ edit_process_rep::generate_index (string idx) { void edit_process_rep::generate_glossary (string gly) { - system_wait ("Generating glossary, ", "please wait"); + set_message ("Generating glossary ...", "please wait"); if (DEBUG_AUTO) debug_automatic << "Generating glossary [" << gly << "]\n"; tree G= copy (buf->data->aux[gly]); if (buf->prj != NULL) G= copy (buf->prj->data->aux[gly]);