network: keep the device/connections model up to date with reality

Remove the ID parameter from the model, and move it to the NetDevice object.
Remove the devices GPtrArray and use the mode for everything.
Connect up the changed and deleted signals from NetObject and DTRT in the UI.
This commit is contained in:
Richard Hughes 2011-03-16 17:27:24 +00:00
parent cb031cf06c
commit 01c6b793ed
5 changed files with 257 additions and 200 deletions

View file

@ -47,14 +47,19 @@ struct _NetObjectClass
{
GObjectClass parent_class;
void (* changed) (NetObject *object);
void (* removed) (NetObject *object);
};
GType net_object_get_type (void);
NetObject *net_object_new (void);
const gchar *net_object_get_id (NetObject *object);
void net_object_set_id (NetObject *object,
const gchar *id);
const gchar *net_object_get_title (NetObject *object);
void net_object_set_title (NetObject *object,
const gchar *title);
void net_object_emit_changed (NetObject *object);
void net_object_emit_removed (NetObject *object);
G_END_DECLS