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

List:       kde-devel
Subject:    Re: Using khtml_part and meta refresh headers
From:       John Morton <jwm () eslnz ! co ! nz>
Date:       2004-12-22 20:25:36
Message-ID: 200412230925.36227.jwm () eslnz ! co ! nz
[Download RAW message or body]

On Thu, 23 Dec 2004 07:45, David Faure wrote:
>  On Wednesday 22 December 2004 12:28, John Morton wrote:
>
>  Each call to blank() creates a new KHTMLPart? If blank() is called more
> than once that's a memory "leak".  [disclaimer: I don't know the
> kscreensaver stuff]

AFAIK, kscreensaver acts just like xscreensaver in that the savers are stand 
alone programs that are run when it wants to blank the screen and are 
destroyed when the screensaver is deactivated, so blank should only ever run 
once. Couldn't hurt to move it up into object init and tear down, though.

>  >     doc->setMetaRefreshEnabled(useMetaRefresh);
>
>  Which is true I assume?

Yes :-) Toggling the control for the javascript support works as expected.

>  >     doc->openURL(url);
>  >     doc->view()->resize(width(), height());
>
>  And then... nothing connects to the completed() signal, right? You just
>  let the webpage load, being directly visible on the screen (unlike e.g.
>  the kwebdesktop mechanism of making a pixmap from it)

Yes. I figured the pixmap drawing route would be more complicated as I'd have 
to keep doing for you to see the effects of javascript/gif/flash animations, 
even without interaction.

>  In that case I don't see why meta-refresh wouldn't work... KHTMLPart
>  schedules a redirection and follows it when the timer expires.

And, indeed, the javascript timer works fine, as I have a countdown timer at 
the top of the first page I'm interested in displaying that ticks along 
nicely.

I see that around about Feb 2003 a patch was added to make the refresh stuff 
work, but that's what I see in the body of khtml_part.cpp linked from the 3.2 
documentation, so I assume debian's 3.2.3 version libraries include it. I 
might be wrong...

>  In doubt check the debug output from khtmlpart (area 6050), it tells when
>  a redirection is scheduled and when it happens.

Time to figure out how to get debugging work :-) Give the amount of time I've 
spent fighting the build system, can you give me some pointers to get me 
started?

>  >     doc->show();
>
>  This compiles? :)
>  I guess you mean doc->view()->show();

Same thing, apparently. show and hide are just an alias for view()->show(). I 
was following the example code in the description of khtml_part.

Thanks,
John
 
>> 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