Re: [gtk-list] GTK+, Text Widget & Modem



[Sorry this reply is so late...I've been having email probs]

On Wed, 10 Jun 1998, Abe Waranowitz wrote:

> Hello!
> 
> So far I have a simple modem terminal program working.  :-)  Being a
> newbie, I've had a few problems...
> 
> Would anyone be kind enough to help me?  Thanks in advance!
> 
> 1)  I'm using gdk_input_add() to monitor an opened canonical file
> descriptor to /dev/ttyS1.  My routine simply adds the text grabbed here
> to the text window.  But it always waits for a CR before it sends it.
> How can I get a character by character screen update?  Should I use
> GTK's idle functions and constantly read the file descriptor?

I'm using actually GTK's idle functionality and non-blocking file
descriptors in my USENET news reader.  Works well for me...

> 2)  When receiving a BIG file (>15k), the text window stops updating.
> I have to hit CR to feed the data through.  Is this a buffer limitation
> of the text widget?  How can I keep the text widget buffer a fixed
> length like a standard terminal does?

Dunno... Haven't played with that yet.

> 3)  I'd like to use a line buffer for editing text before I send it.
> What would be the best way to catch CR's and send only that line?

Is that a good idea considering most terminal programs don't line buffer
because the program at the other end may be expecting individual key
presses?

> Thanks!
> 
> PS Anyone willing to comment on my code if I email it to you?  (12k)
> 
> -Abe Waranowitz

- Jason Weiss

---
Penguin: Linux version 2.0.34 on an i586 machine (450.56 BogoMips).








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