Bug #1435
opengtk4 client: small letter "c" gets blocked in chat
0%
Description
Possibly some other markup related letters and some other versions affected. I typed /lua cmd ... but could only /lua Cmd ...
Files
Updated by Dean Brown about 2 months ago
- File 1435.patch added
- File 1435Main.patch added
Target version could be changed to 3.2.2
Updated by Marko Lindqvist about 1 month ago
- Target version changed from 3.4.0 to 3.2.2
I would use word 'enable' instead of 'toggle' even though it might actually be enable = FALSE. In our (and gtk, I think) lingo 'toggle' usually means that something goes to the opposite state to what it currently is, not that it goes to specified state (maybe not changing at all).
Updated by Dean Brown 29 days ago
- File 1435.patch added
- File 1435Main.patch added
Updated by Dean Brown 28 days ago
- File 1435Main.patch added
oops, my bad. I failed to refresh/pull my Main clone. Main does have the #1718 patch. Corrected the 1435Main.patch
Updated by Marko Lindqvist 28 days ago
Updated by Marko Lindqvist 28 days ago
Doesn't making the volume menu entries MGROUP_PLAYER cause e.g. them to be always disabled for global observers? In any case that is quite a hack, misusing the group definition.
Updated by Marko Lindqvist 28 days ago
I think the volume keys issue deserves ticket of its own, as it's different and separate change to the 'c' issue. (It's now a bit unfortunate that you deleted your earlier patches that did what this ticket is about)
Updated by Marko Lindqvist 28 days ago
You shouldn't unconditionally enable all menu items when chatline loses focus - they might should be disabled for other reasons.
Updated by Dean Brown 27 days ago
Thinking more about this -
You shouldn't unconditionally enable all menu items when chatline loses focus - they might should be disabled for other reasons.
Good point, the code in il_lost_focus() should stay as is, just calling real_menus_update();
The current code in il_gained_focus() is also misusing the group definition. I thought when making the volume menu entries MGROUP_PLAYER that was a hack, but calling menus_disable_unit_commands() is also a hack. I have 2 proposals for doing the Right Thing in il_gained_focus() -
1 use code like this, modeled on menu_entry_group_set_sensitive()
int i;
for (i = 0; menu_entries[i].key != NULL; i++) {
if ( Some test of menu_entries[i].accl ) {
menu_entry_set_sensitive_info(map, &(menu_entries[i]), FALSE);
}
}
where "Some test of" means checking for NULL and if not NULL then looking for ACCL_MOD_KEY.
2 Redo the group definition system by changing the enum menu_entry_grouping so that the values are bit flags, e.g.
enum menu_entry_grouping { MGROUP_SAFE = 0B00000001, MGROUP_EDIT = 0B00000010, ...
and add MGROUP_CHAR = 0B01000000. Then the individual menu_entries can have > 1 MGROUP_XXX's or'd together, e.g.
{ "VOLUME_UP", N_("Volume Up"),
"volume_up", "greater", MGROUP_SAFE | MGROUP_CHAR,
NULL, FALSE },
Have to rewrite all code that deals with enum menu_entry_grouping.
Updated by Marko Lindqvist 27 days ago
I wonder if we could simply disable menus completely / disable all menu entries. "Entries with shortcut" are their functionality-wise random (odd) selection to have disabled, and user is not going to use shortcuts of those entries that don't have one, even if they would be enabled.
I just am not sure what it would do to accessing menus with a mouse when focus has been in chatline before that attempted menu access. Likely one couldn't click menus at all, so one would need to do extra click somewhere else for moving the focus.
Updated by Dean Brown 26 days ago
I'm OK with disable menus completely / disable all menu entries. Could make an argument that the Quit item should be available.
If il_gained_focus() calls enable_menus(FALSE); then il_lost_focus() needs to call enable_menus(TRUE); and doesn't need to call real_menus_update(); - what happens then is the whole menu bar disappears/reappears, which is a bit disconcerting. But the question of accessing menus while chatline has focus is moot, can't access what's not there.
il_gained_focus() cannot call menu_entry_group_set_sensitive(G_ACTION_MAP(gui_app()), MGROUP_ALL, FALSE); directly because the enum is local to menu.c, need another routine in menu.c menus_disable_all_commands(). When I tried this it didn't work well - real_menus_update() failed to restore some items (notably "Quit" and "F1" - "F12"). Bugs here? Or real_menus_update() needs to do more. Would need more digging. You can still access the menus.
Updated by Dean Brown 26 days ago
Changed my mind about disable menus completely / disable all menu entries. I use the "Merged" setting for client option "Messages and Chat reports location", so when I'm in the Chat tab I can't see the map view. When chat has focus, I would still want F1 to switch to the map view, so F1 menu item would have to be still enabled.
Updated by Dean Brown 20 days ago
- File 1435.patch 1435.patch added
- File 1435Main.patch added
Going back to my 2 suggestions - I can see tradeoffs for either but decided I like the bit flags approach better. See if you like these new patches.
Also found an independent problem that real_menus_update() didn't re-enable the entries for CENTER_VIEW, VOLUME_UP & VOLUME_DOWN.
Updated by Marko Lindqvist 14 days ago
Patch does not apply to S3_3. I guess it needs patch of its own (the existing patches apply to main & S3_2, and are in my work trees of those branches now)
Updated by Marko Lindqvist 13 days ago
Dean Brown wrote in #note-15:
real_menus_update() failed to restore some items (notably "Quit" and "F1" - "F12"). Bugs here?
real_menus_update() never makes sensitive those menu items that cannot go insensitive in the first place. So when you make it possible for new items to go insensitive, you need to also add the code to make them sensitive again.
Updated by Dean Brown 12 days ago
- File 1435_S3_3.patch added
real_menus_update() never makes sensitive those menu items that cannot go insensitive in the first place. So when you make it possible for new items to go insensitive, you need to also add the code to make them sensitive again.
Latest patches take care of this.
Added 1435_S3_3.patch
Updated by Marko Lindqvist 12 days ago
- Status changed from New to In Review
- Assignee set to Marko Lindqvist
Updated by Marko Lindqvist 9 days ago
- Status changed from In Review to In Progress
- Assignee changed from Marko Lindqvist to Dean Brown
Noticed on main: A)utoworker does not work with this patch. The entry is completely gone from the menus.
Updated by Marko Lindqvist 5 days ago
Marko Lindqvist wrote in #note-24:
Noticed on main: A)utoworker does not work with this patch. The entry is completely gone from the menus.
Same bug is also in S3_3.
Updated by Marko Lindqvist 2 days ago
- Status changed from In Progress to In Review
- Assignee changed from Dean Brown to Marko Lindqvist