From: Kenichi Handa Date: Tue, 22 Sep 1998 10:33:09 +0000 (+0000) Subject: (single_submenu) [! HAVE_MULTILINGUAL_MENU]: Make X-Git-Tag: emacs-20.4~1647 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=703dc2a8957281368c63fd30e73b403db2dc14f2;p=emacs.git (single_submenu) [! HAVE_MULTILINGUAL_MENU]: Make strings unibyte. (xmenu_show) [! HAVE_MULTILINGUAL_MENU]: Likewise. --- 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. */ #include "dispextern.h" #ifdef HAVE_X_WINDOWS +#undef HAVE_MULTILINGUAL_MENU #ifdef USE_X_TOOLKIT #include #include @@ -1371,6 +1372,10 @@ single_submenu (item_key, item_name, maps) char *pane_string; pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; +#ifndef HAVE_MULTILINGUAL_MENU + if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) + pane_name = string_make_unibyte (pane_name); +#endif pane_string = (NILP (pane_name) ? "" : (char *) XSTRING (pane_name)->data); /* If there is just one top-level pane, put all its items directly @@ -1409,7 +1414,12 @@ single_submenu (item_key, item_name, maps) descrip = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; def = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_DEFINITION]; - +#ifndef HAVE_MULTILINGUAL_MENU + if (STRING_MULTIBYTE (item_name)) + item_name = string_make_unibyte (item_name); + if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) + descrip = string_make_unibyte (descrip); +#endif wv = xmalloc_widget_value (); if (prev_wv) prev_wv->next = wv; @@ -1905,6 +1915,10 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) char *pane_string; pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; +#ifndef HAVE_MULTILINGUAL_MENU + if (!NILP (pane_name) && STRING_MULTIBYTE (pane_name)) + pane_name = string_make_unibyte (pane_name); +#endif pane_string = (NILP (pane_name) ? "" : (char *) XSTRING (pane_name)->data); /* 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) descrip = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; def = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_DEFINITION]; +#ifndef HAVE_MULTILINGUAL_MENU + if (STRINGP (item_name) && STRING_MULTIBYTE (item_name)) + item_name = string_make_unibyte (item_name); + if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) + item_name = string_make_unibyte (descrip); +#endif wv = xmalloc_widget_value (); if (prev_wv) @@ -1982,6 +2002,10 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) wv_sep1->name = "--"; wv_sep1->next = wv_sep2; +#ifndef HAVE_MULTILINGUAL_MENU + if (STRING_MULTIBYTE (title)) + title = string_make_unibyte (title); +#endif wv_title->name = (char *) XSTRING (title)->data; wv_title->enabled = True; wv_title->next = wv_sep1;