unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15281: 24.3.50; Some tool-bar buttons disappear in GTK3 Emacs
@ 2013-09-06  0:02 Katsumi Yamaoka
  2013-09-06  0:11 ` Katsumi Yamaoka
  2013-09-06  5:03 ` Jan Djärv
  0 siblings, 2 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2013-09-06  0:02 UTC (permalink / raw)
  To: 15281

Hi,

The Info manual describes as follows:

,---- (info "(Elisp)Tool Bar")
|`:image IMAGE'
|     IMAGES is either a single image specification or a vector of four
|     image specifications.  If you use a vector of four, one of them is
|     used, depending on circumstances:
|
|    item 0
|          Used when the item is enabled and selected.
|
|    item 1
|          Used when the item is enabled and deselected.
|
|    item 2
|          Used when the item is disabled and selected.
|
|    item 3
|          Used when the item is disabled and deselected.
|
|   If IMAGE is a single image specification, Emacs draws the tool bar
|button in disabled state by applying an edge-detection algorithm to the
|image.
`----

However, a tool-bar button that has such images is not shown in
GTK3 Emacs.  Moreover, LUCID Emacs (i.e. --with-x-toolkit=lucid)
shows such a button, however only the `item 1' image is used no
matter what circumstance is.

This works:

(let* ((enable t)
       (icon (find-image '((:type xpm :file "cancel.xpm"))))
       (keymap
	`(keymap
	  (tool-bar
	   keymap
	   (ignore menu-item "IGNORE" ignore
		   :enable ,enable :image ,icon)))))
  (pop-to-buffer (get-buffer-create "*testing*"))
  (use-local-map keymap))

This doesn't work as expected:

