Compare:

http://laguna.fmedic.unam.mx/~daniel/pygtutorial/pygtutorial/getting-started.html

which creates a top-level window and

http://wiki.laptop.org/go/PyGTK/Hello_World_Tutorial

as a sugar activity.

The first has the line:

window = GtkWindow(WINDOW_TOPLEVEL) # create a top level window

while the latter has:

                # Create the main container
                self._main_view = gtk.VBox()

Sugar has already created the top-level window with an empty VBox, so 
the activity only needs to pack that VBox with widgets.

Essentially to eliminate the grey circle, you need to modify the 
initialization code (with the two tutorials as a guide).

Tony



Chris Marshall wrote:
> Two specific questions come to mind:
> 
> (1) How does Sugar know that a new top level
>     window has been instantiated?  Is there a
>     hook from the X server or what?
> 
> (2) What sort of cleanup is needed to make
>     the anonymous gray circle go away?  Do
>     you have to notify Sugar or what?
> 
> I'm trying to implement some code that uses
> OpenGL via the Mesa library on the XO.  As
> the code re-generates display graphics, the
> gray circles keep accumulating.  I would
> like to keep the number of circles equal
> to the number of actual top level windows
> and not the total number used across the
> session.
> 
> Thanks,
> Chris
> 
> Tony Anderson wrote:
>> I believe that these circles result from the activity initiating a new 
>> top-level window. Sugar provides an activity with a window. It is 
>> expected that the activity will pack it's widgets into a vbox in that 
>> window. Imported activities naturally create a top-level window.
>>
>> Tony
>>
>>
>> Message: 3
>> Date: Tue, 30 Dec 2008 21:37:47 -0500
>> From: Chris Marshall <jns-cmarsh...@comcast.net>
>> Subject: Re: anonymous gray activity circles
>> To: g...@laptop.org
>> Cc: OLPC Development <devel@lists.laptop.org>
>> Message-ID: <495adafb.40...@comcast.net>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>
>> Greg Smith wrote:
>>  > > Hi Chris,
>>  > >
>>  > > Unless someone else has seen this, I think we need more detail on 
>> how to
>>  > > reproduce it.
>>
>> os767 and Firefox-6 activity
>> start firefox
>> click on a file link to download
>> exit firefox after
>> left a gray circle
>>
>> (Actually, it almost always leaves behind one
>> or more circles but I have not done exhaustive
>> testing to determine how many or under what
>> conditions.  It would be easier to start from
>> an understanding of how the circle gets there
>> to begin with (what is being used to trigger
>> the circle's appearance)...
>>
>> --Chris
>>
>>  > > Can you write down the steps it takes to get a "gray activity 
>> circle"?
>>  > > Include the version of XO software you are running:
>>  > > http://wiki.laptop.org/go/What_release_am_I_running%3F
>>  > >
>>  > > It may be that you are double clicking to start an activity. That 
>> can
>>  > > cause a second activity instance to try and start then fail and 
>> leave an
>>  > > icon in the frame. That's the only thing that comes to mind 
>> without more
>>  > > detail.
>>  > >
>>  > > Thanks,
>>  > >
>>  > > Greg S
>>  > >
>>  > > *********************
>>  > >
>>  > > From: jns-cmarsh...@comcast.net
>>  > > Subject: anonymous gray activity circles
>>  > > To: devel@lists.laptop.org
>>  > >
>>  > > Is there a way to prevent the
>>  > > anonymous gray activity circles
>>  > > in the frame?  Some X apps
>>  > > seem to accumulate circles with
>>  > > no way i have been able to
>>  > > determine to remove "dead" ones.
>>  > > I tried to google the list but was
>>  > > not able to generate useful links.
>>  > >
>>  > > --Chris
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 
>> 270.10.1/1870 - Release Date: 12/31/2008 8:44 AM
>>
> 
> 
> .
> 


_______________________________________________
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel

Reply via email to