Re: overridding the theme in ~.gtkrc-2.0




--- zentara <zentara1 sbcglobal net> wrote:

On Fri, 24 Aug 2007 09:01:10 +0200
Jörn Reder <joern zyn de> wrote:

zentara wrote:

So you setup a wrapper script, and it will override the default ~.gtkrc-2.0

##############################
#!/bin/sh
export GTK2_RC_FILES='/usr/local/share/themes/Bumblebee/gtk-2.0/gtkrc' 
./myapp_w-custom-rc
###############################

Probably it's sufficient to set this environment variable in your Perl 
program, I think before Gtk2->init or better in a BEGIN block to execute
it early:

 BEGIN { $ENV{GTK2_RC_FILES} = '...' }
 use Gtk2 -init;
 ...

This way no wrapper script should be needed.
Regards,
Jörn

Thanks. 
I tried it for my first post, and it didn't work( because I put the BEGIN block
after Gtk2 -init).  This is much better for Perl, but the wrapper is still handy for 
a c program.

zentara

-- 
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Another trick in Perl - if one wants to control the order in which 'use ...'
statements are executed, 'eval' comes handy, i.e. one can write:

<something_to_be_done_first>
eval "use Foo;";
.

--Sergei.


Applications From Scratch: http://appsfromscratch.berlios.de/


       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 



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