|
Bugzilla – Full Text Bug Listing |
| Summary: | YaST Menu Bar Toplevel Shortcut Conflicts | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | Stefan Hundhammer <shundhammer> |
| Component: | YaST2 | Assignee: | YaST Team <yast-internal> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P3 - Medium | ||
| Version: | Current | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Other | ||
| URL: | https://trello.com/c/fCUBIGGg | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Stefan Hundhammer
2020-08-12 09:01:53 UTC
Example:
+------------------------------------+
| [F]ile [V]iew [O]ptions |
| |
| |
| |
| |
| |
| [O]k [C]ancel |
+------------------------------------+
Here the "O" shortcut will conflict between "Options" and "Ok".
The libyui YShortcutManager can handle the YPushButton's shortcut well enough, but the YMenuBar needs 3 shortcuts: One for "File", one for "View", one for "Options" (i.e. for each of the toplevel menus).
We need to add support to the YShortcutManager for multiple shortcuts for each individual widget.
Right now, each widget redefines a method "shortcutProperty()" that returns the property name of whatever property holds the shortcut for the widget: Typically the label. So the YShortcutManager can fetch the shortcuts in a very generic way with
widget->getProperty( widget->shortcutProperty() );
and if it needs to be changed, it can set it with
widget->setProperty( widget->shortcutProperty(), newValue );
This is all very generic with libyui's introspection methods; it does not need any special handling for new widget types.
Now, we need to extend that somehow to handle several of them; possibly with an index and (to avoid a gazillion changes for existing widgets) a method indicating if a widget type has several shortcuts.
Implementation Proposal
=======================
(just an idea, not a formal specification)
bool YWidget::multipleShortcuts() { return false; }
bool YMenuBar::multipleShortcuts() { return true; }
and then possibly
std::vector<std::string> getShortcuts();
void setShortcuts( const std::vector<std::string> &newShortcuts );
which would do nothing in the default implementation in YWidget, and use the toplevel item labels for YMenuBar.
Adding to YaST Scrum board. This was fixed in the meantime. |