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

List:       kde-devel
Subject:    Re: KStandardDir
From:       Waldo Bastian <bastian () ens ! ascom ! ch>
Date:       1999-06-23 9:09:39
[Download RAW message or body]

Robert Williams wrote:
> 
> I am trying to fix Kmahjongg to use KStandardDir so it can be
> run from the panel.
> I looked at locateLocal() and that returns $HOME/.kde ....   
> How do you get /opt/kde/share/apps/kmahjongg/picts?

"picts" isn't a standard place. Can you change this to
"pics"?

If you do, you can load images (e.g. tile.png) from this
directoryplace by using Icon("tile.png").

This is the "right way".

You can also use locate("appdata", "picts") to get the 
directory itself or use locate("appdata", "picts/tile.png")
to get the full path (including tile.png). 

This last one is preffered since you may have a picts
directory around which doesn't have any tile.png in it.

locateLocal() returns only directories/files to which
you can write. In your case you are not interested in
this.

Cheers,
Waldo
-- 
*** *** *** Hi! I'm a .signature virus! *** *** ***
Copy me into your .signature file to help me spread!

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

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