[Geany] Gtk widget names and gtkrc

Enrico Tröger enrico.troeger at xxxxx
Tue May 15 15:20:43 UTC 2007


On Fri, 4 May 2007 17:38:39 +0200, Enrico Tröger
<enrico.troeger at uvena.de> wrote:

> 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 just added widget names to (hopefully all) dialogs used in Geany.
Unfortunately, I still didn't find a way to get the menu items of the
main file menu, the toolbar menu and the popup menu of the editor
widget get styled.

widget "*.*MenuItem*" style "geany_style"
would work(if there is a defined style "geany_style") but it would work
on all menu items of all GTK apps.
widget "Geany*.*MenuItem*" style "geany_style"
doesn't work. Anyone any ideas?


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/20070515/acb7921a/attachment.pgp>


More information about the Users mailing list