[Bugs] #4128 sugar URGE: Journal entry activity icon: implement long-press behavior

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Thu Nov 1 14:27:26 EDT 2012


#4128: Journal entry activity icon: implement long-press behavior
-------------------------+--------------------------------------------------
    Reporter:  erikos    |          Owner:  erikos  
        Type:  defect    |         Status:  new     
    Priority:  Urgent    |      Milestone:  0.98    
   Component:  sugar     |        Version:  0.97.x  
    Severity:  Critical  |       Keywords:          
Distribution:  OLPC      |   Status_field:  Assigned
-------------------------+--------------------------------------------------

Comment(by erikos):

 Attached is a first patch. There are some edge cases I am not sure about
 yet. Here is my current analysis:

     This one is tricky because where the CellRendererInvoker is
     used (Home View activity list and Journal list view) we do
     use Palettes based on a GtkMenu. In the Journal list view
     this Palette has submenus so it can not be easily replaced
     with our custom Palette. That is why I am trying to make this
     case work with a GtkMenu.

     When the Palette does pop up it grabs the focus. This means that
     the invoker does not see a TOUCH_END event. Same is the longpress
     controller that is why we have to reset the controller when
     the long-press is detected, otherwise it is not usable a second
     time.

     The default behavior of a GtkMenu is that it does pop down
     on a long press/release event. So when doing a long press
     on the icon the Palette was popping down directly. We can
     stop this by listening on the button-release event in the
     Menu and return True when the event happens in the invoker
     coordinates.

     Finally there are several issues with motion events: in the
     invoker we listen to motion events on the treeview in order to
     be able to popup/popdown the Palette on hovering over the
     icon. This event is triggered as well when the icon is
     tapped. I am not sure this is expected behavior and if it is
     correct by design how to prevent it.

     The second case where the motion events are triggered is
     when you tap somewhere in the Palette when it is up. For
     example you want to get to one of the submenues. Since the
     Palette tracks motion events to work for the hover case [2]
     we do get a leave event when the Palette is tapped and the
     Palette does pop down. Same here, do we know when the motion
     event is coming from a mouse or not? How could this be
     prevented? Should I track if a Palette is raised by a mouse
     click or a touch event and only do the motion tracking when
     the mouse is in use?

     [1] http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-
 gtk3/blobs/master
     [2] http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-
 gtk3/blobs/master

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/4128#comment:1>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list