diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-12-17 12:04:06 +0800 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-12-17 12:04:06 +0800 |
commit | 4039c78625bb20cf57b434a7d395bf2473e45133 (patch) | |
tree | 729b8ce725973a7e31d769e4ab1217b517738a21 /src/w32menu.c | |
parent | 8b358e9038806836c599da8233781b14c6bb53e7 (diff) | |
download | emacs-4039c78625bb20cf57b434a7d395bf2473e45133.tar.gz |
Support for menu separators in the GTK tool-bar.
* src/gtkutil.c (XG_BIN_CHILD): New macro.
(xg_get_menu_item_label, xg_update_menubar)
(xg_update_menu_item, xg_tool_bar_menu_proxy)
(xg_show_toolbar_item, update_frame_tool_bar): Use it.
(separator_names, xg_separator_p): Move to keyboard.c.
(create_menus, xg_update_submenu, update_frame_tool_bar): Use
menu_separator_name_p.
* src/keyboard.c (parse_tool_bar_item): Allow menu separators in
tool-bar maps.
(menu_separator_name_p): New function, from gtkutil.c.
(separator_names): Move from gtkutil.c.
* src/keyboard.h (menu_separator_name_p): Add prototype.
* src/nsmenu.m (name_is_separator): Function deleted.
(addItemWithWidgetValue): Use menu_separator_name_p.
* src/w32menu.c (name_is_separator): Function deleted.
(add_menu_item): Use menu_separator_name_p.
Diffstat (limited to 'src/w32menu.c')
-rw-r--r-- | src/w32menu.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/w32menu.c b/src/w32menu.c index ff6bd977bea..1e700201bf2 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1326,20 +1326,6 @@ simple_dialog_show (FRAME_PTR f, Lisp_Object contents, Lisp_Object header) #endif /* !HAVE_DIALOGS */ -/* Is this item a separator? */ -static int -name_is_separator (const char *name) -{ - const char *start = name; - - /* Check if name string consists of only dashes ('-'). */ - while (*name == '-') name++; - /* Separators can also be of the form "--:TripleSuperMegaEtched" - or "--deep-shadow". We don't implement them yet, se we just treat - them like normal separators. */ - return (*name == '\0' || start + 2 == name); -} - /* UTF8: 0xxxxxxx, 110xxxxx 10xxxxxx, 1110xxxx, 10xxxxxx, 10xxxxxx */ static void utf8to16 (unsigned char * src, int len, WCHAR * dest) @@ -1388,7 +1374,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) int return_value; size_t nlen, orig_len; - if (name_is_separator (wv->name)) + if (menu_separator_name_p (wv->name)) { fuFlags = MF_SEPARATOR; out_string = NULL; |