Help - Search - Members - Calendar
Full Version: menu_item sort order in 0.8 SDK?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
Aero
I'm pretty sure that in previous SDKs, menu_items would be displayed in the order that they were enumerated. But in 0.8, they are apparently sorted alphanumerically only.

I can sort-of control the order by returning strings that will be sorted correctly in enum_items(), but this doesn't work for submenus, such as Debug shown below:
CODE
  case LOAD_IPOD:
   out = "Components/foo_pod/1 Load iPod Songs To foo_pod Playlist";
   break;
  case SEND_PLAYLIST:
   out = "Components/foo_pod/2 Send Current Playlist To iPod";
   break;
  case EJECT_IPOD:
   out = "Components/foo_pod/3 Eject iPod";
   break;
  case PREFERENCES:
   out = "Components/foo_pod/4 Preferences";
   break;
  case DEBUG_BACKUP:
   out = "Components/foo_pod/Debug/1 Backup iTunesDB";
   break;
  case DEBUG_RESTORE:
   out = "Components/foo_pod/Debug/2 Restore iTunesDB";

Am I just missing something, or is this just how it is?

Also, is there any way to create a separator, other than "--------" w/FLAG_DISABLED_GRAYED set?
Phi
QUOTE(Aero @ Mar 13 2004, 04:46 PM)
I'm pretty sure that in previous SDKs, menu_items would be displayed in the order that they were enumerated.  But in 0.8, they are apparently sorted alphanumerically only.

I do remember in 0.7 items were still sorted alphabetically, even though comments in the SDK did suggest otherwise.

QUOTE
Am I just missing something, or is this just how it is? 

Also, is there any way to create a separator, other than "--------" w/FLAG_DISABLED_GRAYED set?

There was a class in the previous SDK called menu_item_order, which let you order your menus however you wanted (as well as add separators), but this was removed in 0.8 (possibly due to conflicts with the new menu customisations interface present in the current foobar version).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.