Removed the line selector option, it is now always an inverse bar (except for the Player/Studio of course)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7423 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2005-08-30 11:10:08 +00:00
parent 5efbdb76aa
commit f43216ff0b
11 changed files with 47 additions and 100 deletions

View file

@ -1334,9 +1334,9 @@ voice: ""
new: new:
id: LANG_INVERT_CURSOR id: LANG_INVERT_CURSOR
desc: in settings_menu desc: DEPRECATED
eng: "Line Selector" eng: ""
voice: "Line Selector" voice: ""
new: new:
id: LANG_RECORDING_EDITABLE id: LANG_RECORDING_EDITABLE
@ -1364,15 +1364,15 @@ voice: "Caption backlight"
new: new:
id: LANG_INVERT_CURSOR_POINTER id: LANG_INVERT_CURSOR_POINTER
desc: in settings_menu desc: DEPRECATED
eng: "Pointer" eng: ""
voice: "Pointer" voice: ""
new: new:
id: LANG_INVERT_CURSOR_BAR id: LANG_INVERT_CURSOR_BAR
desc: in settings_menu desc: DEPRECATED
eng: "Bar(Inverse)" eng: ""
voice: "Inverse Bar" voice: ""
new: new:
id: LANG_INVERT_LCD_NORMAL id: LANG_INVERT_LCD_NORMAL

View file

@ -59,8 +59,7 @@ struct menu {
/* pixel margins */ /* pixel margins */
#define MARGIN_X (global_settings.scrollbar && \ #define MARGIN_X (global_settings.scrollbar && \
menu_lines < menus[m].itemcount ? SCROLLBAR_WIDTH : 0) +\ menu_lines < menus[m].itemcount ? SCROLLBAR_WIDTH : 0)
CURSOR_WIDTH
#define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0)
/* position the entry-list starts at */ /* position the entry-list starts at */
@ -73,7 +72,6 @@ struct menu {
the margins, so this is the amount of lines the margins, so this is the amount of lines
we add to the cursor Y position to position we add to the cursor Y position to position
it on a line */ it on a line */
#define CURSOR_WIDTH (global_settings.invert_cursor ? 0 : 4)
#define SCROLLBAR_X 0 #define SCROLLBAR_X 0
#define SCROLLBAR_Y lcd_getymargin() #define SCROLLBAR_Y lcd_getymargin()
@ -95,44 +93,19 @@ struct menu {
static struct menu menus[MAX_MENUS]; static struct menu menus[MAX_MENUS];
static bool inuse[MAX_MENUS] = { false }; static bool inuse[MAX_MENUS] = { false };
#ifdef HAVE_LCD_CHARCELLS
/* count in letter positions, NOT pixels */ /* count in letter positions, NOT pixels */
void put_cursorxy(int x, int y, bool on) void put_cursorxy(int x, int y, bool on)
{ {
#ifdef HAVE_LCD_BITMAP
int fh, fw;
int xpos, ypos;
/* check here instead of at every call (ugly, but cheap) */
if (global_settings.invert_cursor)
return;
lcd_getstringsize("A", &fw, &fh);
xpos = x*6;
ypos = y*fh + lcd_getymargin();
if ( fh > 8 )
ypos += (fh - 8) / 2;
#endif
/* place the cursor */ /* place the cursor */
if(on) { if(on) {
#ifdef HAVE_LCD_BITMAP
lcd_mono_bitmap(bitmap_icons_6x8[Icon_Cursor], xpos, ypos, 4, 8);
#else
lcd_putc(x, y, CURSOR_CHAR); lcd_putc(x, y, CURSOR_CHAR);
#endif
} }
else { else {
#if defined(HAVE_LCD_BITMAP)
/* I use xy here since it needs to disregard the margins */
lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
lcd_fillrect (xpos, ypos, 4, 8);
lcd_set_drawmode(DRMODE_SOLID);
#else
lcd_putc(x, y, ' '); lcd_putc(x, y, ' ');
#endif
} }
} }
#endif
void menu_draw(int m) void menu_draw(int m)
{ {
int i = 0; int i = 0;
@ -180,18 +153,20 @@ void menu_draw(int m)
/* We want to scroll the line where the cursor is */ /* We want to scroll the line where the cursor is */
if((menus[m].cursor - menus[m].top)==(i-menus[m].top)) if((menus[m].cursor - menus[m].top)==(i-menus[m].top))
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
if (global_settings.invert_cursor)
lcd_puts_scroll_style(LINE_X, i-menus[m].top, lcd_puts_scroll_style(LINE_X, i-menus[m].top,
P2STR(menus[m].items[i].desc), STYLE_INVERT); P2STR(menus[m].items[i].desc), STYLE_INVERT);
else #else
lcd_puts_scroll(LINE_X, i-menus[m].top,
P2STR(menus[m].items[i].desc));
#endif #endif
lcd_puts_scroll(LINE_X, i-menus[m].top, P2STR(menus[m].items[i].desc));
else else
lcd_puts(LINE_X, i-menus[m].top, P2STR(menus[m].items[i].desc)); lcd_puts(LINE_X, i-menus[m].top, P2STR(menus[m].items[i].desc));
} }
#ifdef HAVE_LCD_CHARCELLS
/* place the cursor */ /* place the cursor */
put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, true); put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, true);
#endif
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
if (global_settings.scrollbar && menus[m].itemcount > menu_lines) if (global_settings.scrollbar && menus[m].itemcount > menu_lines)

