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

List:       kde-devel
Subject:    Re: KStandardDirs does not work
From:       Erik Sigra <sigra () home ! se>
Date:       2003-03-01 18:22:46
[Download RAW message or body]

lördagen den 1 mars 2003 11.54 skrev Erik Sigra:
> I try to create an application with imagesets stored in
> <KDEDIRS>/share/apps/appname/imagesets". Each imageset is a subdirectory
> that contains png-files.
>
> I have the directories "<KDEPREFIX>/share/apps/appname/imagesets/default"
> and "<KDEHOME>/share/apps/appname/imagesets/my_imageset".
>
> I wanted to use KStandardDirs to get a list of all imagesets, but it does
> not work. I expect to get a list with the 2 directories mentioned above
> but:
>
> findAllResources("appdata", "imagesets/*/") gives a list of all png-files
> in all imagesets.
>
> findAllResources("appdata", "imagesets/*/.") gives an empty list
>
> findAllResources("appdata", "imagesets/*") gives an empty list
>
> findAllResources("appdata", "imagesets/") gives an empty list
>
> findAllResources("appdata", "imagesets") gives an empty list
>
> It seems like findAllResources does not return directories at all.
>
> findDirs("appdata", "imagesets") and findDirs("appdata", "imagesets/")
> gives a list of all directories that may contain imagesets:
> /home/work/.kde/share/apps/asimulator/imagesets/
> /usr/local/kde-3.1.0/share/apps/asimulator/imagesets/
>
> findDirs("appdata", "imagesets/*") gives an empty list
>
> findDirs("appdata", "imagesets/*/") gives an empty list
>
> findDirs("appdata", "imagesets/*/.") gives an empty list
>
> Is there a way to get what I want?

I decided to put a file called "index.desktop" in every imageset and search 
like this:
findAllResources("appdata", "imagesets/*/index.desktop")

It works, and I can use the desktop file to store translations of the imageset 
name.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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