[Geany] Gtk widget names and gtkrc

Enrico Tröger enrico.troeger at xxxxx
Fri May 4 15:38:39 UTC 2007


On Thu, 3 May 2007 19:39:36 -0300, Damián Viano <geany at damianv.com.ar>
wrote:

> On Thu, May 03, 2007 at 06:52:48PM +0200, Enrico Tröger wrote:
> > Well, I'm not exactly sure how the widget names used in a .gtkrc-2.0
> > file are matched with the real widgets in an application(I should
> > read the docs to find out) but it is quite easy if you want to do
> > it for all GTK applications at once:
> > ------snip-------
> > style "my_style"
> > {
> > 	font_name="Bitstream Very Sans 7"
> > }
> > widget_class "*" style "my_style"
> > ------snip-------
> > this is the first part of my .gtkrc-2.0.
> > You could replace widget_class ... by
> > widget "geany*" style "my_style" but as I told I'm not sure what we
> > have to do within Geany to let GTK recognise the widgets. Any
> > pointers are welcome.
>
> 	AIUI, you should use gtk_widget_set_name() for that for the
> main GtkWindow, that should do it.
Thanks. I didn't expect that it is so easy ;-).
But unfortunately, it is not so easy, too. The style(only tried to
change the font) is only applied on the main menu but not on the
submenus but I will have a look at this next week and hopefully will
find a way to get it working properly.

At the moment(SVN r1503) styles for the main window and for the
preferences dialog can be set. More widgets will follow soon.

I tried to document this a bit on
http://geany.uvena.de/manual/ch03s03.html#general_userstyles. But
probably it still can be improved ;-).

Regards,
Enrico

--
Get my GPG key from http://www.uvena.de/pub.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20070504/42d005a1/attachment.pgp>


More information about the Users mailing list