Themes outside Camelbox directory

3 views
Skip to first unread message

Jared

unread,
Apr 18, 2011, 11:59:34 PM4/18/11
to camelbox
Is there a way to apply a GTK theme that's outside the Camelbox
install directory? I would like to distribute a theme with an app I'm
working on. I noticed other GTK apps on Windows like Pidgin have the
theme directory in the app's folder and uses a relative path to the
theme's files. I've written a couple Perl/GTK apps in Linux and you
can load a custom GTK theme by launching a GTK app with GTK2_RC_FILES=/
some/path/gtkrc or just using Gtk2::RcStyle to load a theme out of /
usr/share/themes, but this is my first attempt at a Perl/GTK app on
Windows and I can't seem to figure this out. Is there a trick to do
this on Windows?

Brian Manning

unread,
Apr 19, 2011, 2:39:33 AM4/19/11
to came...@googlegroups.com
On Mon, Apr 18, 2011 at 8:59 PM, Jared <jared....@gmail.com> wrote:
> Is there a way to apply a GTK theme that's outside the Camelbox
> install directory?
[snip]

> I've written a couple Perl/GTK apps in Linux and you
> can load a custom GTK theme by launching a GTK app with GTK2_RC_FILES=/
> some/path/gtkrc or just using Gtk2::RcStyle to load a theme out of /
> usr/share/themes, but this is my first attempt at a Perl/GTK app on
> Windows and I can't seem to figure this out. Is there a trick to do
> this on Windows?

What's not working? Example code would be helpful.

Thanks,

Brian

Jared

unread,
Apr 19, 2011, 9:52:22 PM4/19/11
to camelbox
I got it figured out now. I was always able to load themes so long as
they were in c:\camelbox but I wanted to bundle a theme with my app
and have the theme's files in my app's directory. Before, I couldn't
get my app to find the theme's engine .dll unless it was in c:
\camelboxlib\gtk-2.0\2.10.0\engines but after some research I found
out about the GTK_EXE_PREFIX environmental variable. In my apps
directory I copied lib\gtk-2.0\2.10.0\engines and share\themes from c:
\camelbox. This is what I ended up doing:

my $theme = "share\\themes\\MS-Windows\\gtk-2.0\\gtkrc";
$ENV{'GTK_EXE_PREFIX'} = ".";
Gtk2->init;
Gtk2::Rc->parse($theme);

Thanks for the response.


On Apr 19, 2:39 am, Brian Manning <elspicyj...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages