Hi,

My post (see subject insert_at_cursor) is similar to this one. ALl I
want to do is check the length of text in textview and then
enable/disable OK button based on that.

I'm using glade and I don't see a "changed" signal as you mention in the
drop down for text view?


On Tue, 2004-06-15 at 03:19, Doug Quale wrote:
> Christian Robottom Reis <[EMAIL PROTECTED]> writes:
> 
> > I've grepped through the GTK+ source and I don't see where the
> > insert_at_cursor signal could be emitted, but I don't claim expert
> > status there either. delete_from_cursor itself is emitted by GDK.Delete,
> > visibly in gtktextview.c:
> > 
> >       /* Deleting text */
> >         gtk_binding_entry_add_signal (binding_set, GDK_Delete, 0,
> >                                       "delete_from_cursor", 2,
> >                                       G_TYPE_ENUM, GTK_DELETE_CHARS,
> >                                       G_TYPE_INT, 1);
> > 
> > with similar lines for KP_Delete and Backspace. So the question is: who,
> > if anybody, emits insert_at_cursor? Or is this simply meant to be
> > emitted from userspace when convenient?
> 
> Hmmm.  Maybe that's right.  It looks like "delete_from_cursor" is only
> emitted by a few keybindings.  Perhaps "insert_at_cursor" is available
> for symmetry and for use by a keybinding, but none of the default
> keybindings for TextView use it.
> 
> I was experimenting with deleting text directly from the TextView
> TextBuffer and the "delete_at_cursor" signal is not emitted when the
> TextBuffer.delete() method is used.  This means it's possible to
> delete text from the TextView without triggering the
> "delete_at_cursor" signal, although probably not from the keyboard.  I
> think the "insert_at_cursor" and "delete_from_cursor" TextView signals
> aren't really suitable for what the original poster wants to do.  It's
> probably better to look at the underlying TextBuffer directly.  In
> fact, I think he hinted that all he needs to know is if the buffer is
> empty.  The TextBuffer "changed" signal would be the easiest one to
> use for that.
> _______________________________________________
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to