Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/gui/bitmap/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void list_draw(struct screen *display, struct gui_synclist *list)
#endif

/* draw the scrollbar if its needed */
if (list->scrollbar != SCROLLBAR_OFF)
if (0) /* BradPod: scrollbar disabled */
{
/* if the scrollbar is shown the text viewport needs to shrink */
if (nb_lines < list->nb_items)
Expand Down
88 changes: 31 additions & 57 deletions apps/gui/statusbar.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi
return;

/* only redraw if forced to, or info has changed */
if (force_redraw || bar->redraw_volume ||
if (bar->redraw_volume ||
#if CONFIG_RTC
(bar->time->tm_min != bar->last_tm_min) ||
#endif
Expand All @@ -270,64 +270,38 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi
display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
display->fill_viewport();
display->set_drawmode(DRMODE_SOLID);
display->setfont(FONT_SYSFIXED);

if (bar->info.battery_state)
gui_statusbar_icon_battery(display, bar->info.battlevel,
bar->info.batt_charge_step);
#ifdef HAVE_USB_POWER
if (bar->info.usb_inserted)
display->mono_bitmap(bitmap_icons_7x8[Icon_USBPlug],
STATUSBAR_PLUG_X_POS,
STATUSBAR_Y_POS, STATUSBAR_PLUG_WIDTH,
SB_ICON_HEIGHT);
#endif /* HAVE_USB_POWER */
#if CONFIG_CHARGING
#ifdef HAVE_USB_POWER
else
#endif
/* draw power plug if charging */
if (bar->info.inserted)
display->mono_bitmap(bitmap_icons_7x8[Icon_Plug],
STATUSBAR_PLUG_X_POS,
STATUSBAR_Y_POS, STATUSBAR_PLUG_WIDTH,
SB_ICON_HEIGHT);
#endif /* CONFIG_CHARGING */
#ifdef HAVE_RECORDING
/* turn off volume display in recording screen */
bool recscreen_on = in_recording_screen();
if (!recscreen_on)
#endif
bar->redraw_volume = gui_statusbar_icon_volume(bar, bar->info.volume);
gui_statusbar_icon_play_state(display, current_playmode() + Icon_Play);

#ifdef HAVE_RECORDING
/* If in recording screen, replace repeat mode, volume
and shuffle icons with recording info */
if (recscreen_on)
gui_statusbar_icon_recording_info(display);
else
#endif
{
gui_statusbar_icon_play_mode(display, bar->info.repeat);

if (bar->info.shuffle)
gui_statusbar_icon_shuffle(display);
}
if (bar->info.keylock)
gui_statusbar_icon_lock(display);
#ifdef HAS_REMOTE_BUTTON_HOLD
if (bar->info.keylockremote)
gui_statusbar_icon_lock_remote(display);
#endif
#if CONFIG_RTC
gui_statusbar_time(display, bar->time);
bar->last_tm_min = bar->time->tm_min;
#endif /* CONFIG_RTC */
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
if(!display->has_disk_led && bar->info.led)
{
gui_statusbar_led(display);
/* BRAD STATUSBAR: date left, time center, battery right */
if (bar->time && valid_time(bar->time)) {
char datebuf[5];
char timebuf[8];
char batbuf[6];
unsigned int w, h;
int hour = bar->time->tm_hour;
const char *ampm = (hour >= 12) ? "pm" : "am";
hour = hour % 12;
if (hour == 0) hour = 12;

/* Date: MMDD on the left */
snprintf(datebuf, sizeof(datebuf), "%02d%02d",
bar->time->tm_mon + 1, bar->time->tm_mday);
display->putsxy(1, 1, datebuf);

/* Time: H:MMPM centered */
snprintf(timebuf, sizeof(timebuf), "%d:%02d%s",
hour, bar->time->tm_min, ampm);
font_getstringsize(timebuf, &w, &h, FONT_UI);
display->putsxy((display->getwidth() - w) / 2,
1, timebuf);

/* Battery: XX% on the right */
snprintf(batbuf, sizeof(batbuf), "%d%%", bar->info.battlevel);
font_getstringsize(batbuf, &w, &h, FONT_UI);
display->putsxy(display->getwidth() - w - 1,
1, batbuf);

bar->last_tm_min = bar->time->tm_min;
}
#endif
display->setfont(FONT_UI);
Expand Down
9 changes: 8 additions & 1 deletion apps/gui/viewport.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,18 @@ void viewport_set_defaults(struct viewport *vp,
viewport_set_fullscreen(vp, screen);
return;
}
sbs_area = sb_skin_get_info_vp(screen);
sbs_area = NULL;

if (sbs_area)
*vp = *sbs_area;
else
#endif /* !__PCTOOL__ */
{
viewport_set_fullscreen(vp, screen);
/* BRAD: push menu below statusbar (12px) + 2px buffer = 14 */
if (global_settings.statusbar != STATUSBAR_OFF) {
vp->y = 14;
vp->height -= 14;
}
}
}
42 changes: 21 additions & 21 deletions apps/lang/english.lang
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@
desc: main menu title
user: core
<source>
*: "Rockbox"
*: ""
</source>
<dest>
*: "Rockbox"
*: ""
</dest>
<voice>
*: "Rockbox"
*: ""
</voice>
</phrase>
<phrase>
Expand Down Expand Up @@ -396,13 +396,13 @@
desc: in the main menu and the settings menu
user: core
<source>
*: "Database"
*: "Brad I"
</source>
<dest>
*: "Database"
*: "Brad I"
</dest>
<voice>
*: "Database"
*: "Brad I"
</voice>
</phrase>
<phrase>
Expand All @@ -424,27 +424,27 @@
desc: in the main menu
user: core
<source>
*: "Resume Playback"
*: "Now Playing"
</source>
<dest>
*: "Resume Playback"
*: "Now Playing"
</dest>
<voice>
*: "Resume Playback"
*: "Now Playing"
</voice>
</phrase>
<phrase>
id: LANG_SETTINGS
desc: in main menu and visual confirmation after settings reset
user: core
<source>
*: "Settings"
*: "Fix Brad"
</source>
<dest>
*: "Settings"
*: "Fix Brad"
</dest>
<voice>
*: "Settings"
*: "Fix Brad"
</voice>
</phrase>
<phrase>
Expand Down Expand Up @@ -500,13 +500,13 @@
desc: in the main menu
user: core
<source>
*: "Plugins"
*: "Extra Brad!"
</source>
<dest>
*: "Plugins"
*: "Extra Brad!"
</dest>
<voice>
*: "Plugins"
*: "Extra Brad!"
</voice>
</phrase>
<phrase>
Expand Down Expand Up @@ -1976,13 +1976,13 @@
desc: show only music-related files
user: core
<source>
*: "Music"
*: "Brad's Music: Season 1"
</source>
<dest>
*: "Music"
*: "Brad's Music: Season 1"
</dest>
<voice>
*: "Music"
*: "Brad's Music: Season 1"
</voice>
</phrase>
<phrase>
Expand Down Expand Up @@ -11617,13 +11617,13 @@
desc: Title in the shortcuts menu
user: core
<source>
*: "Shortcuts"
*: "Vinyl Mode"
</source>
<dest>
*: "Shortcuts"
*: "Vinyl Mode"
</dest>
<voice>
*: "Shortcuts"
*: "Vinyl Mode"
</voice>
</phrase>
<phrase>
Expand Down
16 changes: 9 additions & 7 deletions apps/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,10 @@ static int INIT_ATTR init_dircache(bool preinit)
if (result > 0)
{
/* Print "Scanning disk..." to the display. */
splash(0, str(LANG_SCANNING_DISK));
//splash(0, str(LANG_SCANNING_DISK));
dircache_wait();
backlight_on();
show_logo_boot();
//backlight_on();
//show_logo_boot();
}

struct dircache_info info;
Expand Down Expand Up @@ -390,8 +390,8 @@ static void init_tagcache(void)

if (clear)
{
backlight_on();
show_logo_boot();
//backlight_on();
//show_logo_boot();
}
}
#endif /* HAVE_TAGCACHE */
Expand All @@ -414,10 +414,11 @@ static void init(void)
FOR_NB_SCREENS(i)
global_status.font_id[i] = FONT_SYSFIXED;
font_init();
show_logo_boot();
//show_logo_boot();
button_init();
powermgmt_init();
backlight_init();
backlight_off();
unicode_init();
#ifdef HAVE_MULTIVOLUME
init_volume_names();
Expand Down Expand Up @@ -530,7 +531,7 @@ static void init(void)
settings_reset();

CHART(">show_logo");
show_logo_boot();
//show_logo_boot();
CHART("<show_logo");
lang_init(core_language_builtin, language_strings,
LANG_LAST_INDEX_IN_ARRAY);
Expand All @@ -557,6 +558,7 @@ static void init(void)
#endif

backlight_init();
backlight_off();

button_init();

Expand Down
2 changes: 1 addition & 1 deletion apps/recorder/icons.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ extern const unsigned char bitmap_icon_disk[];

#define STATUSBAR_X_POS 0
#define STATUSBAR_Y_POS 0 /* MUST be a multiple of 8 */
#define STATUSBAR_HEIGHT SYSFONT_HEIGHT
#define STATUSBAR_HEIGHT 12
#define STATUSBAR_WIDTH LCD_WIDTH
#define SB_ICON_HEIGHT 8 /* ... for now */
#define ICON_BATTERY_X_POS 0
Expand Down
4 changes: 4 additions & 0 deletions apps/root_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "root_menu.h"
#include "lang.h"
#include "settings.h"
#include "backlight.h"
#include "screens.h"
#include "kernel.h"
#include "debug.h"
Expand Down Expand Up @@ -971,6 +972,9 @@ void root_menu(void)
* button to be handled by HOST instead of rockbox */
ignore_back_button_stub(true);

lcd_clear_display();
lcd_update();
backlight_on();
next_screen = do_menu(&root_menu_, &selected, NULL, false);

ignore_back_button_stub(false);
Expand Down
Loading