[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: New KDE Dock Applet
From: Matthias Welk <welk () fokus ! gmd ! de>
Date: 1999-08-31 7:29:23
[Download RAW message or body]
On Mon, 30 Aug 1999, John Corey wrote:
> Roberto Alsina wrote:
> >
> > On Mon, 30 Aug 1999, ian geiser wrote:
> >
> > >
> > > > Oh, just what I needed. I too have a couple applets
> > > > I've thrown
> > > > together, not working completely yet though. I was
> > > > just starting to
> > > > implement downloading stuff from web pages, so this
> > > > will hopefully make
> > > > that easier to learn. :)
> > >
> > > i am cheating in the way that i am using KFM
> > > to download the file. KFM is damn nice for an
> > > api but i guess the ease of programing makes
> > > for a lack of features.
> > >
> > > if anyone on the list can direct an easy yet
> > > stable way to transfer files less painfully
> > > than KSocket please post it. The main problem
> > > i have with KFM is it brings a window to the
> > > front of the screen. This is a real hassel
> > > when one is TRYING to play XEvil :P
> >
> > Well, KDE 2 fixes that.
> > Simple way to download a file from the web... how about
> >
> > system ("lynx -save http://whatever.com")
> >
> > Not really correct, but it should work.
>
> After downloading this kweather I found it wasn't a kicker applet as I
> assumed since I just had that on my mind working on my programs, but for
> KDE 1.x. But from what I've seen in some other KDE 2 apps, to do this
> is just:
>
> KIOJob *iojob = new KIOJob;
> connect(iojob, SIGNAL(SIGNAL( sigFinished( int ) ), this,
> SLOT(myFinished(int)));
> iojob->copy("http://www.whatever/url/file.html", "file:/tmp/file.html");
>
> to save that to /tmp/file.html, right? I think it was kghostview that I
> saw doing that, and I checked another couple apps. So I did that in my
> applet, and here's what happens:
>
> 25 iojob->copy(src.data(), dest.data());
> (gdb) n
> KIOJob::createSlave : Slave got
> kiolib (KIOJob): TRYING TO START /opt/kde-2/bin/kio_http
> trying m_strSlave...Pass
> m_strSlavePass ok (1)
> 28 NewsGroup *group = new NewsGroup("ltoday.rdf");
> (gdb) Slot copy called with:
> :http://linux/~jcorey/ltoday.rdf:file:/home/jcorey/ltoday.rdf:slotCopy 0
> BAH
> BAH$
> slotCopy 3
> kio_file : Starting
> kio_file : Adding .part extension to /home/jcorey/ltoday.rdf
> kio_http : Copied files file:/home/jcorey/ltoday.rdf
> KILLING SLAVE xb 13766
>
> ... Apache's log registers the hit, everything looks like it downloaded
> fine, except there's no such file in my home directory, and the slot
> function is never called. I even connected sigError() up, but it's not
> emitted either. Does copy block or should I do everything I need with
> the file in the finished slot function (once it gets working right)?
>
There is a problem with the current kio_http. After download is finished
kio_file deletes the new file again :-(
I will try to fix that, but it may take a while (I'm very busy).
Greetings, Matthias.
---------------------------------------------------------------
From: Matthias Welk voice: +49-30-3463-7272
GMD Fokus fax : +49-30-3463-8272
Kaiserin-Augusta-Allee 31 email: welk@fokus.gmd.de
10589 Berlin
----------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic