-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Divide board menu into submenus #9238
Commits on Mar 25, 2020
-
Handle nested submenus of the Tools menu
There is some code that, for each submenu under Tools, shows the selected item in the label of the submenu itself (e.g. before opening the submenu). This was done whenever the Tools menu is opened and iterated over all the items in the submenu to identify the s Previously, this code only looked at direct children of the submenu. Now, this code also looks through submenus recursively, to keep the code working even when items are divided over sub-submenus. This makes a small behaviour change: previously, the first selected item with a non-zero label was used. Now, the first selected item is used, which makes the code a bit cleaner. I cannot quickly see any case where the first selected item would have an empty text (and even more that there is *another* selected item), so this check seems unnecessary. If this case would occur nonetheless, it would only mean the selected item is not displayed in the tools menu, nothing would otherwise break.
Configuration menu - View commit details
-
Copy full SHA for 4e97727 - Browse repository at this point
Copy the full SHA 4e97727View commit details -
Separate the boards menu per platform
Previously, the Tools->Boards menu was one long list, divided into different platforms by (unselectable) headers. When more than one or two platforms were installed, this quickly results in a very long list of boards that is hard to navigate. This commit changes the board menu to have a submenu for each platform, where each submenu contains just the boards for that platform. Note that this first keeps a list of board items and then adds those to the boards menu later. This could have been done directly, but the intermediate list makes it easier to special-case single platform installations, as well as sort the list in subsequent commits. This fixes part of arduino#8858.
Configuration menu - View commit details
-
Copy full SHA for 89cf600 - Browse repository at this point
Copy the full SHA 89cf600View commit details -
Do not use a boards submenu with just one platform
When just one platform is installed, it does not make much sense to use a submenu, so just add the boards directly under the boards menu as before.
Configuration menu - View commit details
-
Copy full SHA for 1964b81 - Browse repository at this point
Copy the full SHA 1964b81View commit details -
Sort board submenus alphabetically
This sorts the board submenus themselves, based on the displayed name. This does not change the ordering of board items within these submenus (which uses the order from boards.txt).
Configuration menu - View commit details
-
Copy full SHA for 55fa3f5 - Browse repository at this point
Copy the full SHA 55fa3f5View commit details -
Do not translate labels of boards submenus
Otherwise it may happen some weird sorting when untraslated and translated labels are sorted together: Arduino megaAVR Boards Arduino nRF52 Board ESP32 Arduino ESP8266 Modules Schede Arduino AVR <-- the localized string falls to the bottom Also there is no way for 3rd party boards developers to actually provide a translation, so let's just remove them.
Configuration menu - View commit details
-
Copy full SHA for e003049 - Browse repository at this point
Copy the full SHA e003049View commit details -
Configuration menu - View commit details
-
Copy full SHA for b821f75 - Browse repository at this point
Copy the full SHA b821f75View commit details