grdb first attempt (request for input)



Hi All.

I've taken a stab at writing a program to map app-defaults to gtk themes
(like krdb under kde). As described in someone's earlier email, I've 
dubbed it grdb.

This is version 0.0.0 ( and its not marked as such ;) ). Please don't
redistribute it yet.

It currently doesn't try to do fonts and needs some work in how to map
.ad file constants used by krdb into gtk themes. Basically, when I
couldn't tell what to used, I guessed. I haven't spent anytime trying to
get a better mix yet.

It also currently only reads the .ad files from kde's share directory.
Its a #define for now, you'll have to change it if your kde stuff isn't
in /opt/kde. I'll probably either pick a location below gnomes install
dir or at least make it relative to $KDEDIR.

There are a couple of other #defined constants you may need to tweak to get
to work for you.

It also needs to be run from the command line for now. It currently writes
its temp file into your current directory. You'll need write perms where
you run it from. That's probably the next thing I'll change, so I can
start running it at gnome startup.

I think that's enough of the warmup. You can grab the teeny tarball at:
http://missoula.bigsky.net/shunter/grdb.tgz

If you don't have kde installed, you're a better man than me ;)
I did tar up the .ad files as well. They're at:
http://missoula.bigsky.net/shunter/kde-ad.tgz

You'll have to change the source to let grdb know where you put 'em.

I haven't autoconf'd it, but its only one c file.

Basically, I'm interested in any recommendations for how to map the .ad
values into gtk theme colors.

I'd also like to know if there's a cleaner way to get a style with the
themed changes applied.

Currently, I'm doing:

	w = gtk_button_new_with_label("");
	gtk_widget_ensure_style(w);
	s = gtk_widget_get_style(w);
	gtk_widget_destroy(w);

Which gets me there, but looks hackish.
gtk_widget_get_default_style() gets me the unthemed default style, is there
a function to apply thematic changes directly to it?

Any other input is welcome. I'm going to be off the net till tomorrow.
My girlfriend tells me I'm done. But I'll should have tomorrow to transform
this from a "can I get this to work" to something approaching a respectable
0.0.1 release.

Have fun.

Sam Hunter <shunter@bigsky.net>



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