Handle deprecated Gtk+ stuff for version <= 3.10
commit3f4c6d52d345999938bc2d4a53246af4c61ef176
authorJan Djärv <jan.h.d@swipnet.se>
Sat, 18 Oct 2014 16:19:53 +0000 (18 18:19 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Sat, 18 Oct 2014 16:19:53 +0000 (18 18:19 +0200)
tree0103262a2daac51aa88c1cf0d27cacbd8a9192d2
parenta4c80e35cc48376a3e35b11ee41cf3859b93efd5
Handle deprecated Gtk+ stuff for version <= 3.10

* lisp/term/x-win.el (x-gtk-stock-map): Add icon names suggested as
replacements to stock names before stock names in a list.
Cdr may be a list, each name is tried in turn until one is found.

* src/gtkutil.c (XG_TEXT_CANCEL, XG_TEXT_OPEN, XG_TEXT_OK): New defines
to handle Gtk versions.
(xg_get_file_with_chooser): Use them.
(xg_have_tear_offs, tearoff_remove, tearoff_activate): Remove
(create_menus): Remove teroff argument and code.
Remove call to gtk_menu_set_title.
(xg_update_menubar, xg_update_submenu): Remove tearoff code.  Adjust
args to create_menus.
(xg_tool_bar_menu_proxy, xg_tool_bar_detach_callback)
(xg_tool_bar_attach_callback, TOOLBAR_TOP_WIDGET): Remove.
(xg_pack_tool_bar): Replace TOOLBAR_TOP_WIDGET, remove detach code.
(xg_make_tool_item): Remove detach code.
(xg_update_tool_bar_sizes): Replace TOOLBAR_TOP_WIDGET.
(find_icon_from_name): New function.
(update_frame_tool_bar): Remove GtkStockItem code, move to
find_icon_from_name.  Let stock be a list of icon names to try.
Only use gtk_image_new_from_stock on Gtk+ < 3.10.
Replace TOOLBAR_TOP_WIDGET.
(free_frame_tool_bar, xg_change_toolbar_position ): Replace
TOOLBAR_TOP_WIDGET.
(xg_initialize): Remove tearoff code.

* src/gtkutil.h (xg_have_tear_offs): Remove declaration.

* src/xmenu.c (set_frame_menubar): Remove GTK block that calls
xg_have_tear_offs.

* src/xterm.h (handlebox_widget): Remove.
lisp/ChangeLog
lisp/term/x-win.el
src/ChangeLog
src/gtkutil.c
src/gtkutil.h
src/xmenu.c
src/xterm.h