Signal for a button-2 paste event in a TextView




I have a GtkTextView with an associated GtkTextBuffer.  I want to act on
the condition when  text is pasted into the textview or textbuffer when
the middle mouse button is pressed.  That is, suppose I have some text
selected in another application (like a gnome-terminal, evolution, etc.)
or when I have some text selected within the same textview.  When I move
the mouse to a position and press the middle mouse button, the selected
text is inserted at the point click.  However, I want to add the text
myself with certain modifications. I am attempting to find the
appropriate signal to use.  I have tried, "selection-get" "selection-
notify-event" "selection-received" "selection-request-event" and
"paste_clipboard".  None of these result in my callback being called.
(The "paste_clipboard" only seems to be called when I do a <ctrl>-c
<ctrl>-v combination.)  I've just been guessing with these signals since
the API docs offer no explanation on what they represent.




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