Obsidian-StudiosInc / ecrire

General purpose graphical Text Editor built on the Enlightenment Foundation Libraries (EFL)
GNU General Public License v3.0
7 stars 1 forks source link

Some commands are disabled #52

Open Peter2121 opened 4 years ago

Peter2121 commented 4 years ago
Description

On startup of ecrire some commands (menu and toolbar) are disabled. They are enabled only if some keyboard events pass to the text area. If I just paste any text - the commands "Save" and "Save As" are unavailable, so I cannot save my pasted text. BTW, I don't see any reason of disabling "Close" toolbar button on startup.

Steps to reproduce
  1. Start ecrire
  2. Click inside text area to get focus
  3. Paste some text
  4. Try to save text
System information
Peter2121 commented 4 years ago

The same subject:

wltjr commented 4 years ago

Sorry for the delay, thanks for the report. I have an initial fix for the save and save as buttons. I am working on a fix for the undo button.

The close button is disabled until there is something to close. Close and exit are different, but I do need to reconcile the two. Main menu only has exit, toolbar only has close. I will look to make some changes there.

Regarding cut, copy, and select all, it seems some callbacks are not firing. Specifically, it is not firing selection start, which actives cut, copy, and select all. Those are supposed to activate when text is selected, at least the cut and copy buttons. Select all I lumped in with the others, and really should activate when the document contains anything. I guess, I could leave select all enabled.

Peter2121 commented 4 years ago

It looks better for save and save as, but sometimes they are still disabled after typing 'Space' key (open file, hit 'Space' - the both buttons are still disabled). If I hit 'Enter' - they become enabled.

wltjr commented 4 years ago

I think that is due to some issues with elm_code events. The callbacks tend to not fire on initial actions, but only fire on subsequent actions. I see this odd behavior a fair amount. Type one key, undo does not get activated, click else where or type another key, and it activates. I will see if I can address, but pretty sure the elm_code callbacks are not firing when they should, thus the issue.