touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #04392
[Bug 651479] Re: Implement row annotations for DeeModel
** Changed in: unity (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity in Ubuntu.
https://bugs.launchpad.net/bugs/651479
Title:
Implement row annotations for DeeModel
Status in Dee:
Fix Released
Status in Unity:
Fix Released
Status in “dee” package in Ubuntu:
Fix Released
Status in “unity” package in Ubuntu:
Fix Released
Bug description:
It's a common pattern that model consumers needs to map each
individual row to some internal data structure or value (fx. a
widget). Currently this can only be achieved by maintaining a map of
row iters to the data members which must then be kept in sync with the
model.
I propose we add a "Model Annotation API" ala:
-------------------------------
typedef guint DeeModelAnnotation;
/**
* dee_model_register_annotation:
* @destroy: Callback to free annotation set on the model with
* dee_model_set_annotation(). Called when the row is
* removed, the annotation is cleared, or the model is
* finalized.
*
* Create a new annotation.
*
* Returns: A new annotation key that can be used to get and
* set annotation values
*/
DeeModelAnnotation dee_model_register_annotation (GDestroyNotify destroy);
void dee_model_set_annotation (DeeModel *model,
DeeModelIter *row,
DeeModelAnnotation anno,
gpointer anno_value);
gpointer dee_model_get_annotation (DeeModel *model,
DeeModelIter *row,
DeeModelAnnotation anno);
void dee_model_clear_annotation (DeeModel *model,
DeeModelIter *row,
DeeModelAnnotation anno);
-------------------------------
To manage notifications about this bug go to:
https://bugs.launchpad.net/dee/+bug/651479/+subscriptions