Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions TeXmacs/progs/generic/document-edit.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")))
32 changes: 32 additions & 0 deletions devel/201_86.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 3 additions & 3 deletions src/Edit/Process/edit_process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -420,7 +420,7 @@ make_entry (tree& D, tree t, hashmap<string, tree> 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<string, tree> R= buf->data->ref;
Expand Down Expand Up @@ -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]);
Expand Down