Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  User Interface and Voice
| | |-+  Some shortcuts are very picky
« previous next »
  • Print
Pages: [1]

Author Topic: Some shortcuts are very picky  (Read 477 times)

Offline iPodVT

  • Member
  • *
  • Posts: 480
Some shortcuts are very picky
« on: January 26, 2025, 11:49:00 PM »
At some point a while back I used the Debug Menu's context menu to add a shortcut on an iPod to the 'View/Dump S.M.A.R.T. data' screen, specified by

type: debug
data: View/Dump S.M.A.R.T. data

and it worked perfectly.

Apparently, when I manually cloned that shortcut over to another iPod I capitalized the 'd' in 'S.M.A.R.T. data' and didn't think to test it at the time.  Tonight while using that 2nd iPod I found that the capitalization breaks the shortcut and it failed to open the S.M.A.R.T. data screen.  So I tested capitalizing two other shortcuts, with mixed results.

This one broke when I changed 'SysCfg' to 'sysCfg':
type: debug
data: View SysCfg

This one did not break when I changed 'capacity' to 'Capacity':
type: setting
data: battery capacity

I didn't test any others to find out whether or not the case sensitivity is limited to shortcuts of type debug - I figured it would be faster and more conclusive for a developer to look at the code rather than me manually testing a lot of individual shortcuts.

Is it intentional/necessary that those (and maybe other) shortcut data specs be case sensitive?
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1194
Re: Some shortcuts are very picky
« Reply #1 on: January 27, 2025, 12:14:56 AM »
I believe everything I saw used strcasecmp case insensitive matching might be a different path its taking though
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 480
Re: Some shortcuts are very picky
« Reply #2 on: January 27, 2025, 08:41:46 AM »
It occurred to me that the two shortcuts that broke (SysCfg and S.M.A.R.T. data) were for Debug Menu features that are not available on all devices (they're not available on some of the iPod models I have), and I thought that might be significant.  So even though I had done the testing on an ipod6g which does include those features, I just now tried capitalizing the 'i' in 'info' for the shortcut

type: debug
data: View database info

which I believe is a feature available on all devices (or at least on every iPod model that I have).  I tried it on an ipod6g, and that one broke, too.

So far I'm 3 for 3 with broken Debug Menu shortcuts and 0 for 1 with non Debug Menu shortcuts.

Admittedly, this is probably a very low priority issue but I thought I should mention it.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1194
Re: Some shortcuts are very picky
« Reply #3 on: January 27, 2025, 10:29:02 AM »
fixed. https://gerrit.rockbox.org/r/c/rockbox/+/6362
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 480
Re: Some shortcuts are very picky
« Reply #4 on: January 27, 2025, 06:01:09 PM »
Thanks very much.  I installed the latest dev build, retested the same situations as before, and there were no problems with case sensitivity.

I hope it wasn't a time-consuming pain to fix it, considering that the work-around was as simple as just using the 'correct' capitalizations.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1194
Re: Some shortcuts are very picky
« Reply #5 on: January 28, 2025, 01:20:40 AM »
https://gerrit.rockbox.org/r/c/rockbox/+/6362

Idk was pretty hard

Code: [Select]
  --- if (!strcmp(screen, menuitems[i].desc))
  +++ if (!strcasecmp(screen, menuitems[i].desc))

 :P thanks for the report
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  User Interface and Voice
| | |-+  Some shortcuts are very picky
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.043 seconds with 17 queries.