forked from len0rd/rockbox
Revert r23212, I committed it accidentally.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23214 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5c244cfcaa
commit
94f7651341
18 changed files with 32 additions and 332 deletions
|
@ -78,7 +78,6 @@ gui/quickscreen.c
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gui/wps.c
|
gui/wps.c
|
||||||
gui/statusbar-skinned.c
|
|
||||||
gui/scrollbar.c
|
gui/scrollbar.c
|
||||||
gui/splash.c
|
gui/splash.c
|
||||||
gui/statusbar.c
|
gui/statusbar.c
|
||||||
|
|
|
@ -477,22 +477,7 @@ int ft_enter(struct tree_context* c)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
case FILE_ATTR_SB:
|
|
||||||
splash(0, ID2P(LANG_WAIT));
|
|
||||||
set_file(buf, (char *)global_settings.sb_file,
|
|
||||||
MAX_FILENAME);
|
|
||||||
settings_apply_skins();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_REMOTE_LCD
|
|
||||||
case FILE_ATTR_RSB:
|
|
||||||
splash(0, ID2P(LANG_WAIT));
|
|
||||||
set_file(buf, (char *)global_settings.rsb_file,
|
|
||||||
MAX_FILENAME);
|
|
||||||
settings_apply_skins();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
/* wps config file */
|
/* wps config file */
|
||||||
case FILE_ATTR_WPS:
|
case FILE_ATTR_WPS:
|
||||||
splash(0, ID2P(LANG_WAIT));
|
splash(0, ID2P(LANG_WAIT));
|
||||||
|
|
|
@ -41,8 +41,6 @@
|
||||||
#define FILE_ATTR_KBD 0x0C00 /* keyboard file */
|
#define FILE_ATTR_KBD 0x0C00 /* keyboard file */
|
||||||
#define FILE_ATTR_FMR 0x0D00 /* preset file */
|
#define FILE_ATTR_FMR 0x0D00 /* preset file */
|
||||||
#define FILE_ATTR_CUE 0x0E00 /* cuesheet file */
|
#define FILE_ATTR_CUE 0x0E00 /* cuesheet file */
|
||||||
#define FILE_ATTR_SB 0x0F00 /* cuesheet file */
|
|
||||||
#define FILE_ATTR_RSB 0x1000 /* cuesheet file */
|
|
||||||
#define FILE_ATTR_MASK 0xFF00 /* which bits tree.c uses for file types */
|
#define FILE_ATTR_MASK 0xFF00 /* which bits tree.c uses for file types */
|
||||||
|
|
||||||
struct filetype {
|
struct filetype {
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
#include "appevents.h"
|
|
||||||
#include "action.h"
|
#include "action.h"
|
||||||
#include "screen_access.h"
|
#include "screen_access.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
|
|
@ -482,12 +482,7 @@ static bool evaluate_conditional(struct gui_wps *gwps, int *token_index)
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
/* clear all pictures in the conditional and nested ones */
|
/* clear all pictures in the conditional and nested ones */
|
||||||
if (data->tokens[i].type == WPS_TOKEN_IMAGE_PRELOAD_DISPLAY)
|
if (data->tokens[i].type == WPS_TOKEN_IMAGE_PRELOAD_DISPLAY)
|
||||||
{
|
clear_image_pos(gwps, find_image(data->tokens[i].value.i&0xFF, gwps->data));
|
||||||
struct gui_img *tmp = find_image(data->tokens[i].value.i&0xFF,
|
|
||||||
data);
|
|
||||||
if (tmp)
|
|
||||||
clear_image_pos(gwps, tmp);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ALBUMART
|
#ifdef HAVE_ALBUMART
|
||||||
if (data->albumart && data->tokens[i].type == WPS_TOKEN_ALBUMART_DISPLAY)
|
if (data->albumart && data->tokens[i].type == WPS_TOKEN_ALBUMART_DISPLAY)
|
||||||
|
@ -504,33 +499,15 @@ static bool evaluate_conditional(struct gui_wps *gwps, int *token_index)
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
struct gui_img* find_image(char label, struct wps_data *data)
|
struct gui_img* find_image(char label, struct wps_data *data)
|
||||||
{
|
{
|
||||||
static int i = 0;
|
|
||||||
struct gui_img *ret = NULL;
|
|
||||||
struct skin_token_list *list = data->images;
|
struct skin_token_list *list = data->images;
|
||||||
if (data->debug)
|
|
||||||
{
|
|
||||||
DEBUGF("%s >> requesting image (id: %d)\n", __func__, n);
|
|
||||||
DEBUGF("%s >> first list data (p: %p\n", __func__, data->images);
|
|
||||||
}
|
|
||||||
while (list)
|
while (list)
|
||||||
{
|
{
|
||||||
struct gui_img *img = (struct gui_img *)list->token->value.data;
|
struct gui_img *img = (struct gui_img *)list->token->value.data;
|
||||||
if (img->label == label)
|
if (img->label == label)
|
||||||
{
|
return img;
|
||||||
i = 0;
|
|
||||||
ret = img; goto end;
|
|
||||||
}
|
|
||||||
list = list->next;
|
list = list->next;
|
||||||
/*
|
|
||||||
if (!list && data->debug)
|
|
||||||
DEBUGF("failed to find: %s\n", img->bm.data);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
i = 0;
|
return NULL;
|
||||||
end:
|
|
||||||
if (data->debug)
|
|
||||||
DEBUGF("%s >> returning %p\n", __func__, ret);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -547,6 +524,7 @@ struct skin_viewport* find_viewport(char label, struct wps_data *data)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Read a (sub)line to the given alignment format buffer.
|
/* Read a (sub)line to the given alignment format buffer.
|
||||||
linebuf is the buffer where the data is actually stored.
|
linebuf is the buffer where the data is actually stored.
|
||||||
align is the alignment format that'll be used to display the text.
|
align is the alignment format that'll be used to display the text.
|
||||||
|
|
|
@ -603,8 +603,6 @@ static int parse_image_load(const char *wps_bufptr,
|
||||||
return WPS_ERROR_INVALID_PARAM;
|
return WPS_ERROR_INVALID_PARAM;
|
||||||
/* save a pointer to the filename */
|
/* save a pointer to the filename */
|
||||||
img->bm.data = (char*)filename;
|
img->bm.data = (char*)filename;
|
||||||
if (wps_data->debug)
|
|
||||||
DEBUGF("%s >> image parsed (label: %c)\n", __func__, *id);
|
|
||||||
img->label = *id;
|
img->label = *id;
|
||||||
img->x = x;
|
img->x = x;
|
||||||
img->y = y;
|
img->y = y;
|
||||||
|
@ -1641,13 +1639,8 @@ void skin_data_reset(struct wps_data *wps_data)
|
||||||
wps_data->wps_progress_pat[i] = 0;
|
wps_data->wps_progress_pat[i] = 0;
|
||||||
}
|
}
|
||||||
wps_data->full_line_progressbar = false;
|
wps_data->full_line_progressbar = false;
|
||||||
|
|
||||||
#ifdef HAVE_REMOTE_LCD
|
|
||||||
data->remote_wps = rwps;
|
|
||||||
#endif
|
#endif
|
||||||
wps_data->wps_loaded = false;
|
wps_data->wps_loaded = false;
|
||||||
if (wps_data->debug)
|
|
||||||
DEBUGF("%s >> wps_data trashed (%p)\n", __func__, data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
|
@ -263,6 +263,7 @@ struct wps_data
|
||||||
int num_tokens;
|
int num_tokens;
|
||||||
/* tick the volume button was last pressed */
|
/* tick the volume button was last pressed */
|
||||||
unsigned int button_time_volume;
|
unsigned int button_time_volume;
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
bool peak_meter_enabled;
|
bool peak_meter_enabled;
|
||||||
bool wps_sb_tag;
|
bool wps_sb_tag;
|
||||||
|
@ -276,7 +277,6 @@ struct wps_data
|
||||||
/* this must not be reset on skin loading */
|
/* this must not be reset on skin loading */
|
||||||
bool remote_wps;
|
bool remote_wps;
|
||||||
#endif
|
#endif
|
||||||
bool debug;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* wps_data end */
|
/* wps_data end */
|
||||||
|
|
|
@ -1,127 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 Thomas Martitz
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
||||||
* KIND, either express or implied.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "system.h"
|
|
||||||
#include "settings.h"
|
|
||||||
#include "appevents.h"
|
|
||||||
#include "screens.h"
|
|
||||||
#include "screen_access.h"
|
|
||||||
#include "skin_engine/skin_engine.h"
|
|
||||||
#include "skin_engine/wps_internals.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* currently only one wps_state is needed */
|
|
||||||
extern struct wps_state wps_state;
|
|
||||||
static struct gui_wps sb_skin[NB_SCREENS];
|
|
||||||
static struct wps_data sb_skin_data[NB_SCREENS];
|
|
||||||
|
|
||||||
/* initial setup of wps_data */
|
|
||||||
static void sb_skin_update(void*);
|
|
||||||
static bool loaded_ok = false;
|
|
||||||
|
|
||||||
void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile)
|
|
||||||
{
|
|
||||||
|
|
||||||
loaded_ok = buf && skin_data_load(sb_skin[screen].data,
|
|
||||||
&screens[screen], buf, isfile);
|
|
||||||
|
|
||||||
|
|
||||||
if (loaded_ok)
|
|
||||||
add_event(GUI_EVENT_ACTIONUPDATE, false, sb_skin_update);
|
|
||||||
else
|
|
||||||
remove_event(GUI_EVENT_ACTIONUPDATE, sb_skin_update);
|
|
||||||
|
|
||||||
#ifdef HAVE_REMOVE_LCD
|
|
||||||
sb_skin[screen].data->remote_wps = !(screen == SCREEN_MAIN);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void sb_skin_data_init(enum screen_type screen)
|
|
||||||
{
|
|
||||||
skin_data_init(sb_skin[screen].data);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool sb_skin_active(void)
|
|
||||||
{
|
|
||||||
return loaded_ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
void sb_skin_update(void* param)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
(void)param;
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
{
|
|
||||||
skin_update(&sb_skin[i], wps_state.do_full_update?
|
|
||||||
WPS_REFRESH_ALL : WPS_REFRESH_NON_STATIC);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void sb_skin_init(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
{
|
|
||||||
skin_data_init(&sb_skin_data[i]);
|
|
||||||
#ifdef HAVE_ALBUMART
|
|
||||||
sb_skin_data[i].wps_uses_albumart = 0;
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_REMOTE_LCD
|
|
||||||
sb_skin_data[i].remote_wps = (i == SCREEN_REMOTE);
|
|
||||||
#endif
|
|
||||||
sb_skin[i].data = &sb_skin_data[i];
|
|
||||||
sb_skin[i].display = &screens[i];
|
|
||||||
sb_skin[i].data->debug = true;
|
|
||||||
DEBUGF("data in init: %p, debug: %d\n", &sb_skin_data[i], sb_skin_data[i].debug);
|
|
||||||
/* Currently no seperate wps_state needed/possible
|
|
||||||
so use the only available ( "global" ) one */
|
|
||||||
sb_skin[i].state = &wps_state;
|
|
||||||
}
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
/*
|
|
||||||
add_event(GUI_EVENT_STATUSBAR_TOGGLE, false, statusbar_toggle_handler);
|
|
||||||
*/
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_ALBUMART
|
|
||||||
bool sb_skin_uses_statusbar(int *width, int *height)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i) {
|
|
||||||
struct gui_wps *gwps = &sb_skin[i];
|
|
||||||
if (gwps->data && (gwps->data->wps_uses_albumart != WPS_ALBUMART_NONE))
|
|
||||||
{
|
|
||||||
if (width)
|
|
||||||
*width = sb_skin[0].data->albumart_max_width;
|
|
||||||
if (height)
|
|
||||||
*height = sb_skin[0].data->albumart_max_height;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
|
@ -1,41 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 Thomas Martitz
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
||||||
* KIND, either express or implied.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#ifndef __STATUSBAR_SKINNED_H__
|
|
||||||
#define __STATUSBAR_SKINNED_H__
|
|
||||||
|
|
||||||
|
|
||||||
void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile);
|
|
||||||
void sb_skin_data_init(enum screen_type screen);
|
|
||||||
|
|
||||||
/* probably temporary, to shut the classic statusbar up */
|
|
||||||
bool sb_skin_active(void);
|
|
||||||
void sb_skin_init(void);
|
|
||||||
|
|
||||||
#ifdef HAVE_ALBUMART
|
|
||||||
bool sb_skin_uses_statusbar(int *width, int *height);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __STATUSBAR_SKINNED_H__ */
|
|
|
@ -189,7 +189,6 @@ int viewportmanager_set_statusbar(const int enabled)
|
||||||
if (showing_bars(i))
|
if (showing_bars(i))
|
||||||
gui_statusbar_draw(&statusbars.statusbars[i], true);
|
gui_statusbar_draw(&statusbars.statusbars[i], true);
|
||||||
}
|
}
|
||||||
if (!sb_skin_active())
|
|
||||||
add_event(GUI_EVENT_ACTIONUPDATE, false, viewportmanager_redraw);
|
add_event(GUI_EVENT_ACTIONUPDATE, false, viewportmanager_redraw);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -251,13 +250,14 @@ void viewportmanager_theme_changed(const int which)
|
||||||
if (which & THEME_STATUSBAR)
|
if (which & THEME_STATUSBAR)
|
||||||
{
|
{
|
||||||
statusbar_enabled = VP_SB_HIDE_ALL;
|
statusbar_enabled = VP_SB_HIDE_ALL;
|
||||||
if (global_settings.statusbar != STATUSBAR_OFF)
|
|
||||||
statusbar_enabled = VP_SB_ONSCREEN(SCREEN_MAIN);
|
FOR_NB_SCREENS(i)
|
||||||
#ifdef HAVE_REMOTE_LCD
|
{
|
||||||
if (global_settings.remote_statusbar != STATUSBAR_OFF)
|
if (statusbar_position(i) != STATUSBAR_OFF)
|
||||||
statusbar_enabled |= VP_SB_ONSCREEN(SCREEN_REMOTE);
|
statusbar_enabled |= VP_SB_ONSCREEN(i);
|
||||||
#endif
|
}
|
||||||
if (statusbar_enabled && !sb_skin_active())
|
|
||||||
|
if (statusbar_enabled != VP_SB_HIDE_ALL)
|
||||||
add_event(GUI_EVENT_ACTIONUPDATE, false, viewportmanager_redraw);
|
add_event(GUI_EVENT_ACTIONUPDATE, false, viewportmanager_redraw);
|
||||||
else
|
else
|
||||||
remove_event(GUI_EVENT_ACTIONUPDATE, viewportmanager_redraw);
|
remove_event(GUI_EVENT_ACTIONUPDATE, viewportmanager_redraw);
|
||||||
|
|
|
@ -131,7 +131,6 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile)
|
||||||
|
|
||||||
loaded_ok = buf && skin_data_load(gui_wps[screen].data,
|
loaded_ok = buf && skin_data_load(gui_wps[screen].data,
|
||||||
&screens[screen], buf, isfile);
|
&screens[screen], buf, isfile);
|
||||||
DEBUGF("%s >> wps loading\n", __func__);
|
|
||||||
if (!loaded_ok) /* load the hardcoded default */
|
if (!loaded_ok) /* load the hardcoded default */
|
||||||
{
|
{
|
||||||
char *skin_buf[NB_SCREENS] = {
|
char *skin_buf[NB_SCREENS] = {
|
||||||
|
@ -1292,7 +1291,6 @@ void gui_sync_wps_init(void)
|
||||||
#ifdef HAVE_REMOTE_LCD
|
#ifdef HAVE_REMOTE_LCD
|
||||||
wps_datas[i].remote_wps = (i == SCREEN_REMOTE);
|
wps_datas[i].remote_wps = (i == SCREEN_REMOTE);
|
||||||
#endif
|
#endif
|
||||||
wps_datas[i].debug = false;
|
|
||||||
gui_wps[i].data = &wps_datas[i];
|
gui_wps[i].data = &wps_datas[i];
|
||||||
gui_wps[i].display = &screens[i];
|
gui_wps[i].display = &screens[i];
|
||||||
/* Currently no seperate wps_state needed/possible
|
/* Currently no seperate wps_state needed/possible
|
||||||
|
|
|
@ -322,7 +322,6 @@ static void init(void)
|
||||||
settings_reset();
|
settings_reset();
|
||||||
settings_load(SETTINGS_ALL);
|
settings_load(SETTINGS_ALL);
|
||||||
gui_sync_wps_init();
|
gui_sync_wps_init();
|
||||||
sb_skin_init();
|
|
||||||
settings_apply(true);
|
settings_apply(true);
|
||||||
init_dircache(true);
|
init_dircache(true);
|
||||||
init_dircache(false);
|
init_dircache(false);
|
||||||
|
|
|
@ -740,7 +740,6 @@ void settings_apply_skins(void)
|
||||||
char buf[MAX_PATH];
|
char buf[MAX_PATH];
|
||||||
/* re-initialize the skin buffer before we start reloading skins */
|
/* re-initialize the skin buffer before we start reloading skins */
|
||||||
skin_buffer_init();
|
skin_buffer_init();
|
||||||
sb_skin_data_init(SCREEN_MAIN);
|
|
||||||
if ( global_settings.wps_file[0] &&
|
if ( global_settings.wps_file[0] &&
|
||||||
global_settings.wps_file[0] != 0xff )
|
global_settings.wps_file[0] != 0xff )
|
||||||
{
|
{
|
||||||
|
@ -752,17 +751,6 @@ void settings_apply_skins(void)
|
||||||
{
|
{
|
||||||
wps_data_load(SCREEN_MAIN, NULL, true);
|
wps_data_load(SCREEN_MAIN, NULL, true);
|
||||||
}
|
}
|
||||||
if ( global_settings.sb_file[0] &&
|
|
||||||
global_settings.sb_file[0] != 0xff ) {
|
|
||||||
snprintf(buf, sizeof buf, WPS_DIR "/%s.sb",
|
|
||||||
global_settings.sb_file);
|
|
||||||
sb_skin_data_load(SCREEN_MAIN, buf, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sb_skin_data_init(SCREEN_MAIN);
|
|
||||||
sb_skin_data_load(SCREEN_MAIN, NULL, true);
|
|
||||||
}
|
|
||||||
#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1)
|
#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1)
|
||||||
if ( global_settings.rwps_file[0])
|
if ( global_settings.rwps_file[0])
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,7 +60,6 @@ struct opt_items {
|
||||||
#define FONT_DIR ROCKBOX_DIR "/fonts"
|
#define FONT_DIR ROCKBOX_DIR "/fonts"
|
||||||
#define LANG_DIR ROCKBOX_DIR "/langs"
|
#define LANG_DIR ROCKBOX_DIR "/langs"
|
||||||
#define WPS_DIR ROCKBOX_DIR "/wps"
|
#define WPS_DIR ROCKBOX_DIR "/wps"
|
||||||
#define SB_DIR ROCKBOX_DIR "/statusbar"
|
|
||||||
#define THEME_DIR ROCKBOX_DIR "/themes"
|
#define THEME_DIR ROCKBOX_DIR "/themes"
|
||||||
#define ICON_DIR ROCKBOX_DIR "/icons"
|
#define ICON_DIR ROCKBOX_DIR "/icons"
|
||||||
|
|
||||||
|
@ -549,7 +548,6 @@ struct user_settings
|
||||||
int peak_meter_max; /* range maximum */
|
int peak_meter_max; /* range maximum */
|
||||||
|
|
||||||
unsigned char wps_file[MAX_FILENAME+1]; /* last wps */
|
unsigned char wps_file[MAX_FILENAME+1]; /* last wps */
|
||||||
unsigned char sb_file[MAX_FILENAME+1]; /* last wps */
|
|
||||||
unsigned char lang_file[MAX_FILENAME+1]; /* last language */
|
unsigned char lang_file[MAX_FILENAME+1]; /* last language */
|
||||||
unsigned char playlist_catalog_dir[MAX_FILENAME+1];
|
unsigned char playlist_catalog_dir[MAX_FILENAME+1];
|
||||||
int skip_length; /* skip length */
|
int skip_length; /* skip length */
|
||||||
|
|
|
@ -1440,8 +1440,6 @@ const struct settings_list settings[] = {
|
||||||
#endif
|
#endif
|
||||||
TEXT_SETTING(F_THEMESETTING,wps_file, "wps",
|
TEXT_SETTING(F_THEMESETTING,wps_file, "wps",
|
||||||
DEFAULT_WPSNAME, WPS_DIR "/", ".wps"),
|
DEFAULT_WPSNAME, WPS_DIR "/", ".wps"),
|
||||||
TEXT_SETTING(F_THEMESETTING,sb_file, "sb",
|
|
||||||
DEFAULT_WPSNAME, WPS_DIR "/", ".sb"),
|
|
||||||
TEXT_SETTING(0,lang_file,"lang","",LANG_DIR "/",".lng"),
|
TEXT_SETTING(0,lang_file,"lang","",LANG_DIR "/",".lng"),
|
||||||
#ifdef HAVE_REMOTE_LCD
|
#ifdef HAVE_REMOTE_LCD
|
||||||
TEXT_SETTING(F_THEMESETTING,rwps_file,"rwps",
|
TEXT_SETTING(F_THEMESETTING,rwps_file,"rwps",
|
||||||
|
|
|
@ -268,8 +268,6 @@ Author: Jens Arnold
|
||||||
<wps>
|
<wps>
|
||||||
Name: cabbiev2.wps
|
Name: cabbiev2.wps
|
||||||
RWPS: cabbiev2.rwps
|
RWPS: cabbiev2.rwps
|
||||||
SB: cabbiev2.sb
|
|
||||||
RSB: cabbiev2.rsb
|
|
||||||
# Real name of the creator of the WPS
|
# Real name of the creator of the WPS
|
||||||
Author: Johannes Voggenthaler, Apoo Maha, Marc Guay, Alex Vanderpol, Jerry Lange, Keith Perri, Mark Fawcus, and Marianne Arnold with support from Rockbox developers and forums. Based on Cabbie by Yohann Misquitta.
|
Author: Johannes Voggenthaler, Apoo Maha, Marc Guay, Alex Vanderpol, Jerry Lange, Keith Perri, Mark Fawcus, and Marianne Arnold with support from Rockbox developers and forums. Based on Cabbie by Yohann Misquitta.
|
||||||
|
|
||||||
|
@ -354,7 +352,6 @@ Statusbar: top
|
||||||
|
|
||||||
# list & remote ui viewports
|
# list & remote ui viewports
|
||||||
ui viewport: -
|
ui viewport: -
|
||||||
ui viewport.176x220x16: 0,0,-,180,-,-,-
|
|
||||||
remote ui viewport: -
|
remote ui viewport: -
|
||||||
</wps>
|
</wps>
|
||||||
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
# cabbie 2.0 default for the Sansa e200 Series by Marc Guay
|
|
||||||
# derived from cabbie 2.0 default (C) 2007, Johannes Voggenthaler (Zinc Alloy)
|
|
||||||
%wd
|
|
||||||
%xl|A|lock-176x220x16.bmp|51|24|2|
|
|
||||||
%xl|B|battery-176x220x16.bmp|73|26|10|
|
|
||||||
%xl|C|volume-176x220x16.bmp|97|26|10|
|
|
||||||
%xl|D|shuffle-176x220x16.bmp|119|27|
|
|
||||||
%xl|E|repeat-176x220x16.bmp|144|24|4|
|
|
||||||
%xl|F|playmode-176x220x16.bmp|159|24|5|
|
|
||||||
#NowPlaying
|
|
||||||
%V|0|180|-|-|-|-|-|
|
|
||||||
%pb|pb-176x220x16.bmp|5|2|166|8|
|
|
||||||
%al %pc%ac%pp of %pe%ar%pr
|
|
||||||
%?mh<%xdAa|%xdAb>
|
|
||||||
%?bp<%?bc<%xdBa|%xdBb>|%?bl<|%xdBc|%xdBd|%xdBe|%xdBf|%xdBg|%xdBh|%xdBi|%xdBj>>
|
|
||||||
%?pv<%xdCa|%xdCb|%xdCc|%xdCd|%xdCe|%xdCf|%xdCg|%xdCh|%xdCi|%xdCj>
|
|
||||||
%?ps<%xdD>
|
|
||||||
%?mm<|%xdEa|%xdEb|%xdEc|%xdEd>
|
|
||||||
%?mp<%xdFa|%xdFb|%xdFc|%xdFd|%xdFe>
|
|
||||||
#%?C<%C>
|
|
|
@ -32,18 +32,9 @@ my $cppdef = $target;
|
||||||
my @depthlist = ( 16, 8, 4, 2, 1 );
|
my @depthlist = ( 16, 8, 4, 2, 1 );
|
||||||
|
|
||||||
# These parameters are filled in as we parse wpslist
|
# These parameters are filled in as we parse wpslist
|
||||||
my $req_size;
|
|
||||||
my $req_g_wps;
|
|
||||||
my $req_t;
|
|
||||||
my $req_t_wps;
|
|
||||||
my $wps;
|
my $wps;
|
||||||
my $wps_prefix;
|
my $wps_prefix;
|
||||||
my $sb_prefix;
|
|
||||||
my $rwps;
|
my $rwps;
|
||||||
my $sb;
|
|
||||||
my $sb_w_size;
|
|
||||||
my $rsb;
|
|
||||||
my $rsb_w_size;
|
|
||||||
my $width;
|
my $width;
|
||||||
my $height;
|
my $height;
|
||||||
my $font;
|
my $font;
|
||||||
|
@ -51,6 +42,9 @@ my $fgcolor;
|
||||||
my $bgcolor;
|
my $bgcolor;
|
||||||
my $statusbar;
|
my $statusbar;
|
||||||
my $author;
|
my $author;
|
||||||
|
my $req_g;
|
||||||
|
my $req_g_wps;
|
||||||
|
my $req_t_wps;
|
||||||
my $backdrop;
|
my $backdrop;
|
||||||
my $lineselectstart;
|
my $lineselectstart;
|
||||||
my $lineselectend;
|
my $lineselectend;
|
||||||
|
@ -197,25 +191,11 @@ sub copywps
|
||||||
my $dir;
|
my $dir;
|
||||||
my @filelist;
|
my @filelist;
|
||||||
my $file;
|
my $file;
|
||||||
my $__sb;
|
|
||||||
|
|
||||||
if($wpslist =~ /(.*)WPSLIST/) {
|
if($wpslist =~ /(.*)WPSLIST/) {
|
||||||
$dir = $1;
|
$dir = $1;
|
||||||
$__sb = $sb_prefix . "." . $req_size . ".sb";
|
|
||||||
print "$req_t_wps $req_g_wps $sb_prefix\n";
|
|
||||||
print "$dir/$__sb\n";
|
|
||||||
|
|
||||||
# system("cp $dir/$wps .rockbox/wps/");
|
# system("cp $dir/$wps .rockbox/wps/");
|
||||||
# check for <name>.WIDTHxHEIGHTxDEPTH.sb
|
#print "$req_t_wps $req_g_wps\n";
|
||||||
if (-e "$dir/$__sb") {
|
|
||||||
system("cp $dir/$__sb $rbdir/wps/$sb");
|
|
||||||
}
|
|
||||||
# check for <name>.WIDTHxHEIGHTxDEPTH.<model>.sb and overwrite the
|
|
||||||
# previous sb if needed
|
|
||||||
$__sb = $sb_prefix . "." . $req_size . "." . $modelname . ".sb";
|
|
||||||
if (-e "$dir/$__sb") {
|
|
||||||
system("cp $dir/$__sb $rbdir/wps/$sb");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (-e "$dir/$req_t_wps" ) {
|
if (-e "$dir/$req_t_wps" ) {
|
||||||
system("cp $dir/$req_t_wps $rbdir/wps/$wps");
|
system("cp $dir/$req_t_wps $rbdir/wps/$wps");
|
||||||
|
@ -230,9 +210,9 @@ sub copywps
|
||||||
close(WPSFILE);
|
close(WPSFILE);
|
||||||
|
|
||||||
if ($#filelist >= 0) {
|
if ($#filelist >= 0) {
|
||||||
if (-e "$dir/$wps_prefix/$req_size") {
|
if (-e "$dir/$wps_prefix/$req_g") {
|
||||||
foreach $file (@filelist) {
|
foreach $file (@filelist) {
|
||||||
system("cp $dir/$wps_prefix/$req_size/$file $rbdir/wps/$wps_prefix/");
|
system("cp $dir/$wps_prefix/$req_g/$file $rbdir/wps/$wps_prefix/");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif (-e "$dir/$wps_prefix") {
|
elsif (-e "$dir/$wps_prefix") {
|
||||||
|
@ -358,8 +338,6 @@ while(<WPS>) {
|
||||||
undef $wps;
|
undef $wps;
|
||||||
undef $wps_prefix;
|
undef $wps_prefix;
|
||||||
undef $rwps;
|
undef $rwps;
|
||||||
undef $sb;
|
|
||||||
undef $rsb;
|
|
||||||
undef $width;
|
undef $width;
|
||||||
undef $height;
|
undef $height;
|
||||||
undef $font;
|
undef $font;
|
||||||
|
@ -408,24 +386,23 @@ while(<WPS>) {
|
||||||
foreach my $d (@depthlist) {
|
foreach my $d (@depthlist) {
|
||||||
next if ($d > $rdepth);
|
next if ($d > $rdepth);
|
||||||
|
|
||||||
$req_size = $rwidth . "x" . $rheight . "x" . $d;
|
$req_g = $rwidth . "x" . $rheight . "x" . $d;
|
||||||
|
|
||||||
# check for model specific wps
|
# check for model specific wps
|
||||||
$req_g_wps = $wps_prefix . "." . $req_size . "." . $modelname . ".wps";
|
$req_g_wps = $wps_prefix . "." . $req_g . "." . $modelname . ".wps";
|
||||||
last if (-e "$wpsdir/$req_g_wps");
|
last if (-e "$wpsdir/$req_g_wps");
|
||||||
|
|
||||||
# check for normal wps (with WIDTHxHEIGHTxDEPTH)
|
$req_g_wps = $wps_prefix . "." . $req_g . ".wps";
|
||||||
$req_g_wps = $wps_prefix . "." . $req_size . ".wps";
|
|
||||||
last if (-e "$wpsdir/$req_g_wps");
|
last if (-e "$wpsdir/$req_g_wps");
|
||||||
|
|
||||||
if ($isrwps) {
|
if ($isrwps) {
|
||||||
$req_size = $req_size . "." . $main_width . "x" . $main_height . "x" . "$main_depth";
|
$req_g = $req_g . "." . $main_width . "x" . $main_height . "x" . "$main_depth";
|
||||||
|
|
||||||
$req_g_wps = $wps_prefix . "." . $req_size . ".wps";
|
$req_g_wps = $wps_prefix . "." . $req_g . ".wps";
|
||||||
last if (-e "$wpsdir/$req_g_wps");
|
last if (-e "$wpsdir/$req_g_wps");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$req_t_wps = $wps_prefix . $req_t . ".wps";
|
$req_t_wps = $wps_prefix . ".txt" . ".wps";
|
||||||
|
|
||||||
#print "LCD: $wps wants $width x $height\n";
|
#print "LCD: $wps wants $width x $height\n";
|
||||||
#print "LCD: is $rwidth x $rheight\n";
|
#print "LCD: is $rwidth x $rheight\n";
|
||||||
|
@ -477,19 +454,6 @@ while(<WPS>) {
|
||||||
elsif($l =~ /^RWPS\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
|
elsif($l =~ /^RWPS\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
|
||||||
$rwps = $1;
|
$rwps = $1;
|
||||||
}
|
}
|
||||||
elsif($l =~ /^SB: *(.*)/i) {
|
|
||||||
$sb = $sb_prefix = $1;
|
|
||||||
$sb_prefix =~ s/\.(r|)sb//;
|
|
||||||
}
|
|
||||||
elsif($l =~ /^SB\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
|
|
||||||
$sb = $1;
|
|
||||||
}
|
|
||||||
elsif($l =~ /^RSB: *(.*)/i) {
|
|
||||||
$rsb = $1;
|
|
||||||
}
|
|
||||||
elsif($l =~ /^RSB\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
|
|
||||||
$rsb = $1;
|
|
||||||
}
|
|
||||||
elsif($l =~ /^Author: *(.*)/i) {
|
elsif($l =~ /^Author: *(.*)/i) {
|
||||||
$author = $1;
|
$author = $1;
|
||||||
}
|
}
|
||||||
|
@ -562,15 +526,9 @@ while(<WPS>) {
|
||||||
elsif($l =~ /^ui viewport: *(.*)/i) {
|
elsif($l =~ /^ui viewport: *(.*)/i) {
|
||||||
$listviewport = $1;
|
$listviewport = $1;
|
||||||
}
|
}
|
||||||
elsif($l =~ /^ui viewport\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
|
|
||||||
$listviewport = $1;
|
|
||||||
}
|
|
||||||
elsif($l =~ /^remote ui viewport: *(.*)/i) {
|
elsif($l =~ /^remote ui viewport: *(.*)/i) {
|
||||||
$remotelistviewport = $1;
|
$remotelistviewport = $1;
|
||||||
}
|
}
|
||||||
elsif($l =~ /^remote ui viewport\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
|
|
||||||
$remotelistviewport = $1;
|
|
||||||
}
|
|
||||||
else{
|
else{
|
||||||
#print "Unknown line: $l!\n";
|
#print "Unknown line: $l!\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue