Page 1 of 2
Problem with Undo/Redo in TextEditor
Posted: Thu Feb 13, 2025 9:45 am
by Allanon
Hello everyone,
I'm writing a simple editor but I'm not able to receive UndoAvailable & RedoAvailable events.
After some readings I tried the TextEditor example and I noticed that Undo button is not enabled when the text is changed so i stopped searching on my source because it could be a bug or something related with my system.
I've enabled the notification for such events like this:
Code: Select all
<texteditor id="sew_text_area" height="400" width="400" align="left" nowrap="true" fontname="Droid Sans Mono" fontsize="14" notify="cursorpos;undoavailable;redoavailable;areamarked;haschanged"></texteditor>
I'm on Linux Manjaro, any hints? Thanks in advance

Re: Problem with Undo/Redo in TextEditor
Posted: Thu Feb 13, 2025 3:46 pm
by plouf
i think this is intended
as manual says that by default, only a few notifications are enebled, like button push, all the rest must be manually enabled.
as you said texteditor example in rapagui examples, has this enabled in its notifications and so they work !?
Re: Problem with Undo/Redo in TextEditor
Posted: Thu Feb 13, 2025 5:09 pm
by Allanon
Hi @plouf

,
If you look at the code I attached I've included:
Code: Select all
notify="cursorpos;undoavailable;redoavailable;areamarked;haschanged"
in my xml texteditor gadget definition.
I've copied it from the example: what I wanted to say is that the TextEditor example is affected by the same problem: notify has UndoAvailable and RedoAvailable events activated but in the provided example they seems disabled, the undo/redo gadgets don't get enabled as I type stuff because events are not generated at all. Only these events does not work, HasChanged and CursorPos are working as expected.
That's because I was thinking about something wrong with my system

Do the example TextEditor's Undo/Redo buttons work for you?
Re: Problem with Undo/Redo in TextEditor
Posted: Thu Feb 13, 2025 5:13 pm
by plouf
yes work here
both button arow turn from blue to black
and also test works as it should in undo/redo fucntions,
i am with windows 11, so maybe its a peculiarity/bug of linux version!?
Re: Problem with Undo/Redo in TextEditor
Posted: Thu Feb 13, 2025 6:51 pm
by Allanon
Thank you for the test!

Let's see what other people and Andreas say

Re: Problem with Undo/Redo in TextEditor
Posted: Tue Feb 25, 2025 10:43 pm
by airsoftsoftwair
Might be a Linux thing. Which version are you using? GTK2 or GTK3?
Re: Problem with Undo/Redo in TextEditor
Posted: Sat Apr 05, 2025 1:50 pm
by Allanon
I missed your reply sorry!
I'm on Manjaro + KDE Plasma, I think it should use GTK3, looking at the package manager both GTK2 & 3 are installed.
Here are my system specs:
Code: Select all
██████████████████ ████████ ------------------
██████████████████ ████████ OS: Manjaro Linux x86_64
██████████████████ ████████ Host: 32371P2 ThinkCentre M92p
████████ ████████ Kernel: 6.6.84-1-MANJARO
████████ ████████ ████████ Uptime: 1 hour
████████ ████████ ████████ Packages: 2104 (pacman), 7 (flatpak), 3 (snap)
████████ ████████ ████████ Shell: bash 5.2.37
████████ ████████ ████████ Resolution: 1920x1080
████████ ████████ ████████ DE: Plasma 6.3.3
████████ ████████ ████████ WM: KWin
████████ ████████ ████████ Theme: [Plasma], Breeze-Dark [GTK2], Breeze [GTK3]
████████ ████████ ████████ Icons: [Plasma], breeze [GTK2/3]
████████ ████████ ████████ Terminal: konsole
CPU: Intel i5-3470T (4) @ 3.600GHz
GPU: Intel HD Graphics
Memory: 2015MiB / 7737MiB
Re: Problem with Undo/Redo in TextEditor
Posted: Sun Apr 06, 2025 12:00 am
by airsoftsoftwair
Allanon wrote: ↑Sat Apr 05, 2025 1:50 pm
I'm on Manjaro + KDE Plasma, I think it should use GTK3, looking at the package manager both GTK2 & 3 are installed.
The question is which RapaGUI version you're using. For x64 Linux there are RapaGUI builds for GTK2 and 3. Please check the filesizes to see which one you're using

Re: Problem with Undo/Redo in TextEditor
Posted: Mon Apr 07, 2025 9:05 am
by Allanon
Oh man, sorry, I didn't get right your question!
rapagui.hwp size: 6.438.627 bytes

Re: Problem with Undo/Redo in TextEditor
Posted: Fri Apr 18, 2025 11:01 pm
by airsoftsoftwair
Ok, I can reproduce it here. Looks like a bug or a limitation in wxWidgets. I'll examine.