From c40fc354b3783502ce0c9be1629380acb10c0570 Mon Sep 17 00:00:00 2001 From: John Tytgat Date: Tue, 5 Aug 2008 01:23:04 +0000 Subject: - Teached ro_gui_set_icon_string() and ro_gui_get_icon_string() about the difference between direct and indirect icons. - ro_gui_get_icon_string(): - Constify return value of ro_gui_get_icon_string() as you really shouldn't change its contents via this pointer. - Enfore NUL string termination as return value (instead of other control char termination) - Merged ro_gui_set_icon_string_le() into ro_gui_set_icon_string() by adding ro_gui_set_icon_string() and extra to_utf8 parameter. - ro_gui_strncmp(): added svn path=/trunk/netsurf/; revision=4907 --- riscos/wimp_event.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'riscos/wimp_event.c') diff --git a/riscos/wimp_event.c b/riscos/wimp_event.c index 8cfe49747..097efafbe 100644 --- a/riscos/wimp_event.c +++ b/riscos/wimp_event.c @@ -180,7 +180,7 @@ bool ro_gui_wimp_event_restore(wimp_w w) case EVENT_TEXT_FIELD: if (event->previous_value.textual) ro_gui_set_icon_string(window->w, event->i, - event->previous_value.textual); + event->previous_value.textual, true); break; case EVENT_CHECKBOX: case EVENT_RADIO: @@ -381,8 +381,8 @@ bool ro_gui_wimp_event_menu_selection(wimp_w w, wimp_i i, wimp_menu *menu, if (menu_entry->menu_flags & wimp_MENU_TICKED) return true; - ro_gui_set_icon_string_le(window->w, event->data.menu_gright.field, - menu_entry->data.indirected_text.text); + ro_gui_set_icon_string(window->w, event->data.menu_gright.field, + menu_entry->data.indirected_text.text, false); ro_gui_wimp_event_prepare_menu(window->w, event); if (window->menu_selection) window->menu_selection(window->w, event->i); @@ -591,7 +591,7 @@ bool ro_gui_wimp_event_mouse_click(wimp_pointer *pointer) void ro_gui_wimp_event_prepare_menu(wimp_w w, struct icon_event *event) { int i; - char *text; + const char *text; unsigned int button_type; wimp_icon_state ic; wimp_menu *menu; -- cgit v1.2.3