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

List:       kde-devel
Subject:    Re: dcop script for kpdf
From:       subbukk <subbukk () gmail ! com>
Date:       2007-05-18 13:39:40
Message-ID: 200705181857.41569.subbukk () gmail ! com
[Download RAW message or body]

On Friday 18 May 2007 7:22 am, Michael Pyne wrote:
> On Thursday 17 May 2007, subbukk wrote:
> > Hi,
> >
> > Does anyone know a dcop message that would put kpdf into a presentation
> > mode?
>
> "dcop `dcopfind -a 'kpdf-*'`
> qt/KXMLGUIClient-KActionCollection/presentation activate"
Thanks for this tip. dcopfind prints only the first kpdf process and dcopstart 
doesn't even do that on my system (v3.5.3) :-(.
The following trick works:

kpdf $* &
pid=$!
timeout=15
while [ $((timeout--)) -gt 0 ]; do
        sleep 1
        test "$(dcop kpdf-$pid $ACTION property enabled)" == true &&
             dcop kpdf-$pid $ACTION activate && break
done
wait $pid

Thanks .. Subbu
 
>> 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