Set the parent field (model_entry_remove_child): Reset the parent field
2002-01-27 Bradford Hovinen <hovinen@ximian.com> * model-entry.c (model_entry_insert_child): Set the parent field (model_entry_remove_child): Reset the parent field (model_entry_remove_child): Set up the path before removing the entry from the list
This commit is contained in:
parent
6a3797bfc5
commit
ee69787f7d
2 changed files with 12 additions and 2 deletions
|
@ -1,5 +1,10 @@
|
||||||
2002-01-27 Bradford Hovinen <hovinen@ximian.com>
|
2002-01-27 Bradford Hovinen <hovinen@ximian.com>
|
||||||
|
|
||||||
|
* model-entry.c (model_entry_insert_child): Set the parent field
|
||||||
|
(model_entry_remove_child): Reset the parent field
|
||||||
|
(model_entry_remove_child): Set up the path before removing the
|
||||||
|
entry from the list
|
||||||
|
|
||||||
* service-info.c (load_all_services): Accept model
|
* service-info.c (load_all_services): Accept model
|
||||||
(get_services_category_entry): Accept model
|
(get_services_category_entry): Accept model
|
||||||
(service_info_new): Accept model
|
(service_info_new): Accept model
|
||||||
|
|
|
@ -113,6 +113,8 @@ model_entry_insert_child (ModelEntry *entry, ModelEntry *child, GtkTreeModel *mo
|
||||||
tmp->next = child;
|
tmp->next = child;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
child->parent = entry;
|
||||||
|
|
||||||
mime_types_model_construct_iter (MIME_TYPES_MODEL (model), child, &iter);
|
mime_types_model_construct_iter (MIME_TYPES_MODEL (model), child, &iter);
|
||||||
path = gtk_tree_model_get_path (model, &iter);
|
path = gtk_tree_model_get_path (model, &iter);
|
||||||
gtk_tree_model_row_inserted (model, path, &iter);
|
gtk_tree_model_row_inserted (model, path, &iter);
|
||||||
|
@ -133,6 +135,9 @@ model_entry_remove_child (ModelEntry *entry, ModelEntry *child, GtkTreeModel *mo
|
||||||
g_return_if_fail (model != NULL);
|
g_return_if_fail (model != NULL);
|
||||||
g_return_if_fail (IS_MIME_TYPES_MODEL (model));
|
g_return_if_fail (IS_MIME_TYPES_MODEL (model));
|
||||||
|
|
||||||
|
mime_types_model_construct_iter (MIME_TYPES_MODEL (model), child, &iter);
|
||||||
|
path = gtk_tree_model_get_path (model, &iter);
|
||||||
|
|
||||||
if (entry->first_child == NULL) {
|
if (entry->first_child == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -143,8 +148,8 @@ model_entry_remove_child (ModelEntry *entry, ModelEntry *child, GtkTreeModel *mo
|
||||||
tmp->next = child->next;
|
tmp->next = child->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
mime_types_model_construct_iter (MIME_TYPES_MODEL (model), child, &iter);
|
child->parent = NULL;
|
||||||
path = gtk_tree_model_get_path (model, &iter);
|
|
||||||
gtk_tree_model_row_deleted (model, path);
|
gtk_tree_model_row_deleted (model, path);
|
||||||
gtk_tree_path_free (path);
|
gtk_tree_path_free (path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue