proposal: slight extension of gtkrc syntax for per-app settings



 Hi, 

 Currently it's impossible to bind style specific to only particular program
in a single gtkrc file (yes, gnomelibs add much more gtkrc files to the list
of gtkrc files to parse, including files that contain a name of the program 
in their names - but I'm talking about pure gtk).

 What I propose is to slightly extend syntax of 'pattern' in gtkrc files to
allow using program name as a pattern component - e.g. the pattern
syntax could look like the following:
	[:<program-name>:]<usual-pattern-syntax>
 E.g., to override theme of gfoo widgets, one can write
 	class ":gfoo:GtkWidget" style "gfoo-default"
 This of course fill prohibbit the use of widget names that start and end with
colon - but it adds a lot of flexibility!

 Also I would like to propose adding more items to the list of gtkrc files to
parse at startup of each gtk program - so that a list of files contained a
files that include the program name in them. For example, ordinary gnome app
gfontsel has the following in their list of default gtkrc files:

/usr/etc/gtk/gtkrc
~/.gtkrc
/usr/share/gtkrc
/usr/share/gfontselrc
~/.gnome/gtkrc
~/.gnome/gfontselrc

 That's rather flexible. I think such flexibility (automatically parsing gtkrc
files with names based on the program's name) would be very useful for gtk
programs too.The only problem is deciding in which subdirectory of "~" to look
for those additional gtkrc files.

 Since gtk2 has ability to set values of object properties from gtkrc files
too, I think the need for such flexibility is increasing.  I think both
proposed extensions (extended syntax and additional default styles) are rather
ortogonal and both would be very useful to have. Granted, it's trivial to
implement both of them. 

 What do you think about all this?

 Best regards,
  -Vlad


_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]