Show
Ignore:
Timestamp:
12/12/09 15:12:46 (3 years ago)
Author:
Nedko Arnaudov <nedko@…>
Children:
a10355eb4eeb8a9c94eab9e877fd976ea4b3a468
Parents:
6680478859a88f45843cf78407e747428974001d
git-committer:
Nedko Arnaudov <nedko@arnaudov.name> / 2009-12-12T15:12:46Z+0200
Message:

daemon: show client when adding non-hidden port

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • daemon/graph.c

    r6680478 r9c01b37  
    736736} 
    737737 
     738void ladish_graph_show_port_internal(struct ladish_graph * graph_ptr, struct ladish_graph_port * port_ptr) 
     739{ 
     740  if (port_ptr->client_ptr->hidden) 
     741  { 
     742    port_ptr->client_ptr->hidden = false; 
     743    graph_ptr->graph_version++; 
     744    if (graph_ptr->opath != NULL) 
     745    { 
     746      dbus_signal_emit( 
     747        g_dbus_connection, 
     748        graph_ptr->opath, 
     749        JACKDBUS_IFACE_PATCHBAY, 
     750        "ClientAppeared", 
     751        "tts", 
     752        &graph_ptr->graph_version, 
     753        &port_ptr->client_ptr->id, 
     754        &port_ptr->client_ptr->name); 
     755    } 
     756  } 
     757 
     758  ASSERT(port_ptr->hidden); 
     759  port_ptr->hidden = false; 
     760  graph_ptr->graph_version++; 
     761  if (graph_ptr->opath != NULL) 
     762  { 
     763    dbus_signal_emit( 
     764      g_dbus_connection, 
     765      graph_ptr->opath, 
     766      JACKDBUS_IFACE_PATCHBAY, 
     767      "PortAppeared", 
     768      "ttstsuu", 
     769      &graph_ptr->graph_version, 
     770      &port_ptr->client_ptr->id, 
     771      &port_ptr->client_ptr->name, 
     772      &port_ptr->id, 
     773      &port_ptr->name, 
     774      &port_ptr->flags, 
     775      &port_ptr->type); 
     776 
     777    ladish_try_connect_hidden_connections((ladish_graph_handle)graph_ptr); 
     778  } 
     779} 
     780 
    738781void ladish_graph_hide_port_internal(struct ladish_graph * graph_ptr, struct ladish_graph_port * port_ptr) 
    739782{ 
     
    10111054  //log_info("port '%s' is %s", port_ptr->name, port_ptr->hidden ? "invisible" : "visible"); 
    10121055 
    1013   if (port_ptr->client_ptr->hidden) 
    1014   { 
    1015     port_ptr->client_ptr->hidden = false; 
    1016     graph_ptr->graph_version++; 
    1017     if (graph_ptr->opath != NULL) 
    1018     { 
    1019       dbus_signal_emit( 
    1020         g_dbus_connection, 
    1021         graph_ptr->opath, 
    1022         JACKDBUS_IFACE_PATCHBAY, 
    1023         "ClientAppeared", 
    1024         "tts", 
    1025         &graph_ptr->graph_version, 
    1026         &port_ptr->client_ptr->id, 
    1027         &port_ptr->client_ptr->name); 
    1028     } 
    1029   } 
    1030  
    1031   ASSERT(port_ptr->hidden); 
    1032   port_ptr->hidden = false; 
    1033   graph_ptr->graph_version++; 
    1034   if (graph_ptr->opath != NULL) 
    1035   { 
    1036     dbus_signal_emit( 
    1037       g_dbus_connection, 
    1038       graph_ptr->opath, 
    1039       JACKDBUS_IFACE_PATCHBAY, 
    1040       "PortAppeared", 
    1041       "ttstsuu", 
    1042       &graph_ptr->graph_version, 
    1043       &port_ptr->client_ptr->id, 
    1044       &port_ptr->client_ptr->name, 
    1045       &port_ptr->id, 
    1046       &port_ptr->name, 
    1047       &port_ptr->flags, 
    1048       &port_ptr->type); 
    1049  
    1050     ladish_try_connect_hidden_connections(graph_handle); 
    1051   } 
     1056  ladish_graph_show_port_internal(graph_ptr, port_ptr); 
    10521057} 
    10531058 
     
    12511256  port_ptr->id = graph_ptr->next_port_id++; 
    12521257  port_ptr->port = port_handle; 
    1253   port_ptr->hidden = hidden; 
    1254   graph_ptr->graph_version++; 
     1258  port_ptr->hidden = true; 
    12551259 
    12561260  port_ptr->client_ptr = client_ptr; 
     
    12581262  list_add_tail(&port_ptr->siblings_graph, &graph_ptr->ports); 
    12591263 
    1260   if (!hidden && graph_ptr->opath != NULL) 
    1261   { 
    1262     dbus_signal_emit( 
    1263       g_dbus_connection, 
    1264       graph_ptr->opath, 
    1265       JACKDBUS_IFACE_PATCHBAY, 
    1266       "PortAppeared", 
    1267       "ttstsuu", 
    1268       &graph_ptr->graph_version, 
    1269       &client_ptr->id, 
    1270       &client_ptr->name, 
    1271       &port_ptr->id, 
    1272       &port_ptr->name, 
    1273       &flags, 
    1274       &type); 
     1264  if (!hidden) 
     1265  { 
     1266    ladish_graph_show_port_internal(graph_ptr, port_ptr); 
    12751267  } 
    12761268