[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KStandardDir
From: Robert Williams <rwilliams () jrc-utah ! com>
Date: 1999-06-23 16:30:32
[Download RAW message or body]
Stephan Kulow wrote:
> Harri Porten wrote:
> >
> > 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?
> >
> > QStringList dirs = KGlobal::dirs()->findDirs("appdata", "picts");
> >
> > will give you a _list_ of ../share/apps/kmahjongg/picts directories.
> >
> > Depending on your need you may iterate trough this list or take, let's
> > say the first one, with first().
>
> Here is example code out of kmahjongg:
> QString str;
> str.sprintf( "%1/kmahjongg/pics/%2").
> arg(kapp->kde_datadir()).arg(DEFAULTBACKGROUND);
> if( ! loadBackground( str ) )
>
> Change this to
> if (! loadBackground(locate("appdata", "pics/" +
> DEFAULTBACKGROUND))
>
> Greetings, Stephan
>
> --
> As long as Linux remains a religion of freeware fanatics,
> Microsoft have nothing to worry about.
> By Michael Surkan, PC Week Online
That easy? Shoot I have been reading the code about resources and other
things.
Thank you!
--
Robert Williams rwilliams@jrc-utah.com
Jarob Consulting rwilliams@kde.org
Provo, Utah
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic