Re: [pygtk] insert_at_cursor signal - cannot connect?



On Mon, Jun 14, 2004 at 08:37:01AM -0500, Doug Quale wrote:
> michal salaban <emes pld-linux org> writes:
> 
> > i wrote small application using pygtk and glade. everything works fine,
> > with one exception: i can't connect a callback to insert_at_cursor
> > signal. i have to check TextView contents after every modification.
> > delete_from_cursor works fine, paste_clipboard also. insert_at_cursor
> > doesn't.
> 
> I waited for a while to see if anyone had the answer to this puzzle
> before chiming in.  Unfortunately I don't know why the TextView
> 'insert_at_cursor' signal never seems to be emitted.  Supposedly the
> signal is used mostly for key bindings.  If someone understands what's
> going on I'd be interested to know.

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?

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331



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