* GTK tool bar icons in Emacs
@ 2009-07-16 0:14 Nick Roberts
2009-07-16 1:13 ` Chong Yidong
2009-07-16 10:05 ` Jan Djärv
0 siblings, 2 replies; 5+ messages in thread
From: Nick Roberts @ 2009-07-16 0:14 UTC (permalink / raw
To: emacs-devel
I would like to use the GTK record/stop icons in Emacs. In GTK Emacs, at
times, the custom icons appear somehow to be replaced by GTK ones. Could
someone please explain how this works in basic terms.
Also GTK apps, e.g., FireFox often allow names to appear in text below the icons.
(View-> Toolbars-> Customize...). Is it possible to do this in GTK Emacs?
Thanks,
Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GTK tool bar icons in Emacs
2009-07-16 0:14 GTK tool bar icons in Emacs Nick Roberts
@ 2009-07-16 1:13 ` Chong Yidong
2009-07-16 10:05 ` Jan Djärv
1 sibling, 0 replies; 5+ messages in thread
From: Chong Yidong @ 2009-07-16 1:13 UTC (permalink / raw
To: Nick Roberts; +Cc: emacs-devel
nickrob@snap.net.nz (Nick Roberts) writes:
> I would like to use the GTK record/stop icons in Emacs. In GTK Emacs, at
> times, the custom icons appear somehow to be replaced by GTK ones. Could
> someone please explain how this works in basic terms.
>
> Also GTK apps, e.g., FireFox often allow names to appear in text below the icons.
> (View-> Toolbars-> Customize...). Is it possible to do this in GTK Emacs?
>
> Thanks,
> Nick
The GTK tool-bar code calls `x-gtk-map-stock', which is defined in
lisp/term/x-win.el. That function is passed the name of an image file,
and returns the name of a corresponding stock image file, or nil if it
can't be found (in which case Emacs uses the original image file).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GTK tool bar icons in Emacs
2009-07-16 0:14 GTK tool bar icons in Emacs Nick Roberts
2009-07-16 1:13 ` Chong Yidong
@ 2009-07-16 10:05 ` Jan Djärv
2009-07-17 3:04 ` Nick Roberts
1 sibling, 1 reply; 5+ messages in thread
From: Jan Djärv @ 2009-07-16 10:05 UTC (permalink / raw
To: Nick Roberts; +Cc: emacs-devel
Nick Roberts skrev:
> I would like to use the GTK record/stop icons in Emacs. In GTK Emacs, at
> times, the custom icons appear somehow to be replaced by GTK ones. Could
> someone please explain how this works in basic terms.
Can you narrow down what you did when the icons where replaced? Note that
many major modes replaces the tool bar, maybe you stubled upon that?
If you need to replace some standard icons, customizing x-gtk-stock-map should
to the trick (apart from bugs of course).
The tool bar is specified in the variable tool-bar-map. This can be buffer
local and as stated, major modes do change this.
or the Gtk+ case, the file names inside tool-bar-map get remapped by
x-gtk-stock-map to a Gtk+ stock name, so that stock icons are used instead (to
adjust for Gtk+ theme changes).
>
> Also GTK apps, e.g., FireFox often allow names to appear in text below the icons.
> (View-> Toolbars-> Customize...). Is it possible to do this in GTK Emacs?
>
The code is not hard to do, the problem is that for icons there doesn't exist
any short name, only the help text is available. The text used for the name
is ofthen too long (for example, "Visit new file..."), and the tool bar
becomes very wide.
Jan D.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GTK tool bar icons in Emacs
2009-07-16 10:05 ` Jan Djärv
@ 2009-07-17 3:04 ` Nick Roberts
2009-07-17 3:28 ` Miles Bader
0 siblings, 1 reply; 5+ messages in thread
From: Nick Roberts @ 2009-07-17 3:04 UTC (permalink / raw
To: Jan Djärv; +Cc: emacs-devel
Jan Djärv writes:
>
>
> Nick Roberts skrev:
> > I would like to use the GTK record/stop icons in Emacs. In GTK Emacs, at
> > times, the custom icons appear somehow to be replaced by GTK ones. Could
> > someone please explain how this works in basic terms.
>
> Can you narrow down what you did when the icons where replaced? Note that
> many major modes replaces the tool bar, maybe you stubled upon that?
I noticed that, for example the the button gud-goto-info used a gtk icon
("gtk-info") even though the "info" icon was specified in gud.el. It's
not a problem, I just wanted to use new ones "gtk-media-record" and
"gtk-media-stop" for a new feature of GDB 7.0 (reversible debugging).
> If you need to replace some standard icons, customizing x-gtk-stock-map should
> to the trick (apart from bugs of course).
Yes, following Yidong's suggestion, I've done that and it seems to work - thanks.
> > Also GTK apps, e.g., FireFox often allow names to appear in text below the icons.
> > (View-> Toolbars-> Customize...). Is it possible to do this in GTK Emacs?
> >
>
> The code is not hard to do, the problem is that for icons there doesn't exist
> any short name, only the help text is available. The text used for the name
> is ofthen too long (for example, "Visit new file..."), and the tool bar
> becomes very wide.
It would be nice to make Emacs more of a GTK app (fonts don't appear to change
with System->Appearance->Fonts->Application font on Ubuntu) but since Emacs
must run on a wide range of platforms that might not be possible.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GTK tool bar icons in Emacs
2009-07-17 3:04 ` Nick Roberts
@ 2009-07-17 3:28 ` Miles Bader
0 siblings, 0 replies; 5+ messages in thread
From: Miles Bader @ 2009-07-17 3:28 UTC (permalink / raw
To: Nick Roberts; +Cc: Jan Djärv, emacs-devel
nickrob@snap.net.nz (Nick Roberts) writes:
> It would be nice to make Emacs more of a GTK app (fonts don't appear to change
> with System->Appearance->Fonts->Application font on Ubuntu) but since Emacs
> must run on a wide range of platforms that might not be possible.
One thing I've noticed is that if one installs a new fontconfig-handled
font, Emacs can't use it unless you restart, whereas typical gtk apps
can use the new font immediately.
It would be nice if Emacs could see newly installed fonts automatically,
or at least have some way of telling it to re-read fontconfig info
(I tried (clear-font-cache), but that had no apparent effect)...
Thanks,
-Miles
--
Rational, adj. Devoid of all delusions save those of observation, experience
and reflection.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-17 3:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-16 0:14 GTK tool bar icons in Emacs Nick Roberts
2009-07-16 1:13 ` Chong Yidong
2009-07-16 10:05 ` Jan Djärv
2009-07-17 3:04 ` Nick Roberts
2009-07-17 3:28 ` Miles Bader
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.