[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    [Panel-devel] getThemePath broken in SK
From:       matt-lists () comnet ! net ! nz (Matt)
Date:       2005-06-05 23:09:52
Message-ID: 200506060909.28855.matt-lists () comnet ! net ! nz
[Download RAW message or body]

On Mon, 06 Jun 2005 08:36, Petri Damsten wrote:
> On Sunday 05 June 2005 22:35, Matt wrote:
> > Could you also explain the new readThemeFile function, so I can
> > understand if it will help me.
>
> This code should produce two similar outputs if it's run from non skz
> themes. Latter should also work from skz theme.
>
>     # Reading file (doesn't work with skz themes)
>     f = open(karamba.getThemePath(widget) + '/maindata.xml')
>     s = f.read()
>     f.close()
>     print s
>
>     # This works also in skz themes
>     s = karamba.readThemeFile(widget, 'maindata.xml')
>     print s
>
> Petri

I'm not sure that that will help either of my issues.  The codecs.open() 
function is what I use to be able to use utf-8 encoded translation files.  In 
the second example, is the new object 's' an unadulterated version of 
maindata.xml?  If so, I may still be able to manipulate it, to decode it.  
I'll need to update from svn and test it later today.

In terms of changing to a new 'root' directory in the theme, if you're using 
an skz file, are all files relative to the .skz file?

-- 
Regards

Matt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic