[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: gdk_input_add looping



* Christopher T Lansdown <lansdoct@screech.cs.alfred.edu> writes:

> 	That doesn't work.  A file is always readable, unfortunately.  What
> you have to do is get the source to tail, look up how it does tail -f, and
> do that.  Someone else had tried this a while before and we came to the same

Indeed, that was me :-)

If you, broc, want to have a look at the code I finally used, I have
put it on http://www.marquardt-home.de/gtail-0.2.tar.gz (GPL 2). My
app is gtail, a graphical tail. You can add and watch different files
with notebooks (and remove them, of course). It tries to always show
the last portion of the file, but not if the user scrolled up.

I haven't worked on it for a long time, the code is amateurish, but
it works. 

Has a memory leak that I haven't fixed. Now, that memprof is out, it
might me possible for me... but memprof even gets a segfault with
gtail:-) I don't understand the mpr output.

Would be cool if someone would fix the leak and implement the missing
features (from my TODO):

- copy to clipboard (see Harlow, Developing Linux Applications, p.107)

- if the user wants to scroll back further than what we are showing,
  request more text to show

- refuse to load binary files (see source of less)


* Erik Mouw <J.A.K.Mouw@its.tudelft.nl> writes:

> If you just continuously see "read_log called", then chances are high that
> gdk_input_add() doesn't work on regular files. The GTK+ tutorial and the
> GDK reference don't mention this fact, so this can be considered a bug in
> the gdk_input_add() or in its documentation. Could anyone comment on this?

Well, it seems that it doesn't work on regular files, indeed. Only
on sockets, probably.

Cheers,
  Colin

-- 
14. Madcatmachopsychoromantik . . . . . . . . . . . . . . . . . . 09.15



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]