diff options
| author | Kenichi Handa | 1998-09-22 10:33:09 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-09-22 10:33:09 +0000 |
| commit | 703dc2a8957281368c63fd30e73b403db2dc14f2 (patch) | |
| tree | 9a540fa4897f83f230015e154060df7f87c86c17 /src | |
| parent | 24819c4351e21c9a52e15132180707f8543b54c1 (diff) | |
| download | emacs-703dc2a8957281368c63fd30e73b403db2dc14f2.tar.gz emacs-703dc2a8957281368c63fd30e73b403db2dc14f2.zip | |
(single_submenu) [! HAVE_MULTILINGUAL_MENU]: Make
strings unibyte.
(xmenu_show) [! HAVE_MULTILINGUAL_MENU]: Likewise.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xmenu.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 5e7c0c966ec..46fb604f5f3 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -62,6 +62,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 62 | #include "dispextern.h" | 62 | #include "dispextern.h" |
| 63 | 63 | ||
| 64 | #ifdef HAVE_X_WINDOWS | 64 | #ifdef HAVE_X_WINDOWS |
| 65 | #undef HAVE_MULTILINGUAL_MENU | ||
| 65 | #ifdef USE_X_TOOLKIT | 66 | #ifdef USE_X_TOOLKIT |
| 66 | #include <X11/Xlib.h> | 67 | #include <X11/Xlib.h> |
| 67 | #include <X11/IntrinsicP.h> | 68 | #include <X11/IntrinsicP.h> |
| @@ -1371,6 +1372,10 @@ single_submenu (item_key, item_name, maps) | |||
| 1371 | char *pane_string; | 1372 | char *pane_string; |
| 1372 | pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; | 1373 | pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; |
| 1373 | prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; | 1374 | prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; |
| 1375 | #ifndef HAVE_MULTILINGUAL_MENU | ||
| 1376 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) | ||
| 1377 | pane_name = string_make_unibyte (pane_name); | ||
| 1378 | #endif | ||
| 1374 | pane_string = (NILP (pane_name) | 1379 | pane_string = (NILP (pane_name) |
| 1375 | ? "" : (char *) XSTRING (pane_name)->data); | 1380 | ? "" : (char *) XSTRING (pane_name)->data); |
| 1376 | /* If there is just one top-level pane, put all its items directly | 1381 | /* If there is just one top-level pane, put all its items directly |
| @@ -1409,7 +1414,12 @@ single_submenu (item_key, item_name, maps) | |||
| 1409 | descrip | 1414 | descrip |
| 1410 | = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; | 1415 | = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; |
| 1411 | def = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_DEFINITION]; | 1416 | def = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_DEFINITION]; |
| 1412 | 1417 | #ifndef HAVE_MULTILINGUAL_MENU | |
| 1418 | if (STRING_MULTIBYTE (item_name)) | ||
| 1419 | item_name = string_make_unibyte (item_name); | ||
| 1420 | if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) | ||
| 1421 | descrip = string_make_unibyte (descrip); | ||
| 1422 | #endif | ||
| 1413 | wv = xmalloc_widget_value (); | 1423 | wv = xmalloc_widget_value (); |
| 1414 | if (prev_wv) | 1424 | if (prev_wv) |
| 1415 | prev_wv->next = wv; | 1425 | prev_wv->next = wv; |
| @@ -1905,6 +1915,10 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 1905 | char *pane_string; | 1915 | char *pane_string; |
| 1906 | pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; | 1916 | pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; |
| 1907 | prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; | 1917 | prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; |
| 1918 | #ifndef HAVE_MULTILINGUAL_MENU | ||
| 1919 | if (!NILP (pane_name) && STRING_MULTIBYTE (pane_name)) | ||
| 1920 | pane_name = string_make_unibyte (pane_name); | ||
| 1921 | #endif | ||
| 1908 | pane_string = (NILP (pane_name) | 1922 | pane_string = (NILP (pane_name) |
| 1909 | ? "" : (char *) XSTRING (pane_name)->data); | 1923 | ? "" : (char *) XSTRING (pane_name)->data); |
| 1910 | /* If there is just one top-level pane, put all its items directly | 1924 | /* If there is just one top-level pane, put all its items directly |
| @@ -1947,6 +1961,12 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 1947 | descrip | 1961 | descrip |
| 1948 | = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; | 1962 | = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; |
| 1949 | def = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_DEFINITION]; | 1963 | def = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_DEFINITION]; |
| 1964 | #ifndef HAVE_MULTILINGUAL_MENU | ||
| 1965 | if (STRINGP (item_name) && STRING_MULTIBYTE (item_name)) | ||
| 1966 | item_name = string_make_unibyte (item_name); | ||
| 1967 | if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) | ||
| 1968 | item_name = string_make_unibyte (descrip); | ||
| 1969 | #endif | ||
| 1950 | 1970 | ||
| 1951 | wv = xmalloc_widget_value (); | 1971 | wv = xmalloc_widget_value (); |
| 1952 | if (prev_wv) | 1972 | if (prev_wv) |
| @@ -1982,6 +2002,10 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 1982 | wv_sep1->name = "--"; | 2002 | wv_sep1->name = "--"; |
| 1983 | wv_sep1->next = wv_sep2; | 2003 | wv_sep1->next = wv_sep2; |
| 1984 | 2004 | ||
| 2005 | #ifndef HAVE_MULTILINGUAL_MENU | ||
| 2006 | if (STRING_MULTIBYTE (title)) | ||
| 2007 | title = string_make_unibyte (title); | ||
| 2008 | #endif | ||
| 1985 | wv_title->name = (char *) XSTRING (title)->data; | 2009 | wv_title->name = (char *) XSTRING (title)->data; |
| 1986 | wv_title->enabled = True; | 2010 | wv_title->enabled = True; |
| 1987 | wv_title->next = wv_sep1; | 2011 | wv_title->next = wv_sep1; |