From 739d76cfda5793256e849acd082d90f1e09c9494 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sat, 6 Nov 2010 01:40:24 +0000 Subject: Android: Use our translations for the yes/no/ok/cancel buttons in the yesno and keyboard dialog. Second part of FS#11708. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28515 a1c6a512-1295-4272-9138-f99709370657 --- apps/hosted/yesno.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'apps/hosted/yesno.c') diff --git a/apps/hosted/yesno.c b/apps/hosted/yesno.c index 2a8c02edd5..d00cb063af 100644 --- a/apps/hosted/yesno.c +++ b/apps/hosted/yesno.c @@ -62,7 +62,10 @@ static void yesno_init(void) RockboxYesno_class, constructor); yesno_func = e->GetMethodID(env_ptr, RockboxYesno_class, - "yesno_display", "(Ljava/lang/String;)V"); + "yesno_display", + "(Ljava/lang/String;" + "Ljava/lang/String;" + "Ljava/lang/String;)V"); yesno_is_usable = e->GetMethodID(env_ptr, RockboxYesno_class, "is_usable", "()Z"); } @@ -100,12 +103,17 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message, JNIEnv e = *env_ptr; jstring message = build_message(main_message); - - e->CallVoidMethod(env_ptr, RockboxYesno_instance, yesno_func, message); + jstring yes = (*env_ptr)->NewStringUTF(env_ptr, str(LANG_SET_BOOL_YES)); + jstring no = (*env_ptr)->NewStringUTF(env_ptr, str(LANG_SET_BOOL_NO)); + + e->CallVoidMethod(env_ptr, RockboxYesno_instance, yesno_func, + message, yes, no); wakeup_wait(&yesno_wakeup, TIMEOUT_BLOCK); e->DeleteLocalRef(env_ptr, message); + e->DeleteLocalRef(env_ptr, yes); + e->DeleteLocalRef(env_ptr, no); return ret ? YESNO_YES : YESNO_NO; } -- cgit v1.2.3