proxy: remove unneeded destroy signal

This commit is contained in:
Julian Bouzas
2019-06-26 12:48:09 -04:00
parent 3207811795
commit e73553088b
5 changed files with 6 additions and 14 deletions

View File

@@ -60,7 +60,8 @@ wp_core_dispose (GObject * obj)
/* Remove and emit the removed signal for all globals */ /* Remove and emit the removed signal for all globals */
while (global_objects->len > 0) { while (global_objects->len > 0) {
global = g_ptr_array_steal_index_fast (global_objects, 0); global = g_ptr_array_steal_index_fast (global_objects,
global_objects->len - 1);
g_signal_emit (self, signals[SIGNAL_GLOBAL_REMOVED], global->key, g_signal_emit (self, signals[SIGNAL_GLOBAL_REMOVED], global->key,
global->key, global->object); global->key, global->object);
free_global_object (global); free_global_object (global);

View File

@@ -34,7 +34,6 @@ enum {
enum enum
{ {
SIGNAL_DESTROYED,
SIGNAL_DONE, SIGNAL_DONE,
LAST_SIGNAL, LAST_SIGNAL,
}; };
@@ -54,9 +53,6 @@ proxy_event_destroy (void *data)
/* Set the proxy to NULL */ /* Set the proxy to NULL */
self->proxy = NULL; self->proxy = NULL;
/* Emit the destroy signal */
g_signal_emit (data, wp_proxy_signals[SIGNAL_DESTROYED], 0);
} }
static void static void
@@ -198,10 +194,6 @@ wp_proxy_class_init (WpProxyClass * klass)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
/* Signals */ /* Signals */
wp_proxy_signals[SIGNAL_DESTROYED] =
g_signal_new ("destroyed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (WpProxyClass, destroyed), NULL, NULL, NULL, G_TYPE_NONE,
0);
wp_proxy_signals[SIGNAL_DONE] = wp_proxy_signals[SIGNAL_DONE] =
g_signal_new ("done", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, g_signal_new ("done", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (WpProxyClass, done), NULL, NULL, NULL, G_TYPE_NONE, 0); G_STRUCT_OFFSET (WpProxyClass, done), NULL, NULL, NULL, G_TYPE_NONE, 0);

View File

@@ -24,7 +24,6 @@ struct _WpProxyClass
GObjectClass parent_class; GObjectClass parent_class;
/* Signals */ /* Signals */
void (*destroyed)(WpProxy *wp_proxy, gpointer data);
void (*done)(WpProxy *wp_proxy, gpointer data); void (*done)(WpProxy *wp_proxy, gpointer data);
}; };

View File

@@ -105,9 +105,9 @@ on_global_removed (WpRemotePipewire *rp, guint id, gpointer d)
if (!endpoint) if (!endpoint)
return; return;
/* Remove the endpoint from the table and unregister it */ /* Unregister the endpoint and remove it from the table */
g_hash_table_remove (data->registered_endpoints, GUINT_TO_POINTER(id));
wp_endpoint_unregister (endpoint); wp_endpoint_unregister (endpoint);
g_hash_table_remove (data->registered_endpoints, GUINT_TO_POINTER(id));
} }
static void static void

View File

@@ -92,9 +92,9 @@ on_global_removed (WpRemotePipewire *rp, guint id, gpointer d)
if (!endpoint) if (!endpoint)
return; return;
/* Remove the endpoint from the table and unregister it */ /* Unregister the endpoint and remove it from the table */
g_hash_table_remove (impl->registered_endpoints, GUINT_TO_POINTER(id));
wp_endpoint_unregister (endpoint); wp_endpoint_unregister (endpoint);
g_hash_table_remove (impl->registered_endpoints, GUINT_TO_POINTER(id));
} }
static void static void