Show
Ignore:
Timestamp:
08/30/10 04:52:35 (3 years ago)
Author:
Nedko Arnaudov <nedko@…>
Children:
c00c30ca2d9208f59ae77f3dbfff7344f8943baf
Parents:
fc0a6b14be0e874b439939795eef038d9ded08d8
git-committer:
Nedko Arnaudov <nedko@arnaudov.name> / 2010-08-30T04:52:35Z+0300
Message:

on project load adjust canvas positions of capture/playback clients

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • daemon/graph.c

    rfc0a6b1 r8f20db7  
    23992399} 
    24002400 
     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 */ 
     2403void 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 
    24012466#undef graph_ptr 
    24022467#define graph_ptr ((struct ladish_graph *)context)