summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-08-30 11:10:08 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-08-30 11:10:08 +0000
commitf43216ff0bc6fdf7c2339aefc6c56be09249ce06 (patch)
tree04f30ecbf442f66971ebb432c3382119f8238651 /apps
parent5efbdb76aa15dc86f2158912b23ad64111ed0b90 (diff)
downloadrockbox-f43216ff0bc6fdf7c2339aefc6c56be09249ce06.zip
rockbox-f43216ff0bc6fdf7c2339aefc6c56be09249ce06.tar.gz
rockbox-f43216ff0bc6fdf7c2339aefc6c56be09249ce06.tar.bz2
rockbox-f43216ff0bc6fdf7c2339aefc6c56be09249ce06.tar.xz
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
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/english.lang18
-rw-r--r--apps/menu.c45
-rw-r--r--apps/menu.h4
-rw-r--r--apps/playlist_viewer.c34
-rw-r--r--apps/recorder/icons.c1
-rw-r--r--apps/recorder/icons.h1
-rw-r--r--apps/recorder/recording.c15
-rw-r--r--apps/settings.c1
-rw-r--r--apps/settings.h2
-rw-r--r--apps/settings_menu.c14
-rw-r--r--apps/tree.c12
11 files changed, 47 insertions, 100 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 6feac25..8699fa5 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -1334,9 +1334,9 @@ voice: ""
new:
id: LANG_INVERT_CURSOR
-desc: in settings_menu
-eng: "Line Selector"
-voice: "Line Selector"
+desc: DEPRECATED
+eng: ""
+voice: ""
new:
id: LANG_RECORDING_EDITABLE
@@ -1364,15 +1364,15 @@ voice: "Caption backlight"
new:
id: LANG_INVERT_CURSOR_POINTER
-desc: in settings_menu
-eng: "Pointer"
-voice: "Pointer"
+desc: DEPRECATED
+eng: ""
+voice: ""
new:
id: LANG_INVERT_CURSOR_BAR
-desc: in settings_menu
-eng: "Bar(Inverse)"
-voice: "Inverse Bar"
+desc: DEPRECATED
+eng: ""
+voice: ""
new:
id: LANG_INVERT_LCD_NORMAL
diff --git a/apps/menu.c b/apps/menu.c
index ad22047..3b0ee4d 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -59,8 +59,7 @@ struct menu {
/* pixel margins */
#define MARGIN_X (global_settings.scrollbar && \
- menu_lines < menus[m].itemcount ? SCROLLBAR_WIDTH : 0) +\
- CURSOR_WIDTH
+ menu_lines < menus[m].itemcount ? SCROLLBAR_WIDTH : 0)
#define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0)
/* position the entry-list starts at */
@@ -73,7 +72,6 @@ struct menu {
the margins, so this is the amount of lines
we add to the cursor Y position to position
it on a line */
-#define CURSOR_WIDTH (global_settings.invert_cursor ? 0 : 4)
#define SCROLLBAR_X 0
#define SCROLLBAR_Y lcd_getymargin()
@@ -95,44 +93,19 @@ struct menu {
static struct menu menus[MAX_MENUS];
static bool inuse[MAX_MENUS] = { false };
+#ifdef HAVE_LCD_CHARCELLS
/* count in letter positions, NOT pixels */
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 */
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);
-#endif
}
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, ' ');
-#endif
}
}
-
+#endif
void menu_draw(int m)
{
int i = 0;
@@ -180,18 +153,20 @@ void menu_draw(int m)
/* We want to scroll the line where the cursor is */
if((menus[m].cursor - menus[m].top)==(i-menus[m].top))
#ifdef HAVE_LCD_BITMAP
- if (global_settings.invert_cursor)
- lcd_puts_scroll_style(LINE_X, i-menus[m].top,
- P2STR(menus[m].items[i].desc), STYLE_INVERT);
- else
+ lcd_puts_scroll_style(LINE_X, i-menus[m].top,
+ P2STR(menus[m].items[i].desc), STYLE_INVERT);
+#else
+ lcd_puts_scroll(LINE_X, i-menus[m].top,
+ P2STR(menus[m].items[i].desc));
#endif
- lcd_puts_scroll(LINE_X, i-menus[m].top, P2STR(menus[m].items[i].desc));
else
lcd_puts(LINE_X, i-menus[m].top, P2STR(menus[m].items[i].desc));
}
+#ifdef HAVE_LCD_CHARCELLS
/* place the cursor */
put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, true);
+#endif
#ifdef HAVE_LCD_BITMAP
if (global_settings.scrollbar && menus[m].itemcount > menu_lines)
diff --git a/apps/menu.h b/apps/menu.h
index a378bd8..d8d9386 100644
--- a/apps/menu.h
+++ b/apps/menu.h
@@ -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);
void menu_exit(int menu);
+#ifdef HAVE_LCD_CHARCELLS
void put_cursorxy(int x, int y, bool on);
+#else
+#define put_cursorxy(...)
+#endif
/* Returns below define, or number of selected menu item*/
int menu_show(int m);
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index b7a0427..33e0098 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -48,13 +48,12 @@
#define CURSOR_X (global_settings.scrollbar && \
viewer.num_tracks>viewer.num_display_lines?1: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 MARGIN_X ((global_settings.scrollbar && \
viewer.num_tracks > viewer.num_display_lines ? \
- SCROLLBAR_WIDTH : 0) + CURSOR_WIDTH + \
+ SCROLLBAR_WIDTH : 0) + \
(global_settings.playlist_viewer_icons ? \
ICON_WIDTH : 0))
#define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0)
@@ -462,7 +461,7 @@ static void display_playlist(void)
if ( viewer.line_height > 8 )
offset = (viewer.line_height - 8) / 2;
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);
#else
lcd_putc(LINE_X-1, i, Icon_Audio);
@@ -472,7 +471,7 @@ static void display_playlist(void)
{
/* Track we are moving */
#ifdef HAVE_LCD_BITMAP
- lcd_putsxy(CURSOR_X * 6 + CURSOR_WIDTH,
+ lcd_putsxy(CURSOR_X * 6,
MARGIN_Y+(i*viewer.line_height), "M");
#else
lcd_putc(LINE_X-1, i, 'M');
@@ -482,7 +481,7 @@ static void display_playlist(void)
{
/* Queued track */
#ifdef HAVE_LCD_BITMAP
- lcd_putsxy(CURSOR_X * 6 + CURSOR_WIDTH,
+ lcd_putsxy(CURSOR_X * 6,
MARGIN_Y+(i*viewer.line_height), "Q");
#else
lcd_putc(LINE_X-1, i, 'Q');
@@ -603,11 +602,10 @@ static void update_display_line(int line, bool scroll)
if (scroll)
{
#ifdef HAVE_LCD_BITMAP
- if (global_settings.invert_cursor)
- lcd_puts_scroll_style(LINE_X, line, str, STYLE_INVERT);
- else
+ lcd_puts_scroll_style(LINE_X, line, str, STYLE_INVERT);
+#else
+ lcd_puts_scroll(LINE_X, line, str);
#endif
- lcd_puts_scroll(LINE_X, line, str);
}
else
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 */
cursor_on = !cursor_on;
#ifdef HAVE_LCD_BITMAP
- if (global_settings.invert_cursor)
- {
- lcd_set_drawmode(DRMODE_COMPLEMENT);
- lcd_fillrect(
- MARGIN_X, MARGIN_Y+(viewer.cursor_pos*viewer.line_height),
- LCD_WIDTH, viewer.line_height);
- lcd_set_drawmode(DRMODE_SOLID);
- lcd_invertscroll(LINE_X, viewer.cursor_pos);
- }
- else
- put_cursorxy(CURSOR_X, CURSOR_Y + viewer.cursor_pos,
- cursor_on);
+ lcd_set_drawmode(DRMODE_COMPLEMENT);
+ lcd_fillrect(
+ MARGIN_X, MARGIN_Y+(viewer.cursor_pos*viewer.line_height),
+ LCD_WIDTH, viewer.line_height);
+ lcd_set_drawmode(DRMODE_SOLID);
+ lcd_invertscroll(LINE_X, viewer.cursor_pos);
lcd_update_rect(
0, MARGIN_Y + (viewer.cursor_pos * viewer.line_height),
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index 148235f..4d1d290 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -39,7 +39,6 @@ const unsigned char bitmap_icons_6x8[LastIcon][6] =
{ 0x60, 0x7f, 0x03, 0x33, 0x3f, 0x00 }, /* Musical note */
{ 0x7e, 0x41, 0x41, 0x42, 0x7e, 0x00 }, /* Folder */
{ 0x55, 0x00, 0x55, 0x55, 0x55, 0x55 }, /* Playlist */
- { 0x3e, 0x1c, 0x08, 0x00, 0x00, 0x00 }, /* Cursor / Marker */
{ 0x58, 0x5f, 0x42, 0x50, 0x55, 0x55 }, /* WPS file */
{ 0x63, 0x7f, 0x3a, 0x7f, 0x63, 0x00 }, /* Mod or ajz file */
{ 0x60, 0x70, 0x38, 0x2c, 0x7e, 0x7e }, /* Font file */
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h
index 17605ef..5c442ea 100644
--- a/apps/recorder/icons.h
+++ b/apps/recorder/icons.h
@@ -36,7 +36,6 @@ enum icons_6x8 {
Icon_Audio,
Icon_Folder,
Icon_Playlist,
- Icon_Cursor,
Icon_Wps,
Icon_Firmware,
Icon_Font,
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index ea71538..72d752e 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -348,7 +348,7 @@ bool recording_screen(void)
lcd_setfont(FONT_SYSFIXED);
lcd_getstringsize("M", &w, &h);
- lcd_setmargins(global_settings.invert_cursor ? 0 : w, 8);
+ lcd_setmargins(0, 8);
if(rec_create_directory() > 0)
have_recorded = true;
@@ -598,7 +598,7 @@ bool recording_screen(void)
update_countdown = 1; /* Update immediately */
lcd_setfont(FONT_SYSFIXED);
- lcd_setmargins(global_settings.invert_cursor ? 0 : w, 8);
+ lcd_setmargins(0, 8);
}
break;
#endif
@@ -739,7 +739,7 @@ bool recording_screen(void)
fmt_gain(SOUND_MIC_GAIN,
global_settings.rec_mic_gain,
buf2, sizeof(buf2)));
- if (global_settings.invert_cursor && (pos++ == cursor))
+ if (pos++ == cursor)
lcd_puts_style(0, 4, buf, STYLE_INVERT);
else
lcd_puts(0, 4, buf);
@@ -754,7 +754,7 @@ bool recording_screen(void)
snprintf(buf, 32, "%s: %s", str(LANG_RECORDING_GAIN),
fmt_gain(SOUND_LEFT_GAIN, gain,
buf2, sizeof(buf2)));
- if (global_settings.invert_cursor && (pos++ == cursor))
+ if (pos++ == cursor)
lcd_puts_style(0, 4, buf, STYLE_INVERT);
else
lcd_puts(0, 4, buf);
@@ -763,7 +763,7 @@ bool recording_screen(void)
fmt_gain(SOUND_LEFT_GAIN,
global_settings.rec_left_gain,
buf2, sizeof(buf2)));
- if (global_settings.invert_cursor && (pos++ == cursor))
+ if (pos++ == cursor)
lcd_puts_style(0, 5, buf, STYLE_INVERT);
else
lcd_puts(0, 5, buf);
@@ -772,16 +772,13 @@ bool recording_screen(void)
fmt_gain(SOUND_RIGHT_GAIN,
global_settings.rec_right_gain,
buf2, sizeof(buf2)));
- if (global_settings.invert_cursor && (pos++ == cursor))
+ if (pos++ == cursor)
lcd_puts_style(0, 6, buf, STYLE_INVERT);
else
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) {
snprintf(buf, 32, "%s %s [%d]",
freq_str[global_settings.rec_frequency],
diff --git a/apps/settings.c b/apps/settings.c
index 6649ce3..70049b6 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -220,7 +220,6 @@ static const struct bit_entry rtc_bits[] =
{1, S_O(invert), false, "invert", off_on },
{1, S_O(flip_display), false, "flip display", off_on },
/* display */
- {1, S_O(invert_cursor), false, "invert cursor", off_on },
{1, S_O(statusbar), true, "statusbar", off_on },
{1, S_O(scrollbar), true, "scrollbar", off_on },
#if CONFIG_KEYPAD == RECORDER_PAD
diff --git a/apps/settings.h b/apps/settings.h
index 8387fe0..0df93c9 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -195,8 +195,6 @@ struct user_settings
int contrast; /* lcd contrast: 0-63 0=low 63=high */
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 bidi_support; /* reverse hebrew/arabic chars: 0=off, 1=on */
int poweroff; /* power off timer */
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index a614723..4af1c75 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -269,18 +269,6 @@ static bool flip_display(void)
}
/**
- * 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
*/
static bool bidi_support(void)
@@ -1440,7 +1428,6 @@ static bool lcd_settings_menu(void)
#ifdef HAVE_LCD_BITMAP
{ ID2P(LANG_INVERT), invert },
{ ID2P(LANG_FLIP_DISPLAY), flip_display },
- { ID2P(LANG_INVERT_CURSOR), invert_cursor },
#endif
};
@@ -1462,7 +1449,6 @@ static bool lcd_remote_settings_menu(void)
{ ID2P(LANG_CONTRAST), remote_contrast },
{ ID2P(LANG_INVERT), remote_invert },
{ ID2P(LANG_FLIP_DISPLAY), remote_flip_display },
-/* { ID2P(LANG_INVERT_CURSOR), invert_cursor },*/
};
m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
diff --git a/apps/tree.c b/apps/tree.c
index e56c7a7..e9ee881 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -162,7 +162,7 @@ struct tree_context* tree_get_context(void)
/* pixel margins */
#define MARGIN_X (global_settings.scrollbar && \
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)
/* 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
we add to the cursor Y position to position
it on a line */
-#define CURSOR_WIDTH (global_settings.invert_cursor ? 0 : 4)
#define ICON_WIDTH 6
@@ -222,11 +221,10 @@ static void showfileline(int line, char* name, int attr, bool scroll)
if(scroll) {
#ifdef HAVE_LCD_BITMAP
lcd_setfont(FONT_UI);
- if (global_settings.invert_cursor)
- lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
- else
+ lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
+#else
+ lcd_puts_scroll(xpos, line, name);
#endif
- lcd_puts_scroll(xpos, line, name);
} else
lcd_puts(xpos, line, name);
@@ -396,7 +394,7 @@ static int showdir(void)
if ( line_height > 8 )
offset = (line_height - 8) / 2;
lcd_mono_bitmap(icon,
- CURSOR_X * 6 + CURSOR_WIDTH,
+ CURSOR_X * 6,
MARGIN_Y+(i-start)*line_height + offset, 6, 8);
#else
if (icon < 0 )