Re: GtkTextView copy-paste default handler problem



Matthew Talbert wrote:
I want to restrict copy and paste to just text format. For this I've
connected to "copy-clipboard", "cut-clipboard" and "paste-clipboard"
signals. Unfortunately this doesn't stop default handlers from being
called so everything gets copied twice. I added
g_signal_stop_emission_by_name() calls to my signal handlers but it
didn't seem to have any effect. I even wrote function that unregisters
all GtkTextBuffer serialize and unserialize formats but that didn't help
either.

Are your signal handlers returning TRUE or FALSE? FALSE allows the
event to keep propagating, while TRUE prevents it. Also, which
function are you using to connect your signal handlers?
g_signal_connect?

Matthew

Yes I'm using g_signal_connect to connect the signal handlers. Returning
TRUE or FALSE is a good suggestion but unfortunately they are signals
not events so the return type is void.

- Tuukka



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