[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/macmenu.c [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/macmenu.c [emacs-unicode-2] |
Date: |
Fri, 27 Aug 2004 07:14:05 -0400 |
Index: emacs/src/macmenu.c
diff -c emacs/src/macmenu.c:1.11.2.2 emacs/src/macmenu.c:1.11.2.3
*** emacs/src/macmenu.c:1.11.2.2 Mon Jun 28 07:29:22 2004
--- emacs/src/macmenu.c Fri Aug 27 07:00:32 2004
***************
*** 163,168 ****
--- 163,174 ----
extern Lisp_Object Qmenu_bar_update_hook;
+ #if TARGET_API_MAC_CARBON
+ #define ENCODE_MENU_STRING(str) ENCODE_UTF_8 (str)
+ #else
+ #define ENCODE_MENU_STRING(str) ENCODE_SYSTEM (str)
+ #endif
+
void set_frame_menubar ();
static void push_menu_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
***************
*** 1246,1258 ****
#ifndef HAVE_MULTILINGUAL_MENU
if (STRING_MULTIBYTE (item_name))
{
! item_name = ENCODE_SYSTEM (item_name);
AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name;
}
if (STRINGP (descrip) && STRING_MULTIBYTE (descrip))
{
! descrip = ENCODE_SYSTEM (descrip);
AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip;
}
#endif /* not HAVE_MULTILINGUAL_MENU */
--- 1252,1264 ----
#ifndef HAVE_MULTILINGUAL_MENU
if (STRING_MULTIBYTE (item_name))
{
! item_name = ENCODE_MENU_STRING (item_name);
AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name;
}
if (STRINGP (descrip) && STRING_MULTIBYTE (descrip))
{
! descrip = ENCODE_MENU_STRING (descrip);
AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip;
}
#endif /* not HAVE_MULTILINGUAL_MENU */
***************
*** 1705,1716 ****
#ifndef HAVE_MULTILINGUAL_MENU
if (STRINGP (item_name) && STRING_MULTIBYTE (item_name))
{
! item_name = ENCODE_SYSTEM (item_name);
AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name;
}
if (STRINGP (descrip) && STRING_MULTIBYTE (descrip))
{
! descrip = ENCODE_SYSTEM (descrip);
AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip;
}
#endif /* not HAVE_MULTILINGUAL_MENU */
--- 1711,1722 ----
#ifndef HAVE_MULTILINGUAL_MENU
if (STRINGP (item_name) && STRING_MULTIBYTE (item_name))
{
! item_name = ENCODE_MENU_STRING (item_name);
AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name;
}
if (STRINGP (descrip) && STRING_MULTIBYTE (descrip))
{
! descrip = ENCODE_MENU_STRING (descrip);
AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip;
}
#endif /* not HAVE_MULTILINGUAL_MENU */
***************
*** 1764,1770 ****
#ifndef HAVE_MULTILINGUAL_MENU
if (STRING_MULTIBYTE (title))
! title = ENCODE_SYSTEM (title);
#endif
wv_title->name = (char *) SDATA (title);
wv_title->enabled = TRUE;
--- 1770,1776 ----
#ifndef HAVE_MULTILINGUAL_MENU
if (STRING_MULTIBYTE (title))
! title = ENCODE_MENU_STRING (title);
#endif
wv_title->name = (char *) SDATA (title);
wv_title->enabled = TRUE;
***************
*** 1813,1818 ****
--- 1819,1828 ----
discard_mouse_events ();
#endif
+ /* Must reset this manually because the button release event is not
+ passed to Emacs event loop. */
+ FRAME_MAC_DISPLAY_INFO (f)->grabbed = 0;
+
/* Free the widget_value objects we used to specify the
contents. */
free_menubar_widget_value_tree (first_wv);
***************
*** 2219,2226 ****
--- 2229,2246 ----
strncat (item_name, wv->key, 255);
}
item_name[255] = 0;
+ #if TARGET_API_MAC_CARBON
+ {
+ CFStringRef string =
+ CFStringCreateWithCString (NULL, item_name, kCFStringEncodingUTF8);
+
+ SetMenuItemTextWithCFString (menu, pos, string);
+ CFRelease (string);
+ }
+ #else
c2pstr (item_name);
SetMenuItemText (menu, pos, item_name);
+ #endif
if (wv->enabled && !force_disable)
#if TARGET_API_MAC_CARBON
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/macmenu.c [emacs-unicode-2],
Miles Bader <=