summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2014-10-18 18:19:53 +0200
committerJan Djärv <jan.h.d@swipnet.se>2014-10-18 18:19:53 +0200
commit3f4c6d52d345999938bc2d4a53246af4c61ef176 (patch)
tree0103262a2daac51aa88c1cf0d27cacbd8a9192d2 /lisp
parenta4c80e35cc48376a3e35b11ee41cf3859b93efd5 (diff)
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/term/x-win.el63
2 files changed, 39 insertions, 30 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0e99febb366..a000728239c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2014-10-18 Jan Djärv <jan.h.d@swipnet.se>
+
+ * 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.
+
2014-10-18 Alan Mackenzie <acm@muc.de>
Check that a "macro" found near point-min isn't a ## operator.
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 4cbcf767c03..a7e695da2a0 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1484,47 +1484,47 @@ This returns an error if any Emacs frames are X frames."
(mapcar (lambda (arg)
(cons (purecopy (car arg)) (purecopy (cdr arg))))
'(
- ("etc/images/new" . "gtk-new")
- ("etc/images/open" . "gtk-open")
+ ("etc/images/new" . ("document-new" "gtk-new"))
+ ("etc/images/open" . ("document-open" "gtk-open"))
("etc/images/diropen" . "n:system-file-manager")
- ("etc/images/close" . "gtk-close")
- ("etc/images/save" . "gtk-save")
- ("etc/images/saveas" . "gtk-save-as")
- ("etc/images/undo" . "gtk-undo")
- ("etc/images/cut" . "gtk-cut")
- ("etc/images/copy" . "gtk-copy")
- ("etc/images/paste" . "gtk-paste")
- ("etc/images/search" . "gtk-find")
- ("etc/images/print" . "gtk-print")
- ("etc/images/preferences" . "gtk-preferences")
- ("etc/images/help" . "gtk-help")
- ("etc/images/left-arrow" . "gtk-go-back")
- ("etc/images/right-arrow" . "gtk-go-forward")
- ("etc/images/home" . "gtk-home")
- ("etc/images/jump-to" . "gtk-jump-to")
+ ("etc/images/close" . ("window-close" "gtk-close"))
+ ("etc/images/save" . ("document-save" "gtk-save"))
+ ("etc/images/saveas" . ("document-save-as" "gtk-save-as"))
+ ("etc/images/undo" . ("edit-undo" "gtk-undo"))
+ ("etc/images/cut" . ("edit-cut" "gtk-cut"))
+ ("etc/images/copy" . ("edit-copy" "gtk-copy"))
+ ("etc/images/paste" . ("edit-paste" "gtk-paste"))
+ ("etc/images/search" . ("edit-find" "gtk-find"))
+ ("etc/images/print" . ("document-print" "gtk-print"))
+ ("etc/images/preferences" . ("preferences-system" "gtk-preferences"))
+ ("etc/images/help" . ("help-browser" "gtk-help"))
+ ("etc/images/left-arrow" . ("go-previous" "gtk-go-back"))
+ ("etc/images/right-arrow" . ("go-next" "gtk-go-forward"))
+ ("etc/images/home" . ("go-home" "gtk-home"))
+ ("etc/images/jump-to" . ("go-jump" "gtk-jump-to"))
("etc/images/index" . "gtk-index")
- ("etc/images/search" . "gtk-find")
- ("etc/images/exit" . "gtk-quit")
+ ("etc/images/exit" . ("application-exit" "gtk-quit"))
("etc/images/cancel" . "gtk-cancel")
- ("etc/images/info" . "gtk-info")
+ ("etc/images/info" . ("dialog-information" "gtk-info"))
("etc/images/bookmark_add" . "n:bookmark_add")
;; Used in Gnus and/or MH-E:
("etc/images/attach" . "gtk-attach")
("etc/images/connect" . "gtk-connect")
("etc/images/contact" . "gtk-contact")
- ("etc/images/delete" . "gtk-delete")
- ("etc/images/describe" . "gtk-properties")
+ ("etc/images/delete" . ("edit-delete" "gtk-delete"))
+ ("etc/images/describe" . ("ocument-properties" "gtk-properties"))
("etc/images/disconnect" . "gtk-disconnect")
;; ("etc/images/exit" . "gtk-exit")
("etc/images/lock-broken" . "gtk-lock_broken")
("etc/images/lock-ok" . "gtk-lock_ok")
("etc/images/lock" . "gtk-lock")
("etc/images/next-page" . "gtk-next-page")
- ("etc/images/refresh" . "gtk-refresh")
- ("etc/images/sort-ascending" . "gtk-sort-ascending")
+ ("etc/images/refresh" . ("view-refresh" "gtk-refresh"))
+ ("etc/images/sort-ascending" . ("view-sort-ascending" "gtk-sort-ascending"))
("etc/images/sort-column-ascending" . "gtk-sort-column-ascending")
("etc/images/sort-criteria" . "gtk-sort-criteria")
- ("etc/images/sort-descending" . "gtk-sort-descending")
+ ("etc/images/sort-descending" . ("view-sort-descending"
+ "gtk-sort-descending"))
("etc/images/sort-row-ascending" . "gtk-sort-row-ascending")
("images/gnus/toggle-subscription" . "gtk-task-recurring")
("images/mail/compose" . "gtk-mail-compose")
@@ -1541,8 +1541,8 @@ This returns an error if any Emacs frames are X frames."
("images/mail/spam" . "gtk-spam")
;; Used for GDB Graphical Interface
("images/gud/break" . "gtk-no")
- ("images/gud/recstart" . "gtk-media-record")
- ("images/gud/recstop" . "gtk-media-stop")
+ ("images/gud/recstart" . ("media-record" "gtk-media-record"))
+ ("images/gud/recstop" . ("media-playback-stop" "gtk-media-stop"))
;; No themed versions available:
;; mail/preview (combining stock_mail and stock_zoom)
;; mail/save (combining stock_mail, stock_save and stock_convert)
@@ -1551,9 +1551,12 @@ This returns an error if any Emacs frames are X frames."
Emacs must be compiled with the Gtk+ toolkit for this to have any effect.
A value that begins with n: denotes a named icon instead of a stock icon."
:version "22.2"
- :type '(choice (repeat (choice symbol
- (cons (string :tag "Emacs icon")
- (string :tag "Stock/named")))))
+ :type '(choice (repeat
+ (choice symbol
+ (cons (string :tag "Emacs icon")
+ (choice (group (string :tag "Named")
+ (string :tag "Stock"))
+ (string :tag "Stock/named"))))))
:group 'x)
(defcustom icon-map-list '(x-gtk-stock-map)