running commands on stop

Marco Pesenti Gritti mpgritti at gmail.com
Sat Mar 8 21:35:57 EST 2008


On Sun, Mar 9, 2008 at 12:59 AM, Jerry Dunmire <jerry at dunmire.org> wrote:
> Is there a way to run commands when the Stop button on the ToolBar is
>  pressed? I am working on an activity that starts a co-process and I want
>  to terminate the co-process when the activity is stopped.
>
>  Since I am new to python and sugar, any advice on how to look this
>  information up would be welcome. I've been trying to look through the
>  source code in git and running pydoc, but I feel like there is a better way.

Connecting on the destroy signal on the gtk.Window (Activity subclass
it) should do what you want.

Marco



More information about the Devel mailing list