diff options
| author | Jason Rumney | 2000-05-30 21:52:06 +0000 |
|---|---|---|
| committer | Jason Rumney | 2000-05-30 21:52:06 +0000 |
| commit | 6915ded08f4d54122cfa2d8eb0cb2869ea3eb7c3 (patch) | |
| tree | 085c6ba9d52d0fb640dac423d8cf2ca41dc8c94c /src | |
| parent | 1f2fca4bd1d9cae1085e4fea45f9dce4099af83a (diff) | |
| download | emacs-6915ded08f4d54122cfa2d8eb0cb2869ea3eb7c3.tar.gz emacs-6915ded08f4d54122cfa2d8eb0cb2869ea3eb7c3.zip | |
(single_submenu, w32_menu_show): Call ENCODE_SYSTEM on menu strings.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32menu.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/w32menu.c b/src/w32menu.c index 6ca1aa755a0..c047045ff7e 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -29,6 +29,8 @@ Boston, MA 02111-1307, USA. */ | |||
| 29 | #include "keyboard.h" | 29 | #include "keyboard.h" |
| 30 | #include "blockinput.h" | 30 | #include "blockinput.h" |
| 31 | #include "buffer.h" | 31 | #include "buffer.h" |
| 32 | #include "charset.h" | ||
| 33 | #include "coding.h" | ||
| 32 | 34 | ||
| 33 | /* This may include sys/types.h, and that somehow loses | 35 | /* This may include sys/types.h, and that somehow loses |
| 34 | if this is not done before the other system files. */ | 36 | if this is not done before the other system files. */ |
| @@ -69,8 +71,8 @@ typedef struct _widget_value | |||
| 69 | char* value; | 71 | char* value; |
| 70 | /* keyboard equivalent. no implications for XtTranslations */ | 72 | /* keyboard equivalent. no implications for XtTranslations */ |
| 71 | char* key; | 73 | char* key; |
| 72 | /* Help string. */ | 74 | /* Help string or null if none. */ |
| 73 | char* help; | 75 | char *help; |
| 74 | /* true if enabled */ | 76 | /* true if enabled */ |
| 75 | Boolean enabled; | 77 | Boolean enabled; |
| 76 | /* true if selected */ | 78 | /* true if selected */ |
| @@ -1172,7 +1174,7 @@ single_submenu (item_key, item_name, maps) | |||
| 1172 | prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; | 1174 | prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; |
| 1173 | #ifndef HAVE_MULTILINGUAL_MENU | 1175 | #ifndef HAVE_MULTILINGUAL_MENU |
| 1174 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) | 1176 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) |
| 1175 | pane_name = string_make_unibyte (pane_name); | 1177 | pane_name = ENCODE_SYSTEM (pane_name); |
| 1176 | #endif | 1178 | #endif |
| 1177 | pane_string = (NILP (pane_name) | 1179 | pane_string = (NILP (pane_name) |
| 1178 | ? "" : (char *) XSTRING (pane_name)->data); | 1180 | ? "" : (char *) XSTRING (pane_name)->data); |
| @@ -1210,8 +1212,6 @@ single_submenu (item_key, item_name, maps) | |||
| 1210 | Lisp_Object item_name, enable, descrip, def, type, selected; | 1212 | Lisp_Object item_name, enable, descrip, def, type, selected; |
| 1211 | Lisp_Object help; | 1213 | Lisp_Object help; |
| 1212 | 1214 | ||
| 1213 | /* NTEMACS_TODO: implement popup/modeline help for menus. */ | ||
| 1214 | |||
| 1215 | item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; | 1215 | item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; |
| 1216 | enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; | 1216 | enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; |
| 1217 | descrip | 1217 | descrip |
| @@ -1223,9 +1223,9 @@ single_submenu (item_key, item_name, maps) | |||
| 1223 | 1223 | ||
| 1224 | #ifndef HAVE_MULTILINGUAL_MENU | 1224 | #ifndef HAVE_MULTILINGUAL_MENU |
| 1225 | if (STRING_MULTIBYTE (item_name)) | 1225 | if (STRING_MULTIBYTE (item_name)) |
| 1226 | item_name = string_make_unibyte (item_name); | 1226 | item_name = ENCODE_SYSTEM (item_name); |
| 1227 | if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) | 1227 | if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) |
| 1228 | descrip = string_make_unibyte (descrip); | 1228 | descrip = ENCODE_SYSTEM (descrip); |
| 1229 | #endif | 1229 | #endif |
| 1230 | 1230 | ||
| 1231 | wv = xmalloc_widget_value (); | 1231 | wv = xmalloc_widget_value (); |
| @@ -1619,7 +1619,7 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 1619 | prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; | 1619 | prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; |
| 1620 | #ifndef HAVE_MULTILINGUAL_MENU | 1620 | #ifndef HAVE_MULTILINGUAL_MENU |
| 1621 | if (!NILP (pane_name) && STRING_MULTIBYTE (pane_name)) | 1621 | if (!NILP (pane_name) && STRING_MULTIBYTE (pane_name)) |
| 1622 | pane_name = string_make_unibyte (pane_name); | 1622 | pane_name = ENCODE_SYSTEM (pane_name); |
| 1623 | #endif | 1623 | #endif |
| 1624 | pane_string = (NILP (pane_name) | 1624 | pane_string = (NILP (pane_name) |
| 1625 | ? "" : (char *) XSTRING (pane_name)->data); | 1625 | ? "" : (char *) XSTRING (pane_name)->data); |
| @@ -1671,9 +1671,9 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 1671 | 1671 | ||
| 1672 | #ifndef HAVE_MULTILINGUAL_MENU | 1672 | #ifndef HAVE_MULTILINGUAL_MENU |
| 1673 | if (STRINGP (item_name) && STRING_MULTIBYTE (item_name)) | 1673 | if (STRINGP (item_name) && STRING_MULTIBYTE (item_name)) |
| 1674 | item_name = string_make_unibyte (item_name); | 1674 | item_name = ENCODE_SYSTEM (item_name); |
| 1675 | if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) | 1675 | if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) |
| 1676 | descrip = string_make_unibyte (descrip); | 1676 | descrip = ENCODE_SYSTEM (descrip); |
| 1677 | #endif | 1677 | #endif |
| 1678 | 1678 | ||
| 1679 | wv = xmalloc_widget_value (); | 1679 | wv = xmalloc_widget_value (); |
| @@ -1725,7 +1725,7 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 1725 | 1725 | ||
| 1726 | #ifndef HAVE_MULTILINGUAL_MENU | 1726 | #ifndef HAVE_MULTILINGUAL_MENU |
| 1727 | if (STRING_MULTIBYTE (title)) | 1727 | if (STRING_MULTIBYTE (title)) |
| 1728 | title = string_make_unibyte (title); | 1728 | title = ENCODE_SYSTEM (title); |
| 1729 | #endif | 1729 | #endif |
| 1730 | wv_title->name = (char *) XSTRING (title)->data; | 1730 | wv_title->name = (char *) XSTRING (title)->data; |
| 1731 | wv_title->enabled = True; | 1731 | wv_title->enabled = True; |