Re: gtk2 textview widget popup



Olivier Sessink <olivier lx student wau nl> writes: 
1- the new textview widget has it's own popup build-in, but this is very
slow (2 seconds on my PIII 450), what's going on??

It's probably the code that tries to decide if Paste should be
sensitive. Look at gtktextview.c.

2- In the gtk1 version of the app I'm working on (the Bluefish html
editor) I already had a popup, so I guess the best thing to do is to
extend the already existing popup. But how can I do this? How to interact
with the build in text-view popup?

You can override what the "popup_menu" signal does, and also intercept
button_press_event with button == 3 in order to replace the stock
popup.

There should be a way to merge with the stock popup, but we didn't do
that for 2.0. I think we had some idea that the new menu stuff in 2.4
would provide a sane way to do it.

(As a hack you could probably connect_after to popup_menu and
button_press_event and append to text_view->popup_menu, or something
like that... I guess you can't connect_after to event signals, would
have to use the "event_after" signal or whatever it's called.)

Havoc



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