| | 2401 | /* Trick the world that graph objects disappear and the reapper so the new dict values are fetched */ |
| | 2402 | /* This is a nasty hack and should be removed once dict object can emit signals */ |
| | 2403 | void ladish_graph_trick_dicts(ladish_graph_handle graph_handle) |
| | 2404 | { |
| | 2405 | struct list_head * node_ptr; |
| | 2406 | struct ladish_graph_connection * connection_ptr; |
| | 2407 | struct ladish_graph_client * client_ptr; |
| | 2408 | struct ladish_graph_port * port_ptr; |
| | 2409 | |
| | 2410 | list_for_each(node_ptr, &graph_ptr->connections) |
| | 2411 | { |
| | 2412 | connection_ptr = list_entry(node_ptr, struct ladish_graph_connection, siblings); |
| | 2413 | if (!connection_ptr->hidden) |
| | 2414 | { |
| | 2415 | graph_ptr->graph_version++; |
| | 2416 | ladish_graph_emit_ports_disconnected(graph_ptr, connection_ptr); |
| | 2417 | } |
| | 2418 | } |
| | 2419 | |
| | 2420 | list_for_each(node_ptr, &graph_ptr->ports) |
| | 2421 | { |
| | 2422 | port_ptr = list_entry(node_ptr, struct ladish_graph_port, siblings_graph); |
| | 2423 | |
| | 2424 | if (!port_ptr->hidden) |
| | 2425 | { |
| | 2426 | graph_ptr->graph_version++; |
| | 2427 | ladish_graph_emit_port_disappeared(graph_ptr, port_ptr); |
| | 2428 | } |
| | 2429 | } |
| | 2430 | |
| | 2431 | list_for_each(node_ptr, &graph_ptr->clients) |
| | 2432 | { |
| | 2433 | client_ptr = list_entry(node_ptr, struct ladish_graph_client, siblings); |
| | 2434 | |
| | 2435 | if (!client_ptr->hidden) |
| | 2436 | { |
| | 2437 | graph_ptr->graph_version++; |
| | 2438 | ladish_graph_emit_client_disappeared(graph_ptr, client_ptr); |
| | 2439 | graph_ptr->graph_version++; |
| | 2440 | ladish_graph_emit_client_appeared(graph_ptr, client_ptr); |
| | 2441 | } |
| | 2442 | } |
| | 2443 | |
| | 2444 | list_for_each(node_ptr, &graph_ptr->ports) |
| | 2445 | { |
| | 2446 | port_ptr = list_entry(node_ptr, struct ladish_graph_port, siblings_graph); |
| | 2447 | |
| | 2448 | if (!port_ptr->hidden) |
| | 2449 | { |
| | 2450 | graph_ptr->graph_version++; |
| | 2451 | ladish_graph_emit_port_appeared(graph_ptr, port_ptr); |
| | 2452 | } |
| | 2453 | } |
| | 2454 | |
| | 2455 | list_for_each(node_ptr, &graph_ptr->connections) |
| | 2456 | { |
| | 2457 | connection_ptr = list_entry(node_ptr, struct ladish_graph_connection, siblings); |
| | 2458 | if (!connection_ptr->hidden) |
| | 2459 | { |
| | 2460 | graph_ptr->graph_version++; |
| | 2461 | ladish_graph_emit_ports_connected(graph_ptr, connection_ptr); |
| | 2462 | } |
| | 2463 | } |
| | 2464 | } |
| | 2465 | |