diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-11-06 01:40:24 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-11-06 01:40:24 +0000 |
commit | 739d76cfda5793256e849acd082d90f1e09c9494 (patch) | |
tree | 4fb4f027e296040fcd8e36722709f7762285c2d3 /apps/hosted/yesno.c | |
parent | 93640fc22847e70f0070061ed1effc5d063dd600 (diff) | |
download | rockbox-739d76cfda5793256e849acd082d90f1e09c9494.tar.gz rockbox-739d76cfda5793256e849acd082d90f1e09c9494.zip |
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
Diffstat (limited to 'apps/hosted/yesno.c')
-rw-r--r-- | apps/hosted/yesno.c | 14 |
1 files changed, 11 insertions, 3 deletions
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) | |||
62 | RockboxYesno_class, | 62 | RockboxYesno_class, |
63 | constructor); | 63 | constructor); |
64 | yesno_func = e->GetMethodID(env_ptr, RockboxYesno_class, | 64 | yesno_func = e->GetMethodID(env_ptr, RockboxYesno_class, |
65 | "yesno_display", "(Ljava/lang/String;)V"); | 65 | "yesno_display", |
66 | "(Ljava/lang/String;" | ||
67 | "Ljava/lang/String;" | ||
68 | "Ljava/lang/String;)V"); | ||
66 | yesno_is_usable = e->GetMethodID(env_ptr, RockboxYesno_class, | 69 | yesno_is_usable = e->GetMethodID(env_ptr, RockboxYesno_class, |
67 | "is_usable", "()Z"); | 70 | "is_usable", "()Z"); |
68 | } | 71 | } |
@@ -100,12 +103,17 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message, | |||
100 | 103 | ||
101 | JNIEnv e = *env_ptr; | 104 | JNIEnv e = *env_ptr; |
102 | jstring message = build_message(main_message); | 105 | jstring message = build_message(main_message); |
103 | 106 | jstring yes = (*env_ptr)->NewStringUTF(env_ptr, str(LANG_SET_BOOL_YES)); | |
104 | e->CallVoidMethod(env_ptr, RockboxYesno_instance, yesno_func, message); | 107 | jstring no = (*env_ptr)->NewStringUTF(env_ptr, str(LANG_SET_BOOL_NO)); |
108 | |||
109 | e->CallVoidMethod(env_ptr, RockboxYesno_instance, yesno_func, | ||
110 | message, yes, no); | ||
105 | 111 | ||
106 | wakeup_wait(&yesno_wakeup, TIMEOUT_BLOCK); | 112 | wakeup_wait(&yesno_wakeup, TIMEOUT_BLOCK); |
107 | 113 | ||
108 | e->DeleteLocalRef(env_ptr, message); | 114 | e->DeleteLocalRef(env_ptr, message); |
115 | e->DeleteLocalRef(env_ptr, yes); | ||
116 | e->DeleteLocalRef(env_ptr, no); | ||
109 | 117 | ||
110 | return ret ? YESNO_YES : YESNO_NO; | 118 | return ret ? YESNO_YES : YESNO_NO; |
111 | } | 119 | } |