idnode: added saving on update of properties

This needs some serious tidying up
This commit is contained in:
Adam Sutton 2013-06-11 13:53:48 +01:00
parent ff35e6efab
commit c5e6bf6517
2 changed files with 4 additions and 2 deletions

View file

@ -361,13 +361,15 @@ idnode_save ( idnode_t *self, htsmsg_t *c )
* Load * Load
*/ */
void void
idnode_load ( idnode_t *self, htsmsg_t *c ) idnode_load ( idnode_t *self, htsmsg_t *c, int dosave )
{ {
const idclass_t *idc = self->in_class; const idclass_t *idc = self->in_class;
while (idc) { while (idc) {
prop_write_values(self, idc->ic_properties, c); prop_write_values(self, idc->ic_properties, c);
idc = idc->ic_super; idc = idc->ic_super;
} }
if (dosave)
idnode_updated(self);
} }
static const property_t * static const property_t *

View file

@ -98,7 +98,7 @@ void idnode_update_all_props(idnode_t *in,
void idnode_notify_title_changed(void *obj); void idnode_notify_title_changed(void *obj);
void idnode_save ( idnode_t *self, htsmsg_t *m ); void idnode_save ( idnode_t *self, htsmsg_t *m );
void idnode_load ( idnode_t *self, htsmsg_t *m ); void idnode_load ( idnode_t *self, htsmsg_t *m, int dosave );
const char *idnode_get_str ( idnode_t *self, const char *key ); const char *idnode_get_str ( idnode_t *self, const char *key );
int idnode_get_u32(idnode_t *self, const char *key, uint32_t *u32); int idnode_get_u32(idnode_t *self, const char *key, uint32_t *u32);