diff --git a/common/luaclass.c b/common/luaclass.c index 65a8a769..3eba715a 100644 --- a/common/luaclass.c +++ b/common/luaclass.c @@ -259,7 +259,7 @@ luaA_class_connect_signal_from_stack(lua_State *L, lua_class_t *lua_class, const char *name, int ud) { luaA_checkfunction(L, ud); - signal_add(&lua_class->signals, name, luaA_object_ref(L, ud)); + signal_connect(&lua_class->signals, name, luaA_object_ref(L, ud)); } void @@ -268,7 +268,7 @@ luaA_class_disconnect_signal_from_stack(lua_State *L, lua_class_t *lua_class, { luaA_checkfunction(L, ud); void *ref = (void *) lua_topointer(L, ud); - signal_remove(&lua_class->signals, name, ref); + signal_disconnect(&lua_class->signals, name, ref); luaA_object_unref(L, (void *) ref); lua_remove(L, ud); } diff --git a/common/luaobject.c b/common/luaobject.c index bcb7b83d..8a8c240b 100644 --- a/common/luaobject.c +++ b/common/luaobject.c @@ -176,7 +176,7 @@ luaA_object_connect_signal_from_stack(lua_State *L, int oud, { luaA_checkfunction(L, ud); lua_object_t *obj = lua_touserdata(L, oud); - signal_add(&obj->signals, name, luaA_object_ref_item(L, oud, ud)); + signal_connect(&obj->signals, name, luaA_object_ref_item(L, oud, ud)); } /** Remove a signal to an object. @@ -192,7 +192,7 @@ luaA_object_disconnect_signal_from_stack(lua_State *L, int oud, luaA_checkfunction(L, ud); lua_object_t *obj = lua_touserdata(L, oud); void *ref = (void *) lua_topointer(L, ud); - signal_remove(&obj->signals, name, ref); + signal_disconnect(&obj->signals, name, ref); luaA_object_unref_item(L, oud, ref); lua_remove(L, ud); } diff --git a/common/signal.h b/common/signal.h index 56e5faaa..1a17ef61 100644 --- a/common/signal.h +++ b/common/signal.h @@ -62,7 +62,7 @@ signal_array_getbyid(signal_array_t *arr, unsigned long id) * \param ref The reference to add. */ static inline void -signal_add(signal_array_t *arr, const char *name, const void *ref) +signal_connect(signal_array_t *arr, const char *name, const void *ref) { unsigned long tok = a_strhash((const unsigned char *) name); signal_t *sigfound = signal_array_getbyid(arr, tok); @@ -83,7 +83,7 @@ signal_add(signal_array_t *arr, const char *name, const void *ref) * \param ref The reference to remove. */ static inline void -signal_remove(signal_array_t *arr, const char *name, const void *ref) +signal_disconnect(signal_array_t *arr, const char *name, const void *ref) { signal_t *sigfound = signal_array_getbyid(arr, a_strhash((const unsigned char *) name)); diff --git a/dbus.c b/dbus.c index 5f735e9a..7e550073 100644 --- a/dbus.c +++ b/dbus.c @@ -763,7 +763,7 @@ luaA_dbus_connect_signal(lua_State *L) if(sig) luaA_warn(L, "cannot add signal %s on D-Bus, already existing", name); else - signal_add(&dbus_signals, name, luaA_object_ref(L, 2)); + signal_connect(&dbus_signals, name, luaA_object_ref(L, 2)); return 0; } @@ -780,7 +780,7 @@ luaA_dbus_disconnect_signal(lua_State *L) const char *name = luaL_checkstring(L, 1); luaA_checkfunction(L, 2); const void *func = lua_topointer(L, 2); - signal_remove(&dbus_signals, name, func); + signal_disconnect(&dbus_signals, name, func); luaA_object_unref(L, (void *) func); return 0; } diff --git a/luaa.c b/luaa.c index bae90ce8..770888d9 100644 --- a/luaa.c +++ b/luaa.c @@ -618,7 +618,7 @@ luaA_awesome_connect_signal(lua_State *L) { const char *name = luaL_checkstring(L, 1); luaA_checkfunction(L, 2); - signal_add(&global_signals, name, luaA_object_ref(L, 2)); + signal_connect(&global_signals, name, luaA_object_ref(L, 2)); return 0; } @@ -635,7 +635,7 @@ luaA_awesome_disconnect_signal(lua_State *L) const char *name = luaL_checkstring(L, 1); luaA_checkfunction(L, 2); const void *func = lua_topointer(L, 2); - signal_remove(&global_signals, name, func); + signal_disconnect(&global_signals, name, func); luaA_object_unref(L, (void *) func); return 0; } diff --git a/screen.c b/screen.c index 1b025791..38e0cf0e 100644 --- a/screen.c +++ b/screen.c @@ -543,7 +543,7 @@ luaA_screen_connect_signal(lua_State *L) screen_t *s = lua_touserdata(L, 1); const char *name = luaL_checkstring(L, 2); luaA_checkfunction(L, 3); - signal_add(&s->signals, name, luaA_object_ref(L, 3)); + signal_connect(&s->signals, name, luaA_object_ref(L, 3)); return 0; } @@ -562,7 +562,7 @@ luaA_screen_disconnect_signal(lua_State *L) const char *name = luaL_checkstring(L, 2); luaA_checkfunction(L, 3); const void *ref = lua_topointer(L, 3); - signal_remove(&s->signals, name, ref); + signal_disconnect(&s->signals, name, ref); luaA_object_unref(L, (void *) ref); return 0; }