[Bugs] #4253 sugar HIGH: Palette trackpad interaction: they don't close after clicking items
Sugar Labs Bugs
bugtracker-noreply at sugarlabs.org
Thu Dec 6 18:09:41 EST 2012
#4253: Palette trackpad interaction: they don't close after clicking items
----------------------------+-----------------------------------------------
Reporter: greenfeld | Owner: manuq
Type: defect | Status: assigned
Priority: High | Milestone: 0.98
Component: sugar | Version: 0.97.x
Severity: Unspecified | Keywords: regression, r?
Distribution: OLPC | Status_field: Unconfirmed
----------------------------+-----------------------------------------------
Comment(by manuq):
Trying a more general solution: we could connect a callback for the item
'activate' signal in the palette, and call popdown from it. Unfortunatly
this needs some API change, so I think we are safer calling the popdown
explicitly (first patch).
Anyways, leaving a note here of what I've tried.
My first attempt: Palette.set_content() is always receiving a widget that
is a Gtk.Container, like Gtk.VBox. So first I tried to connect the
palette to the 'add' signal [1], so that each time an item is added, we
connect its 'activate' signal to the palette. But turns out the callback
is not called for pack_start/pack_end, only for add. So, there isn't a
signal we can listen for when a widget is packed. Testcase: [2].
[1] http://developer.gnome.org/gtk3/stable/GtkContainer.html#GtkContainer-
add
[2] http://dev.laptop.org/~manuq/shell-port/test_add.py
So I did a fix only for when the palette content is a PaletteMenuBox, and
the PaletteMenuItems are added to it using the append_item() method. This
requires API change. The two patches above shows this work for the Buddy
palette.
--
Ticket URL: <http://bugs.sugarlabs.org/ticket/4253#comment:12>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list