Opened 10 years ago
Closed 10 years ago
#4611 closed defect (fixed)
Web activities should be aware of the session
Reported by: | manuq | Owned by: | manuq |
---|---|---|---|
Priority: | Urgent | Milestone: | Unspecified |
Component: | Sugar | Version: | Unspecified |
Severity: | Unspecified | Keywords: | |
Cc: | Distribution/OS: | Unspecified | |
Bug Status: | New |
Description
and stop cleanly in reboot, shutdown, logout.
TestCase:
- start sugar
- start Gears web activity
- make changes
- logout sugar (without manually closing Gears before)
- restart sugar
- restart the previous instance of the Gears web activity
Expected: last changes in Gears instance should be there.
Discussion started at: https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/29
WIP patch: https://github.com/manuq/sugar-1/commit/a1e96c8661b103ec90b8afb4658aadc207667e7a
Change History (3)
comment:1 Changed 10 years ago by manuq
- Bug Status changed from Unconfirmed to New
comment:2 Changed 10 years ago by manuq
comment:3 Changed 10 years ago by Manuel Quiñones
- Resolution set to fixed
- Status changed from new to closed
SessionManager: make it work with web activities
Fixes #4611 .
SessionManager now sends a shutdown signal in each logout, shutdown or
reboot. Apisocket connects to this signal and sends the stop message
to web activities, so they can do cleanup and store.
SessionManager now uses the ShellModel to check if all activities have
been removed. If not, it tries again after one second for ten times.
After that, it forces shutdown.
SessionManager has been moved completly to the shell. It was
inheriting a counterpart class in the toolkit, but was the only
consumer of that class.
Journal is a special case. It will not be destroyed automatically
like other activities. So we connect it to the SessionManager
shutdown signal too, and destroy it in the callback.
Changeset: 69961112e9dbdb79cbae06deb3d876dde74d33bc
https://github.com/sugarlabs/sugar/pull/90