From 1acacc2dcbb10e7cfc90eef7a4a1c4189268d92d Mon Sep 17 00:00:00 2001 From: Tomer Shalev Date: Mon, 5 Oct 2009 18:11:41 +0000 Subject: [PATCH] Revert renaming of the scrollbar global setting by r22945, following discussion in IRC git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22963 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/bitmap/list.c | 14 +++++------- apps/lang/english.lang | 51 ------------------------------------------ apps/settings.h | 2 +- apps/settings_list.c | 5 ++--- 4 files changed, 8 insertions(+), 64 deletions(-) diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index efca22832d..79df35b363 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c @@ -135,9 +135,8 @@ void list_draw(struct screen *display, struct gui_synclist *list) start = list->start_item[screen]; end = start + viewport_get_nb_lines(&list_text[screen]); - scrollbar_in_left = - (!is_rtl && global_settings.scrollbar == SCROLLBAR_SHOW) || - (is_rtl && global_settings.scrollbar == SCROLLBAR_SHOW_OPPOSITE); + scrollbar_in_left = (global_settings.scrollbar == SCROLLBAR_LEFT); + /* draw the scrollbar if its needed */ if (global_settings.scrollbar && viewport_get_nb_lines(&list_text[screen]) < list->nb_items) @@ -358,15 +357,13 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list) return ACTION_NONE; } /* Scroll bar */ - /* TODO: Support RTL mode */ - else if(global_settings.scrollbar == SCROLLBAR_SHOW) + else if(global_settings.scrollbar == SCROLLBAR_LEFT) return gui_synclist_touchscreen_scrollbar(gui_list, y); } else { - /* TODO: Support RTL mode */ if(x>list_text[screen].x+list_text[screen].width && - global_settings.scrollbar == SCROLLBAR_SHOW_OPPOSITE) + global_settings.scrollbar == SCROLLBAR_RIGHT) return gui_synclist_touchscreen_scrollbar(gui_list, y); /* |--------------------------------------------------------| @@ -414,8 +411,7 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list) an item when he wanted to use the scrollbar, due to touchscreen dead zones) */ - /* TODO: Support RTL mode */ - if(global_settings.scrollbar == SCROLLBAR_SHOW_OPPOSITE && + if(global_settings.scrollbar == SCROLLBAR_RIGHT && x > list_text[screen].x + list_text[screen].width - get_icon_width(SCREEN_MAIN)) return ACTION_NONE; diff --git a/apps/lang/english.lang b/apps/lang/english.lang index d34b2e9b32..8be7380225 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -13075,54 +13075,3 @@ swcodec: "Release Time" - - id: LANG_HIDE - desc: in Settings -> General -> Display -> Status-/Scrollbar -> Scrollbar - user: core - - *: none - lcd_bitmap: "Hide" - - - *: none - lcd_bitmap: "Hide" - - - *: none - lcd_bitmap: "Hide" - - - - id: LANG_SHOW - desc: in Settings -> General -> Display -> Status-/Scrollbar -> Scrollbar - user: core - - *: none - lcd_bitmap: "Show" - - - *: none - lcd_bitmap: "Show" - - - *: none - lcd_bitmap: "Show" - - - - id: LANG_SHOW_OPPOSITE - desc: in Settings -> General -> Display -> Status-/Scrollbar -> Scrollbar - user: core - - *: none - lcd_bitmap: "Show Opposite" - - - *: none - lcd_bitmap: "Show Opposite" - - - *: none - lcd_bitmap: "Show Opposite" - - diff --git a/apps/settings.h b/apps/settings.h index 275d1c1ad0..ad250ed3b7 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -158,7 +158,7 @@ enum { REPLAYGAIN_TRACK = 0, REPLAYGAIN_ALBUM, REPLAYGAIN_SHUFFLE, REPLAYGAIN_OF enum { SHOW_PATH_OFF = 0, SHOW_PATH_CURRENT, SHOW_PATH_FULL }; /* scrollbar visibility/position */ -enum { SCROLLBAR_HIDE = 0, SCROLLBAR_SHOW, SCROLLBAR_SHOW_OPPOSITE }; +enum { SCROLLBAR_OFF = 0, SCROLLBAR_LEFT, SCROLLBAR_RIGHT }; /* Alarm settings */ #ifdef HAVE_RTC_ALARM diff --git a/apps/settings_list.c b/apps/settings_list.c index d76c2deb69..62a9351782 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -641,9 +641,8 @@ const struct settings_list settings[] = { ID2P(LANG_STATUSBAR_BOTTOM)), #endif CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, scrollbar, - LANG_SCROLL_BAR, SCROLLBAR_SHOW, - "scrollbar","hide,show,show_opposite", NULL, 3, - ID2P(LANG_HIDE), ID2P(LANG_SHOW), ID2P(LANG_SHOW_OPPOSITE)), + LANG_SCROLL_BAR, SCROLLBAR_LEFT, "scrollbar","off,left,right", + NULL, 3, ID2P(LANG_OFF), ID2P(LANG_LEFT), ID2P(LANG_RIGHT)), INT_SETTING(F_THEMESETTING, scrollbar_width, LANG_SCROLLBAR_WIDTH, 6, "scrollbar width",UNIT_INT, 3, MAX(LCD_WIDTH/10,25), 1, NULL, NULL, NULL),