diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2005-03-14 14:01:02 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2005-03-14 14:01:02 +0000 |
commit | f6e169489476aa53574739fa0532d0e4c06bbd75 (patch) | |
tree | 1b7630b082afd5202a56239503a81999d6c0395d /riscos/menus.c | |
parent | 501da1c487f04fbbe04c3cc2a130a4583621681c (diff) | |
download | netsurf-f6e169489476aa53574739fa0532d0e4c06bbd75.tar.gz netsurf-f6e169489476aa53574739fa0532d0e4c06bbd75.tar.bz2 |
[project @ 2005-03-14 14:01:02 by rjw]
Stop text matching keyboard shortcuts in SELECT entities being right aligned.
svn path=/import/netsurf/; revision=1536
Diffstat (limited to 'riscos/menus.c')
-rw-r--r-- | riscos/menus.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/riscos/menus.c b/riscos/menus.c index 44ad4a6db..8b6163f39 100644 --- a/riscos/menus.c +++ b/riscos/menus.c @@ -2249,6 +2249,7 @@ void gui_create_form_select_menu(struct browser_window *bw, struct form_control *control) { unsigned int i = 0, j; + char *text_convert; struct form_option *option; wimp_pointer pointer; os_error *error; @@ -2303,6 +2304,12 @@ void gui_create_form_select_menu(struct browser_window *bw, /* \todo can cnv_str_local_enc() fail? */ gui_form_select_menu->entries[i].data.indirected_text.text = cnv_str_local_enc(option->text); + /* convert spaces to hard spaces to stop things like 'Go Home' being treated + as if 'Home' is a keyboard shortcut and right aligned in the menu. */ + text_convert = gui_form_select_menu->entries[i].data.indirected_text.text - 1; + while (*++text_convert != '\0') + if (*text_convert == 0x20) + *text_convert = 0xa0; gui_form_select_menu->entries[i].data.indirected_text. validation = "\0"; gui_form_select_menu->entries[i].data.indirected_text.size = |