diff options
| author | Po Lu | 2023-09-30 15:36:49 +0800 |
|---|---|---|
| committer | Po Lu | 2023-09-30 15:40:21 +0800 |
| commit | cdc653d68f44a253a7a06f7eed981a7fd1c7e785 (patch) | |
| tree | 5a1d00de0651ab5b6ce0faa47da67f27c647800b /src/androidmenu.c | |
| parent | 9a3523e7d839fd45180e553c10d2f22475fa30c7 (diff) | |
| download | emacs-cdc653d68f44a253a7a06f7eed981a7fd1c7e785.tar.gz emacs-cdc653d68f44a253a7a06f7eed981a7fd1c7e785.zip | |
Update Android port
* src/androidmenu.c (android_menu_show): Properly encode pane
names before deriving Java strings from them.
* src/sfntfont.c (sfnt_parse_style, sfntfont_list_1): Intern
adstyles.
Diffstat (limited to 'src/androidmenu.c')
| -rw-r--r-- | src/androidmenu.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/androidmenu.c b/src/androidmenu.c index 3b34f032c35..ed26bdafa85 100644 --- a/src/androidmenu.c +++ b/src/androidmenu.c | |||
| @@ -248,7 +248,6 @@ android_menu_show (struct frame *f, int x, int y, int menuflags, | |||
| 248 | jobject title_string, help_string, temp; | 248 | jobject title_string, help_string, temp; |
| 249 | size_t i; | 249 | size_t i; |
| 250 | Lisp_Object pane_name, prefix; | 250 | Lisp_Object pane_name, prefix; |
| 251 | const char *pane_string; | ||
| 252 | specpdl_ref count, count1; | 251 | specpdl_ref count, count1; |
| 253 | Lisp_Object item_name, enable, def, tem, entry, type, selected; | 252 | Lisp_Object item_name, enable, def, tem, entry, type, selected; |
| 254 | Lisp_Object help; | 253 | Lisp_Object help; |
| @@ -357,13 +356,21 @@ android_menu_show (struct frame *f, int x, int y, int menuflags, | |||
| 357 | /* Now figure out the title of this pane. */ | 356 | /* Now figure out the title of this pane. */ |
| 358 | pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME); | 357 | pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME); |
| 359 | prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX); | 358 | prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX); |
| 360 | pane_string = (NILP (pane_name) | 359 | |
| 361 | ? "" : SSDATA (pane_name)); | 360 | /* PANE_NAME may be nil, in which case it must be set to an |
| 362 | if ((menuflags & MENU_KEYMAPS) && !NILP (prefix)) | 361 | empty string. */ |
| 363 | pane_string++; | 362 | |
| 363 | if (NILP (pane_name)) | ||
| 364 | pane_name = empty_unibyte_string; | ||
| 365 | |||
| 366 | /* Remove the leading prefix character if need be. */ | ||
| 367 | |||
| 368 | if ((menuflags & MENU_KEYMAPS) && !NILP (prefix) | ||
| 369 | && SCHARS (prefix)) | ||
| 370 | pane_name = Fsubstring (pane_name, make_fixnum (1), Qnil); | ||
| 364 | 371 | ||
| 365 | /* Add the pane. */ | 372 | /* Add the pane. */ |
| 366 | temp = (*env)->NewStringUTF (env, pane_string); | 373 | temp = android_build_string (pane_name); |
| 367 | android_exception_check (); | 374 | android_exception_check (); |
| 368 | 375 | ||
| 369 | (*env)->CallNonvirtualVoidMethod (env, current_context_menu, | 376 | (*env)->CallNonvirtualVoidMethod (env, current_context_menu, |