diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-08-08 19:23:28 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-08-08 19:23:28 +0000 |
| commit | 41a53d2c1c536d20823f357af887c9ff74991efd (patch) | |
| tree | 365987aa7fdada4786fc280b50319d0cb1bb2acb /apps | |
| parent | 1874a33298f6b639893e4bc8e556fd71e2c068d3 (diff) | |
| download | rockbox-41a53d2c1c536d20823f357af887c9ff74991efd.zip rockbox-41a53d2c1c536d20823f357af887c9ff74991efd.tar.gz rockbox-41a53d2c1c536d20823f357af887c9ff74991efd.tar.bz2 rockbox-41a53d2c1c536d20823f357af887c9ff74991efd.tar.xz | |
Patch #783877 by Gadi Cohen updated by Naftali Goldstein - Bidirectional text support for Hebrew and Arabic
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7292 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/lang/english.lang | 6 | ||||
| -rw-r--r-- | apps/settings.c | 8 | ||||
| -rw-r--r-- | apps/settings.h | 1 | ||||
| -rw-r--r-- | apps/settings_menu.c | 14 |
4 files changed, 28 insertions, 1 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index f8c0c33..c50a126 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -3238,3 +3238,9 @@ desc: in browse_id3 eng: "<No gain>" voice "" new: + +id: LANG_BIDI_SUPPORT +desc: in settings_menu, option to enable reversal of hebrew/arabic text +eng: "BiDi Hebrew/Arabic" +voice "" +new: diff --git a/apps/settings.c b/apps/settings.c index d37e026..63e7a3b 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -40,6 +40,7 @@ #include "power.h" #include "backlight.h" #include "powermgmt.h" +#include "bidi.h" #include "status.h" #include "atoi.h" #include "screens.h" @@ -265,10 +266,14 @@ static const struct bit_entry rtc_bits[] = {1, S_O(remote_flip_display), false, "remote flip display", off_on }, #endif +#ifdef HAVE_LCD_BITMAP /* move to LCD next time we bump version */ + {1, S_O(bidi_support), false, "bidi hebrew/arabic", off_on }, +#endif + /* new stuff to be added here */ /* If values are just added to the end, no need to bump the version. */ - /* Current sum of bits: 268 (worst case, but w/o remote lcd) */ + /* Current sum of bits: 277 (worst case, but w/o remote lcd) */ /* Sum of all bit sizes must not grow beyond 288! */ }; @@ -820,6 +825,7 @@ void settings_apply(void) #endif #ifdef HAVE_LCD_BITMAP + set_bidi_support(global_settings.bidi_support); lcd_set_invert_display(global_settings.invert); lcd_set_flip(global_settings.flip_display); button_set_flip(global_settings.flip_display); diff --git a/apps/settings.h b/apps/settings.h index e0a61bf..ff12186 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -197,6 +197,7 @@ struct user_settings 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 */ int backlight_timeout; /* backlight off timeout: 0-18 0=never, 1=always, diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 50f1396..54267e9 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -38,6 +38,7 @@ #include "fat.h" /* For dotfile settings */ #include "sleeptimer.h" #include "powermgmt.h" +#include "bidi.h" #include "rtc.h" #include "ata.h" #include "tree.h" @@ -279,6 +280,18 @@ static bool invert_cursor(void) } /** + * Menu to reverse Hebrew and Arabic text according to BiDi algorythm + */ +static bool bidi_support(void) +{ + return set_bool_options( str(LANG_BIDI_SUPPORT), + &global_settings.bidi_support, + STR(LANG_SET_BOOL_YES), + STR(LANG_SET_BOOL_NO), + set_bidi_support); +} + +/** * Menu to configure the battery display on status bar */ static bool battery_display(void) @@ -1421,6 +1434,7 @@ static bool lcd_settings_menu(void) { ID2P(LANG_INVERT), invert }, { ID2P(LANG_FLIP_DISPLAY), flip_display }, { ID2P(LANG_INVERT_CURSOR), invert_cursor }, + { ID2P(LANG_BIDI_SUPPORT), bidi_support }, #endif }; |