[hafqa] [hafqa] [Bug 1239] New: HPaned and VPaned set_position is broken

From: bugzilla-daemon at maemo.org bugzilla-daemon at maemo.org
Date: Mon Apr 23 21:35:56 EEST 2007
https://maemo.org/bugzilla/show_bug.cgi?id=1239

           Summary: HPaned and VPaned set_position is broken
           Product: haf
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gtk
        AssignedTo: tommi.komulainen at nokia.com
        ReportedBy: sean at cs.gmu.edu
         QAContact: hafqa at maemo.org


If you call set_position on an HPaned or VPaned before a certain time (defined below), either nothing 
happens, or a crazy value is used (often 10x the requested value +/- certain weird constants), even 
though get_position returns the value you actually tried to set.

The time before which set_position is invalid depends on the container in which the Paned has been 
placed!  If it's in a Window, for example, then set_position doesn't work until AFTER the first size 
allocation immediately after the first realization.  If it's in a Notebook, then it doesn't work until AFTER 
the first realization, and furthermore, no size allocations are provided sufficient to hook into, so we 
have to deal with it differently.

In either case, it's a significant bug: these times are *after* the event loop has been fired up, so there's 
no easy way to set the slider position during setup time.  Instead we must create a small state machine 
which hooks into events, waiting for the right event to come down the line, at which time we can set the 
window value appropriately.

The following code:
     http://cs.gmu.edu/~sean/stuff/n800/toolkit/toolkit.py

... works around this in its 'Split' class, including the little state machine.

-- 
Configure bugmail: https://maemo.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the hafqa mailing list