(let* ((enable t)
       (icon (vector
	      (find-image '((:type xpm :file "right-arrow.xpm")))
	      (find-image '((:type xpm :file "left-arrow.xpm")))
	      (find-image '((:type xpm :file "cancel.xpm")))
	      (find-image '((:type xpm :file "close.xpm")))))
       (keymap
	`(keymap
	  (tool-bar
	   keymap
	   (ignore menu-item "IGNORE" ignore
		   :enable ,enable :image ,icon)))))
  (pop-to-buffer (get-buffer-create "*testing*"))
  (use-local-map keymap))

Thanks.

In GNU Emacs 24.3.50.1 (i686-pc-cygwin, GTK+ Version 3.8.2)
 of 2013-09-06 on localhost
Bzr revision: 114147 dmantipov@yandex.ru-20130905162520-14j783enzhc0fz0i
Windowing system distributor `The Cygwin/X Project', version 11.0.11402000
Configured using:
 `configure --verbose --with-x-toolkit=gtk3 --without-imagemagick
 --without-dbus --without-gconf --without-gsettings'

In GNU Emacs 24.3.50.1 (i686-pc-cygwin, X toolkit, Xaw3d scroll bars)
 of 2013-09-06 on localhost
Bzr revision: 114147 dmantipov@yandex.ru-20130905162520-14j783enzhc0fz0i
Windowing system distributor `The Cygwin/X Project', version 11.0.11402000
Configured using:
 `configure --verbose --with-x-toolkit=lucid --without-imagemagick
 --without-dbus --without-gconf --without-gsettings'





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#15281: 24.3.50; Some tool-bar buttons disappear in GTK3 Emacs
  2013-09-06  0:02 bug#15281: 24.3.50; Some tool-bar buttons disappear in GTK3 Emacs Katsumi Yamaoka
@ 2013-09-06  0:11 ` Katsumi Yamaoka
  2013-09-06  5:03 ` Jan Djärv
  1 sibling, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2013-09-06  0:11 UTC (permalink / raw)
  To: 15281

Katsumi Yamaoka wrote:
> However, a tool-bar button that has such images is not shown in
> GTK3 Emacs.  Moreover, LUCID Emacs (i.e. --with-x-toolkit=lucid)
> shows such a button, however only the `item 1' image is used no
> matter what circumstance is.

Sorry, let me correct this.  As for LUCID Emacs, only the `item 1'
image is used when the button is enabled.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#15281: 24.3.50; Some tool-bar buttons disappear in GTK3 Emacs
  2013-09-06  0:02 bug#15281: 24.3.50; Some tool-bar buttons disappear in GTK3 Emacs Katsumi Yamaoka
  2013-09-06  0:11 ` Katsumi Yamaoka
@ 2013-09-06  5:03 ` Jan Djärv
  2013-09-06  5:08   ` Katsumi Yamaoka
  1 sibling, 1 reply; 4+ messages in thread
From: Jan Djärv @ 2013-09-06  5:03 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: 15281

Hello.

Gtk+ does its own enable/disable/selected modifications of images, and Emacs can't/shouldn't  override that.  So for Gtk+ item 1 to 3 are ignored.  Documentation should be updated though.

	Jan D.

6 sep 2013 kl. 02:02 skrev Katsumi Yamaoka <yamaoka@jpl.org>:

> Hi,
> 
> The Info manual describes as follows:
> 
> ,---- (info "(Elisp)Tool Bar")
> |`:image IMAGE'
> |     IMAGES is either a single image specification or a vector of four
> |     image specifications.  If you use a vector of four, one of them is
> |     used, depending on circumstances:
> |
> |    item 0
> |          Used when the item is enabled and selected.
> |
> |    item 1
> |          Used when the item is enabled and deselected.
> |
> |    item 2
> |          Used when the item is disabled and selected.
> |
> |    item 3
> |          Used when the item is disabled and deselected.
> |
> |   If IMAGE is a single image specification, Emacs draws the tool bar
> |button in disabled state by applying an edge-detection algorithm to the
> |image.
> `----
> 
> However, a tool-bar button that has such images is not shown in
> GTK3 Emacs.  Moreover, LUCID Emacs (i.e. --with-x-toolkit=lucid)
> shows such a button, however only the `item 1' image is used no
> matter what circumstance is.
> 
> This works:
> 
> (let* ((enable t)
>       (icon (find-image '((:type xpm :file "cancel.xpm"))))
>       (keymap
> 	`(keymap
> 	  (tool-bar
> 	   keymap
> 	   (ignore menu-item "IGNORE" ignore
> 		   :enable ,enable :image ,icon)))))
>  (pop-to-buffer (get-buffer-create "*testing*"))
>  (use-local-map keymap))
> 
> This doesn't work as expected:
> 
> (let* ((enable t)
>       (icon (vector
> 	      (find-image '((:type xpm :file "right-arrow.xpm")))
> 	      (find-image '((:type xpm :file "left-arrow.xpm")))
> 	      (find-image '((:type xpm :file "cancel.xpm")))
> 	      (find-image '((:type xpm :file "close.xpm")))))
>       (keymap
> 	`(keymap
> 	  (tool-bar
> 	   keymap
> 	   (ignore menu-item "IGNORE" ignore
> 		   :enable ,enable :image ,icon)))))
>  (pop-to-buffer (get-buffer-create "*testing*"))
>  (use-local-map keymap))
> 
> Thanks.
> 
> In GNU Emacs 24.3.50.1 (i686-pc-cygwin, GTK+ Version 3.8.2)
> of 2013-09-06 on localhost
> Bzr revision: 114147 dmantipov@yandex.ru-20130905162520-14j783enzhc0fz0i
> Windowing system distributor `The Cygwin/X Project', version 11.0.11402000
> Configured using:
> `configure --verbose --with-x-toolkit=gtk3 --without-imagemagick
> --without-dbus --without-gconf --without-gsettings'
> 
> In GNU Emacs 24.3.50.1 (i686-pc-cygwin, X toolkit, Xaw3d scroll bars)
> of 2013-09-06 on localhost
> Bzr revision: 114147 dmantipov@yandex.ru-20130905162520-14j783enzhc0fz0i
> Windowing system distributor `The Cygwin/X Project', version 11.0.11402000
> Configured using:
> `configure --verbose --with-x-toolkit=lucid --without-imagemagick
> --without-dbus --without-gconf --without-gsettings'
> 
> 






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#15281: 24.3.50; Some tool-bar buttons disappear in GTK3 Emacs
  2013-09-06  5:03 ` Jan Djärv
@ 2013-09-06  5:08   ` Katsumi Yamaoka
  0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2013-09-06  5:08 UTC (permalink / raw)
  To: jan.h.d; +Cc: 15281-done

Jan Djärv wrote:
> Hello.

> Gtk+ does its own enable/disable/selected modifications of images, and
> Emacs can't/shouldn't override that.  So for Gtk+ item 1 to 3 are
> ignored.  Documentation should be updated though.

> 	Jan D.

I see.  I'm closing this bug.  Thank you.

> 6 sep 2013 kl. 02:02 skrev Katsumi Yamaoka <yamaoka@jpl.org>:

>> Hi,
>>
>> The Info manual describes as follows:
>>
>> ,---- (info "(Elisp)Tool Bar")
>>|`:image IMAGE'
>>|     IMAGES is either a single image specification or a vector of four
>>|     image specifications.  If you use a vector of four, one of them is
>>|     used, depending on circumstances:
>>|
>>|    item 0
>>|          Used when the item is enabled and selected.
>>|
>>|    item 1
>>|          Used when the item is enabled and deselected.
>>|
>>|    item 2
>>|          Used when the item is disabled and selected.
>>|
>>|    item 3
>>|          Used when the item is disabled and deselected.
>>|
>>|   If IMAGE is a single image specification, Emacs draws the tool bar
>>|button in disabled state by applying an edge-detection algorithm to the
>>|image.
>> `----
>>
>> However, a tool-bar button that has such images is not shown in
>> GTK3 Emacs.  Moreover, LUCID Emacs (i.e. --with-x-toolkit=lucid)
>> shows such a button, however only the `item 1' image is used no
>> matter what circumstance is.
>>
>> This works:
>>
>> (let* ((enable t)
>>       (icon (find-image '((:type xpm :file "cancel.xpm"))))
>>       (keymap
>> 	`(keymap
>> 	  (tool-bar
>> 	   keymap
>> 	   (ignore menu-item "IGNORE" ignore
>> 		   :enable ,enable :image ,icon)))))
>>  (pop-to-buffer (get-buffer-create "*testing*"))
>>  (use-local-map keymap))
>>
>> This doesn't work as expected:
>>
>> (let* ((enable t)
>>       (icon (vector
>> 	      (find-image '((:type xpm :file "right-arrow.xpm")))
>> 	      (find-image '((:type xpm :file "left-arrow.xpm")))
>> 	      (find-image '((:type xpm :file "cancel.xpm")))
>> 	      (find-image '((:type xpm :file "close.xpm")))))
>>       (keymap
>> 	`(keymap
>> 	  (tool-bar
>> 	   keymap
>> 	   (ignore menu-item "IGNORE" ignore
>> 		   :enable ,enable :image ,icon)))))
>>  (pop-to-buffer (get-buffer-create "*testing*"))
>>  (use-local-map keymap))
>>
>> Thanks.
>>
>> In GNU Emacs 24.3.50.1 (i686-pc-cygwin, GTK+ Version 3.8.2)
>> of 2013-09-06 on localhost
>> Bzr revision: 114147 dmantipov@yandex.ru-20130905162520-14j783enzhc0fz0i
>> Windowing system distributor `The Cygwin/X Project', version 11.0.11402000
>> Configured using:
>> `configure --verbose --with-x-toolkit=gtk3 --without-imagemagick
>> --without-dbus --without-gconf --without-gsettings'
>>
>> In GNU Emacs 24.3.50.1 (i686-pc-cygwin, X toolkit, Xaw3d scroll bars)
>> of 2013-09-06 on localhost
>> Bzr revision: 114147 dmantipov@yandex.ru-20130905162520-14j783enzhc0fz0i
>> Windowing system distributor `The Cygwin/X Project', version 11.0.11402000
>> Configured using:
>> `configure --verbose --with-x-toolkit=lucid --without-imagemagick
>> --without-dbus --without-gconf --without-gsettings'





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-06  5:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-06  0:02 bug#15281: 24.3.50; Some tool-bar buttons disappear in GTK3 Emacs Katsumi Yamaoka
2013-09-06  0:11 ` Katsumi Yamaoka
2013-09-06  5:03 ` Jan Djärv
2013-09-06  5:08   ` Katsumi Yamaoka

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).