Required a way to know when a object is destroyed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Nux |
Fix Released
|
Medium
|
Loïc Molinari | ||
Unity |
Fix Released
|
Undecided
|
Unassigned | ||
nux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
unity (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The AtkObject provides the accessibility support for the graphical toolkit objects, working as a kind of a proxy. The AtkObject normally maintain a reference of this toolkit object, and can survive this toolkit object (ie: the atk-bridge can maintain a reference to the atk object, and meanwhile, the toolkit object being destroyed).
nux::Object implements nux::Trackable, with methods related to the reference count, included a method (Dispose) to destroy an object. But id doesn't notify in any way that the object was destroyed.
This notification is required in order to update the reference on the AtkObject (so avoid to use a destroyed object, that usually is not safe), and to also update the state of the object to ATK_STATE_DEFUNCT [1]
I briefly talked with Jay Taoko about it. Ideally this signal should be emitted by Object or by Trackable, but sigc++ is started to be used on Area (and for Unity sake, LauncherIcon is not an Area), so the options are:
* Move sigc++ to be used on Object or Trackable, and add the signal there
* Add the signal on Area, and then ensure that any object on unity is at least a Area
[1] http://
Related branches
- Jay Taoko (community): Approve
-
Diff: 226 lines (+36/-16)10 files modifiedNux/Area.cpp (+0/-1)
Nux/Area.h (+1/-7)
Nux/InputArea.h (+1/-1)
Nux/RadioButtonGroup.h (+1/-1)
Nux/View.h (+1/-1)
NuxCore/Object.cpp (+1/-1)
NuxCore/Object.h (+7/-1)
NuxCore/nux-core.pc.in (+1/-1)
configure.ac (+4/-1)
tests/test-object.cpp (+19/-1)
- Jay Taoko (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedsrc/LauncherIcon.h (+1/-1)
Changed in nux: | |
status: | New → In Progress |
assignee: | nobody → Jay Taoko (jaytaoko) |
Changed in nux: | |
assignee: | Jay Taoko (jaytaoko) → Loïc Molinari (loic.molinari) |
importance: | Undecided → Medium |
Changed in unity: | |
status: | New → Fix Committed |
Changed in nux (Ubuntu): | |
status: | New → Fix Committed |
Changed in nux: | |
status: | Fix Committed → Fix Released |
Changed in nux (Ubuntu): | |
status: | Fix Committed → Fix Released |
Changed in unity: | |
status: | Fix Committed → Fix Released |
Changed in unity (Ubuntu): | |
status: | New → Fix Released |
The signal has been added Area.h:
sigc: :signal< void, Area*> OnDelete; //!< Signal emitted when an area is destroyed.
The signal is emitted in Area::~Area when and object is destroy.
Area inherits directly from sigc++. Eventually, we will make Object inherit from sigc++ so more objects can benefit.