View file

@ -91,7 +91,11 @@ int menu_init(const struct menu_item* mitems, int count, int (*callback)(int, in
const char *button1, const char *button2, const char *button3); const char *button1, const char *button2, const char *button3);
void menu_exit(int menu); void menu_exit(int menu);
#ifdef HAVE_LCD_CHARCELLS
void put_cursorxy(int x, int y, bool on); void put_cursorxy(int x, int y, bool on);
#else
#define put_cursorxy(...)
#endif
/* Returns below define, or number of selected menu item*/ /* Returns below define, or number of selected menu item*/
int menu_show(int m); int menu_show(int m);

View file

@ -48,13 +48,12 @@
#define CURSOR_X (global_settings.scrollbar && \ #define CURSOR_X (global_settings.scrollbar && \
viewer.num_tracks>viewer.num_display_lines?1:0) viewer.num_tracks>viewer.num_display_lines?1:0)
#define CURSOR_Y 0 #define CURSOR_Y 0
#define CURSOR_WIDTH (global_settings.invert_cursor ? 0 : 4)
#define ICON_WIDTH ((viewer.char_width > 6) ? viewer.char_width : 6) #define ICON_WIDTH ((viewer.char_width > 6) ? viewer.char_width : 6)
#define MARGIN_X ((global_settings.scrollbar && \ #define MARGIN_X ((global_settings.scrollbar && \
viewer.num_tracks > viewer.num_display_lines ? \ viewer.num_tracks > viewer.num_display_lines ? \
SCROLLBAR_WIDTH : 0) + CURSOR_WIDTH + \ SCROLLBAR_WIDTH : 0) + \
(global_settings.playlist_viewer_icons ? \ (global_settings.playlist_viewer_icons ? \
ICON_WIDTH : 0)) ICON_WIDTH : 0))
#define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0)
@ -462,7 +461,7 @@ static void display_playlist(void)
if ( viewer.line_height > 8 ) if ( viewer.line_height > 8 )
offset = (viewer.line_height - 8) / 2; offset = (viewer.line_height - 8) / 2;
lcd_mono_bitmap(bitmap_icons_6x8[Icon_Audio], lcd_mono_bitmap(bitmap_icons_6x8[Icon_Audio],
CURSOR_X * 6 + CURSOR_WIDTH, CURSOR_X * 6,
MARGIN_Y+(i*viewer.line_height) + offset, 6, 8); MARGIN_Y+(i*viewer.line_height) + offset, 6, 8);
#else #else
lcd_putc(LINE_X-1, i, Icon_Audio); lcd_putc(LINE_X-1, i, Icon_Audio);
@ -472,7 +471,7 @@ static void display_playlist(void)
{ {
/* Track we are moving */ /* Track we are moving */
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
lcd_putsxy(CURSOR_X * 6 + CURSOR_WIDTH, lcd_putsxy(CURSOR_X * 6,
MARGIN_Y+(i*viewer.line_height), "M"); MARGIN_Y+(i*viewer.line_height), "M");
#else #else
lcd_putc(LINE_X-1, i, 'M'); lcd_putc(LINE_X-1, i, 'M');
@ -482,7 +481,7 @@ static void display_playlist(void)
{ {
/* Queued track */ /* Queued track */
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
lcd_putsxy(CURSOR_X * 6 + CURSOR_WIDTH, lcd_putsxy(CURSOR_X * 6,
MARGIN_Y+(i*viewer.line_height), "Q"); MARGIN_Y+(i*viewer.line_height), "Q");
#else #else
lcd_putc(LINE_X-1, i, 'Q'); lcd_putc(LINE_X-1, i, 'Q');
@ -603,11 +602,10 @@ static void update_display_line(int line, bool scroll)
if (scroll) if (scroll)
{ {
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
if (global_settings.invert_cursor)
lcd_puts_scroll_style(LINE_X, line, str, STYLE_INVERT); lcd_puts_scroll_style(LINE_X, line, str, STYLE_INVERT);
else #else
#endif
lcd_puts_scroll(LINE_X, line, str); lcd_puts_scroll(LINE_X, line, str);
#endif
} }
else else
lcd_puts(LINE_X, line, str); lcd_puts(LINE_X, line, str);
@ -851,18 +849,12 @@ bool playlist_viewer_ex(char* filename)
/* Flash cursor to identify that we are moving a track */ /* Flash cursor to identify that we are moving a track */
cursor_on = !cursor_on; cursor_on = !cursor_on;
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
if (global_settings.invert_cursor)
{
lcd_set_drawmode(DRMODE_COMPLEMENT); lcd_set_drawmode(DRMODE_COMPLEMENT);
lcd_fillrect( lcd_fillrect(
MARGIN_X, MARGIN_Y+(viewer.cursor_pos*viewer.line_height), MARGIN_X, MARGIN_Y+(viewer.cursor_pos*viewer.line_height),
LCD_WIDTH, viewer.line_height); LCD_WIDTH, viewer.line_height);
lcd_set_drawmode(DRMODE_SOLID); lcd_set_drawmode(DRMODE_SOLID);
lcd_invertscroll(LINE_X, viewer.cursor_pos); lcd_invertscroll(LINE_X, viewer.cursor_pos);
}
else
put_cursorxy(CURSOR_X, CURSOR_Y + viewer.cursor_pos,
cursor_on);
lcd_update_rect( lcd_update_rect(
0, MARGIN_Y + (viewer.cursor_pos * viewer.line_height), 0, MARGIN_Y + (viewer.cursor_pos * viewer.line_height),

View file

@ -39,7 +39,6 @@ const unsigned char bitmap_icons_6x8[LastIcon][6] =
{ 0x60, 0x7f, 0x03, 0x33, 0x3f, 0x00 }, /* Musical note */ { 0x60, 0x7f, 0x03, 0x33, 0x3f, 0x00 }, /* Musical note */
{ 0x7e, 0x41, 0x41, 0x42, 0x7e, 0x00 }, /* Folder */ { 0x7e, 0x41, 0x41, 0x42, 0x7e, 0x00 }, /* Folder */
{ 0x55, 0x00, 0x55, 0x55, 0x55, 0x55 }, /* Playlist */ { 0x55, 0x00, 0x55, 0x55, 0x55, 0x55 }, /* Playlist */
{ 0x3e, 0x1c, 0x08, 0x00, 0x00, 0x00 }, /* Cursor / Marker */
{ 0x58, 0x5f, 0x42, 0x50, 0x55, 0x55 }, /* WPS file */ { 0x58, 0x5f, 0x42, 0x50, 0x55, 0x55 }, /* WPS file */
{ 0x63, 0x7f, 0x3a, 0x7f, 0x63, 0x00 }, /* Mod or ajz file */ { 0x63, 0x7f, 0x3a, 0x7f, 0x63, 0x00 }, /* Mod or ajz file */
{ 0x60, 0x70, 0x38, 0x2c, 0x7e, 0x7e }, /* Font file */ { 0x60, 0x70, 0x38, 0x2c, 0x7e, 0x7e }, /* Font file */

View file

@ -36,7 +36,6 @@ enum icons_6x8 {
Icon_Audio, Icon_Audio,
Icon_Folder, Icon_Folder,
Icon_Playlist, Icon_Playlist,
Icon_Cursor,
Icon_Wps, Icon_Wps,
Icon_Firmware, Icon_Firmware,
Icon_Font, Icon_Font,

View file

@ -348,7 +348,7 @@ bool recording_screen(void)
lcd_setfont(FONT_SYSFIXED); lcd_setfont(FONT_SYSFIXED);
lcd_getstringsize("M", &w, &h); lcd_getstringsize("M", &w, &h);
lcd_setmargins(global_settings.invert_cursor ? 0 : w, 8); lcd_setmargins(0, 8);
if(rec_create_directory() > 0) if(rec_create_directory() > 0)
have_recorded = true; have_recorded = true;
@ -598,7 +598,7 @@ bool recording_screen(void)
update_countdown = 1; /* Update immediately */ update_countdown = 1; /* Update immediately */
lcd_setfont(FONT_SYSFIXED); lcd_setfont(FONT_SYSFIXED);
lcd_setmargins(global_settings.invert_cursor ? 0 : w, 8); lcd_setmargins(0, 8);
} }
break; break;
#endif #endif
@ -739,7 +739,7 @@ bool recording_screen(void)
fmt_gain(SOUND_MIC_GAIN, fmt_gain(SOUND_MIC_GAIN,
global_settings.rec_mic_gain, global_settings.rec_mic_gain,
buf2, sizeof(buf2))); buf2, sizeof(buf2)));
if (global_settings.invert_cursor && (pos++ == cursor)) if (pos++ == cursor)
lcd_puts_style(0, 4, buf, STYLE_INVERT); lcd_puts_style(0, 4, buf, STYLE_INVERT);
else else
lcd_puts(0, 4, buf); lcd_puts(0, 4, buf);
@ -754,7 +754,7 @@ bool recording_screen(void)
snprintf(buf, 32, "%s: %s", str(LANG_RECORDING_GAIN), snprintf(buf, 32, "%s: %s", str(LANG_RECORDING_GAIN),
fmt_gain(SOUND_LEFT_GAIN, gain, fmt_gain(SOUND_LEFT_GAIN, gain,
buf2, sizeof(buf2))); buf2, sizeof(buf2)));
if (global_settings.invert_cursor && (pos++ == cursor)) if (pos++ == cursor)
lcd_puts_style(0, 4, buf, STYLE_INVERT); lcd_puts_style(0, 4, buf, STYLE_INVERT);
else else
lcd_puts(0, 4, buf); lcd_puts(0, 4, buf);
@ -763,7 +763,7 @@ bool recording_screen(void)
fmt_gain(SOUND_LEFT_GAIN, fmt_gain(SOUND_LEFT_GAIN,
global_settings.rec_left_gain, global_settings.rec_left_gain,
buf2, sizeof(buf2))); buf2, sizeof(buf2)));
if (global_settings.invert_cursor && (pos++ == cursor)) if (pos++ == cursor)
lcd_puts_style(0, 5, buf, STYLE_INVERT); lcd_puts_style(0, 5, buf, STYLE_INVERT);
else else
lcd_puts(0, 5, buf); lcd_puts(0, 5, buf);
@ -772,16 +772,13 @@ bool recording_screen(void)
fmt_gain(SOUND_RIGHT_GAIN, fmt_gain(SOUND_RIGHT_GAIN,
global_settings.rec_right_gain, global_settings.rec_right_gain,
buf2, sizeof(buf2))); buf2, sizeof(buf2)));
if (global_settings.invert_cursor && (pos++ == cursor)) if (pos++ == cursor)
lcd_puts_style(0, 6, buf, STYLE_INVERT); lcd_puts_style(0, 6, buf, STYLE_INVERT);
else else
lcd_puts(0, 6, buf); lcd_puts(0, 6, buf);
} }
} }
if(global_settings.rec_source != SOURCE_SPDIF)
put_cursorxy(0, 4 + cursor, true);
if (global_settings.rec_source != SOURCE_LINE) { if (global_settings.rec_source != SOURCE_LINE) {
snprintf(buf, 32, "%s %s [%d]", snprintf(buf, 32, "%s %s [%d]",
freq_str[global_settings.rec_frequency], freq_str[global_settings.rec_frequency],

View file

@ -220,7 +220,6 @@ static const struct bit_entry rtc_bits[] =
{1, S_O(invert), false, "invert", off_on }, {1, S_O(invert), false, "invert", off_on },
{1, S_O(flip_display), false, "flip display", off_on }, {1, S_O(flip_display), false, "flip display", off_on },
/* display */ /* display */
{1, S_O(invert_cursor), false, "invert cursor", off_on },
{1, S_O(statusbar), true, "statusbar", off_on }, {1, S_O(statusbar), true, "statusbar", off_on },
{1, S_O(scrollbar), true, "scrollbar", off_on }, {1, S_O(scrollbar), true, "scrollbar", off_on },
#if CONFIG_KEYPAD == RECORDER_PAD #if CONFIG_KEYPAD == RECORDER_PAD

View file

@ -195,8 +195,6 @@ struct user_settings
int contrast; /* lcd contrast: 0-63 0=low 63=high */ int contrast; /* lcd contrast: 0-63 0=low 63=high */
bool invert; /* invert display */ bool invert; /* invert display */
bool invert_cursor; /* invert the current file in dir browser and menu
instead of using the default cursor */
bool flip_display; /* turn display (and button layout) by 180 degrees */ bool flip_display; /* turn display (and button layout) by 180 degrees */
bool bidi_support; /* reverse hebrew/arabic chars: 0=off, 1=on */ bool bidi_support; /* reverse hebrew/arabic chars: 0=off, 1=on */
int poweroff; /* power off timer */ int poweroff; /* power off timer */

View file

@ -268,18 +268,6 @@ static bool flip_display(void)
return rc; return rc;
} }
/**
* Menu to set Line Selector Type (Pointer/Bar)
*/
static bool invert_cursor(void)
{
return set_bool_options(str(LANG_INVERT_CURSOR),
&global_settings.invert_cursor,
STR(LANG_INVERT_CURSOR_BAR),
STR(LANG_INVERT_CURSOR_POINTER),
NULL);
}
/** /**
* Menu to reverse Hebrew and Arabic text according to BiDi algorythm * Menu to reverse Hebrew and Arabic text according to BiDi algorythm
*/ */
@ -1440,7 +1428,6 @@ static bool lcd_settings_menu(void)
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
{ ID2P(LANG_INVERT), invert }, { ID2P(LANG_INVERT), invert },
{ ID2P(LANG_FLIP_DISPLAY), flip_display }, { ID2P(LANG_FLIP_DISPLAY), flip_display },
{ ID2P(LANG_INVERT_CURSOR), invert_cursor },
#endif #endif
}; };
@ -1462,7 +1449,6 @@ static bool lcd_remote_settings_menu(void)
{ ID2P(LANG_CONTRAST), remote_contrast }, { ID2P(LANG_CONTRAST), remote_contrast },
{ ID2P(LANG_INVERT), remote_invert }, { ID2P(LANG_INVERT), remote_invert },
{ ID2P(LANG_FLIP_DISPLAY), remote_flip_display }, { ID2P(LANG_FLIP_DISPLAY), remote_flip_display },
/* { ID2P(LANG_INVERT_CURSOR), invert_cursor },*/
}; };
m=menu_init( items, sizeof(items) / sizeof(*items), NULL, m=menu_init( items, sizeof(items) / sizeof(*items), NULL,

View file

@ -162,7 +162,7 @@ struct tree_context* tree_get_context(void)
/* pixel margins */ /* pixel margins */
#define MARGIN_X (global_settings.scrollbar && \ #define MARGIN_X (global_settings.scrollbar && \
tc.filesindir > tree_max_on_screen ? SCROLLBAR_WIDTH : 0) + \ tc.filesindir > tree_max_on_screen ? SCROLLBAR_WIDTH : 0) + \
CURSOR_WIDTH + (global_settings.show_icons && ICON_WIDTH > 0 ? ICON_WIDTH :0) (global_settings.show_icons && ICON_WIDTH > 0 ? ICON_WIDTH :0)
#define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0)
/* position the entry-list starts at */ /* position the entry-list starts at */
@ -175,7 +175,6 @@ struct tree_context* tree_get_context(void)
the margins, so this is the amount of lines the margins, so this is the amount of lines
we add to the cursor Y position to position we add to the cursor Y position to position
it on a line */ it on a line */
#define CURSOR_WIDTH (global_settings.invert_cursor ? 0 : 4)
#define ICON_WIDTH 6 #define ICON_WIDTH 6
@ -222,11 +221,10 @@ static void showfileline(int line, char* name, int attr, bool scroll)
if(scroll) { if(scroll) {
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
lcd_setfont(FONT_UI); lcd_setfont(FONT_UI);
if (global_settings.invert_cursor)
lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT); lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
else #else
#endif
lcd_puts_scroll(xpos, line, name); lcd_puts_scroll(xpos, line, name);
#endif
} else } else
lcd_puts(xpos, line, name); lcd_puts(xpos, line, name);
@ -396,7 +394,7 @@ static int showdir(void)
if ( line_height > 8 ) if ( line_height > 8 )
offset = (line_height - 8) / 2; offset = (line_height - 8) / 2;
lcd_mono_bitmap(icon, lcd_mono_bitmap(icon,
CURSOR_X * 6 + CURSOR_WIDTH, CURSOR_X * 6,
MARGIN_Y+(i-start)*line_height + offset, 6, 8); MARGIN_Y+(i-start)*line_height + offset, 6, 8);
#else #else
if (icon < 0 ) if (icon < 0 )