Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: Job Van Dam on October 14, 2007, 02:01:42 AM

Title: [Solveded]"Browse Themes" menu display folders as well
Post by: Job Van Dam on October 14, 2007, 02:01:42 AM
Just wondering is it possible to have the "Browse Themes" option display folders as well? Currently it just displays .cfg files.

I make my own themes and change my theme often. I have enough themes where I do have to scroll and I would prefer it if I could catergorize them in folders instead.
I realize I could just go into the .rockbox folder and catergorize them as I see fit or a host of other options but I really find the new "Theme Settings" menu very convient and tidy and if possible would like to keep it that way.

If someone has to bend over backwards just to have folders viewable in the Browse Themes menu don't worry about it, I was just curious. Or if someone knows the file and line of code I have to edit to make folders viewable I compile my own build so I can make that small change myself, thank you.
Title: Re: "Browse Themes" menu display folders as well
Post by: JdGordon on October 14, 2007, 09:28:47 PM
it is possible, but its not going to happen unless you modify the source manually..
Title: Re: "Browse Themes" menu display folders as well
Post by: psycho_maniac on October 14, 2007, 10:20:56 PM
what about adding the folders to the new shortcut feature?
Title: Re: "Browse Themes" menu display folders as well
Post by: Rincewind on October 15, 2007, 05:22:09 AM

what about adding the folders to the new shortcut feature?


in a new shortcut feature folders would be possible I suppose. However, the shortcut feature is only talk at the moment :-\
Title: Re: "Browse Themes" menu display folders as well
Post by: Llorean on October 15, 2007, 05:27:09 AM
You mean, completely ignoring the existing shortcut feature, which would in no way make folders available (shortcuts would be just as not-shown as actual folders).
Title: Re: "Browse Themes" menu display folders as well
Post by: GodEater on October 15, 2007, 08:25:40 AM
I think psycho_maniac meant having your own "Themes" shortcut - which would contain shortcuts to all the subfolders under the Themes directory.

You clearly wouldn't access it from the "Browse Themes" menu entry any more, but it would still provide quick access to a sub-foldered themes folder.
Title: Re: "Browse Themes" menu display folders as well
Post by: Rincewind on October 15, 2007, 09:32:36 AM

You mean, completely ignoring the existing shortcut feature, which would in no way make folders available (shortcuts would be just as not-shown as actual folders).


Sorry, I confused something here. I didn't think about the existing shortcut plugin.
Title: Re: "Browse Themes" menu display folders as well
Post by: Job Van Dam on October 15, 2007, 05:46:39 PM
The Shortcuts thing is ok but I started looking around the source code and by referencing the Commits since 4 weeks back (http://www.rockbox.org/since-4weeks.html) I was able to find out where the Themes menu was (apps\menus\theme-menu.c,  :-[) and started messing around with a single line.

I started messing around with this line (currently line 172):
Code: [Select]
static struct browse_folder_info themes = {THEME_DIR, SHOW_CFG};
and after a few tries changed it into this:
Code: [Select]
static struct browse_folder_info themes = {THEME_DIR, ""};

It does exactly what I wanted it to do now, the Browse Themes menu displays folders. At compilation it displays a small error but it still works though.

Thanks to everyone in this thread for there help, Jonathan Gordon for putting together the Themes menu and all the Rockbox developers for making the code so flexible and easy to read. ;D