write_file() called when changing Activity name

Tomeu Vizoso tomeu at tomeuvizoso.net
Thu Apr 17 12:49:25 EDT 2008


On Thu, Apr 17, 2008 at 6:27 PM, Urko Fernandez <tturktime at gmail.com> wrote:
> Is there a way to know whether the write_file() method is called while
>  changing the name of the activity or when closing the activity?
>  I want to delete a file created in the instance folder after closing the
>  activity. I know files in the instance folder are to be deleted
>  automatically, but on sugar-jhbuild they stay (in QEMU the file is
>  deleted when placed in $SUGAR_ACTIVITY_ROOT/instance/ correctly)

You may add a callback that will be executed just before the activity
window will be closed:
http://www.pygtk.org/pygtk2reference/class-gtkwidget.html#signal-gtkwidget--delete-event

Hope that helps,

Tomeu



More information about the Devel mailing list