mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Initial stab at theme support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7952 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8719f0913a
commit
3b5449f303
5 changed files with 16 additions and 2 deletions
|
@ -3449,3 +3449,8 @@ eng: "Browse .rwps files"
|
|||
voice: "Browse remote while-playing-screen files"
|
||||
new:
|
||||
|
||||
id: LANG_CUSTOM_THEME
|
||||
desc: Custom themes menu
|
||||
eng: "Browse themes"
|
||||
voice: "Browse themes"
|
||||
new:
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#define FONT_DIR "/fonts"
|
||||
#define LANG_DIR "/langs"
|
||||
#define WPS_DIR ROCKBOX_DIR "/wps"
|
||||
#define THEME_DIR ROCKBOX_DIR "/theme"
|
||||
#define PLUGIN_DIR ROCKBOX_DIR"/rocks"
|
||||
#define REC_BASE_DIR "/recordings"
|
||||
|
||||
|
|
|
@ -1004,6 +1004,11 @@ static bool custom_remote_wps_browse(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static bool custom_theme_browse(void)
|
||||
{
|
||||
return rockbox_browse(THEME_DIR, SHOW_CFG);
|
||||
}
|
||||
|
||||
static bool custom_cfg_browse(void)
|
||||
{
|
||||
return rockbox_browse(ROCKBOX_DIR, SHOW_CFG);
|
||||
|
@ -1584,6 +1589,7 @@ static bool display_settings_menu(void)
|
|||
#ifdef HAVE_LCD_BITMAP
|
||||
{ ID2P(LANG_CUSTOM_FONT), font_browse },
|
||||
#endif
|
||||
{ ID2P(LANG_CUSTOM_THEME), custom_theme_browse },
|
||||
{ ID2P(LANG_WHILE_PLAYING), custom_wps_browse },
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
{ ID2P(LANG_REMOTE_WHILE_PLAYING), custom_remote_wps_browse },
|
||||
|
|
|
@ -63,6 +63,7 @@ sub buildzip {
|
|||
mkdir ".rockbox/rocks", 0777;
|
||||
mkdir ".rockbox/codecs", 0777;
|
||||
mkdir ".rockbox/wps", 0777;
|
||||
mkdir ".rockbox/theme", 0777;
|
||||
|
||||
my $c = 'find apps -name "*.codec" ! -empty -exec cp {} .rockbox/codecs/ \;';
|
||||
print `$c`;
|
||||
|
|
|
@ -90,6 +90,7 @@ sub mkdirs {
|
|||
my $wpsdir = $wps;
|
||||
$wpsdir =~ s/\.(r|)wps//;
|
||||
mkdir ".rockbox/wps", 0777;
|
||||
mkdir ".rockbox/theme", 0777;
|
||||
|
||||
if( -d ".rockbox/wps/$wpsdir") {
|
||||
#print STDERR "wpsbuild warning: directory wps/$wpsdir already exists!\n";
|
||||
|
@ -139,7 +140,7 @@ MOO
|
|||
if($statusbar) {
|
||||
push @out, "statusbar: $statusbar\n";
|
||||
}
|
||||
if($rwps) {
|
||||
if($rwps && $isrwps) {
|
||||
push @out, "rwps: /.rockbox/wps/$rwps\n";
|
||||
}
|
||||
|
||||
|
@ -147,7 +148,7 @@ MOO
|
|||
print STDERR "wpsbuild warning: wps/$cfg already exists!\n";
|
||||
}
|
||||
else {
|
||||
open(CFG, ">.rockbox/wps/$cfg");
|
||||
open(CFG, ">.rockbox/theme/$cfg");
|
||||
print CFG @out;
|
||||
close(CFG);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue