[maemo-developers] Howto revert a gtk_widget_tap_and_hold_setup

From: Sergio Villar Senin svillar at igalia.com
Date: Wed Apr 18 10:00:09 EEST 2007
Kalle Vahlman wrote:
> 2007/4/17, Sergio Villar Senin <svillar at igalia.com>:
>> Hi,
>> is there any way to revert a gtk_widget_tap_and_hold_setup? I mean I
>> have a widget that shows a popup as response to a tap and hold event. I
>> want to change the contents of that popup menu in execution time. So I
>> want to "unregister" the old one and setup a new one.
> If possible, I'd suggest carrying the existing menu pointer to the
> code that wants to change it and operate on that (it's just a
> container after all, adding/removing items is possible).

Yeah, that was my second choice :-). But I wanted to know also, why gtk+
is not working as expected, because the tap_and_hold_setup method to
attach the menu to the widget:

> Furthermore, if the contents are not totally dynamic, a more
> convenient solution might be using UI Manager[1] to change the menu.
> It takes a bit more effort to set up than just adding menuitems to a
> menu, but once the initial work is done it is very flexible and
> simplifies code a lot.
> [1] http://live.gnome.org/GnomeLove/UIManagerTutorial

Actually I use the ui manager a lot :), but the contents are in fact,
totally dynamic.


More information about the maemo-developers mailing list