aboutsummaryrefslogtreecommitdiffstats
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorChong Yidong <[email protected]>2010-12-17 12:04:06 +0800
committerChong Yidong <[email protected]>2010-12-17 12:04:06 +0800
commit4039c78625bb20cf57b434a7d395bf2473e45133 (patch)
tree729b8ce725973a7e31d769e4ab1217b517738a21 /src/xdisp.c
parent8b358e9038806836c599da8233781b14c6bb53e7 (diff)
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/xdisp.c')
-rw-r--r--src/xdisp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 1c220647ba..41204e0a5b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10317,6 +10317,10 @@ build_desired_tool_bar_string (struct frame *f)
int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P));
int hmargin, vmargin, relief, idx, end;
+ /* Ignore separator items. */
+ if (EQ (PROP (TOOL_BAR_ITEM_TYPE), Qt))
+ continue;
+
/* If image is a vector, choose the image according to the
button state. */
image = PROP (TOOL_BAR_ITEM_IMAGES);