C: Remove unneeded calls to signal_add()
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
a964396771
commit
231436d9e3
|
@ -254,8 +254,6 @@ luaA_class_setup(lua_State *L, lua_class_t *class,
|
|||
class->index_miss_handler = LUA_REFNIL;
|
||||
class->newindex_miss_handler = LUA_REFNIL;
|
||||
|
||||
signal_add(&class->signals, "new");
|
||||
|
||||
lua_class_array_append(&luaA_classes, class);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,11 +54,6 @@ signal_array_getbyid(signal_array_t *arr, unsigned long id)
|
|||
return signal_array_lookup(arr, &sig);
|
||||
}
|
||||
|
||||
static inline void
|
||||
signal_add(signal_array_t *arr, const char *name)
|
||||
{
|
||||
}
|
||||
|
||||
/** Connect a signal inside a signal array.
|
||||
* You are in charge of reference counting.
|
||||
* \param arr The signal array.
|
||||
|
|
3
dbus.c
3
dbus.c
|
@ -773,10 +773,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);
|
||||
signal_connect(&dbus_signals, name, luaA_object_ref(L, 2));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
13
luaa.c
13
luaa.c
|
@ -723,19 +723,6 @@ luaA_init(xdgHandle* xdg)
|
|||
lua_getfield(L, 1, "loaded");
|
||||
|
||||
lua_pop(L, 2); /* pop "package" and "package.loaded" */
|
||||
|
||||
signal_add(&global_signals, "debug::error");
|
||||
signal_add(&global_signals, "debug::deprecation");
|
||||
signal_add(&global_signals, "debug::index::miss");
|
||||
signal_add(&global_signals, "debug::newindex::miss");
|
||||
signal_add(&global_signals, "systray::update");
|
||||
signal_add(&global_signals, "wallpaper_changed");
|
||||
signal_add(&global_signals, "xkb::map_changed");
|
||||
signal_add(&global_signals, "xkb::group_changed");
|
||||
signal_add(&global_signals, "refresh");
|
||||
signal_add(&global_signals, "startup");
|
||||
signal_add(&global_signals, "exit");
|
||||
signal_add(&global_signals, "screen::change");
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -178,11 +178,6 @@ button_class_setup(lua_State *L)
|
|||
(lua_class_propfunc_t) luaA_button_set_modifiers,
|
||||
(lua_class_propfunc_t) luaA_button_get_modifiers,
|
||||
(lua_class_propfunc_t) luaA_button_set_modifiers);
|
||||
|
||||
signal_add(&button_class.signals, "press");
|
||||
signal_add(&button_class.signals, "property::button");
|
||||
signal_add(&button_class.signals, "property::modifiers");
|
||||
signal_add(&button_class.signals, "release");
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
|
@ -3429,69 +3429,6 @@ client_class_setup(lua_State *L)
|
|||
NULL,
|
||||
(lua_class_propfunc_t) luaA_client_get_first_tag,
|
||||
NULL);
|
||||
|
||||
signal_add(&client_class.signals, "focus");
|
||||
signal_add(&client_class.signals, "list");
|
||||
signal_add(&client_class.signals, "swapped");
|
||||
signal_add(&client_class.signals, "manage");
|
||||
signal_add(&client_class.signals, "button::press");
|
||||
signal_add(&client_class.signals, "button::release");
|
||||
signal_add(&client_class.signals, "mouse::enter");
|
||||
signal_add(&client_class.signals, "mouse::leave");
|
||||
signal_add(&client_class.signals, "mouse::move");
|
||||
signal_add(&client_class.signals, "property::above");
|
||||
signal_add(&client_class.signals, "property::below");
|
||||
signal_add(&client_class.signals, "property::class");
|
||||
signal_add(&client_class.signals, "property::focusable");
|
||||
signal_add(&client_class.signals, "property::fullscreen");
|
||||
signal_add(&client_class.signals, "property::geometry");
|
||||
signal_add(&client_class.signals, "property::group_window");
|
||||
signal_add(&client_class.signals, "property::height");
|
||||
signal_add(&client_class.signals, "property::hidden");
|
||||
signal_add(&client_class.signals, "property::icon");
|
||||
signal_add(&client_class.signals, "property::icon_name");
|
||||
signal_add(&client_class.signals, "property::instance");
|
||||
signal_add(&client_class.signals, "property::keys");
|
||||
signal_add(&client_class.signals, "property::machine");
|
||||
signal_add(&client_class.signals, "property::maximized");
|
||||
signal_add(&client_class.signals, "property::maximized_horizontal");
|
||||
signal_add(&client_class.signals, "property::maximized_vertical");
|
||||
signal_add(&client_class.signals, "property::minimized");
|
||||
signal_add(&client_class.signals, "property::modal");
|
||||
signal_add(&client_class.signals, "property::name");
|
||||
signal_add(&client_class.signals, "property::ontop");
|
||||
signal_add(&client_class.signals, "property::pid");
|
||||
signal_add(&client_class.signals, "property::role");
|
||||
signal_add(&client_class.signals, "property::screen");
|
||||
signal_add(&client_class.signals, "property::shape_bounding");
|
||||
signal_add(&client_class.signals, "property::shape_client_bounding");
|
||||
signal_add(&client_class.signals, "property::shape_client_clip");
|
||||
signal_add(&client_class.signals, "property::shape_clip");
|
||||
signal_add(&client_class.signals, "property::size_hints_honor");
|
||||
signal_add(&client_class.signals, "property::skip_taskbar");
|
||||
signal_add(&client_class.signals, "property::sticky");
|
||||
signal_add(&client_class.signals, "property::struts");
|
||||
signal_add(&client_class.signals, "property::titlebar_bottom");
|
||||
signal_add(&client_class.signals, "property::titlebar_left");
|
||||
signal_add(&client_class.signals, "property::titlebar_right");
|
||||
signal_add(&client_class.signals, "property::titlebar_top");
|
||||
signal_add(&client_class.signals, "property::transient_for");
|
||||
signal_add(&client_class.signals, "property::type");
|
||||
signal_add(&client_class.signals, "property::urgent");
|
||||
signal_add(&client_class.signals, "property::width");
|
||||
signal_add(&client_class.signals, "property::window");
|
||||
signal_add(&client_class.signals, "property::x");
|
||||
signal_add(&client_class.signals, "property::y");
|
||||
signal_add(&client_class.signals, "request::activate");
|
||||
signal_add(&client_class.signals, "request::geometry");
|
||||
signal_add(&client_class.signals, "request::tag");
|
||||
signal_add(&client_class.signals, "request::urgent");
|
||||
signal_add(&client_class.signals, "tagged");
|
||||
signal_add(&client_class.signals, "unfocus");
|
||||
signal_add(&client_class.signals, "unmanage");
|
||||
signal_add(&client_class.signals, "untagged");
|
||||
signal_add(&client_class.signals, "raised");
|
||||
signal_add(&client_class.signals, "lowered");
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
|
@ -240,18 +240,6 @@ drawable_class_setup(lua_State *L)
|
|||
NULL,
|
||||
(lua_class_propfunc_t) luaA_drawable_get_surface,
|
||||
NULL);
|
||||
|
||||
signal_add(&drawable_class.signals, "button::press");
|
||||
signal_add(&drawable_class.signals, "button::release");
|
||||
signal_add(&drawable_class.signals, "mouse::enter");
|
||||
signal_add(&drawable_class.signals, "mouse::leave");
|
||||
signal_add(&drawable_class.signals, "mouse::move");
|
||||
signal_add(&drawable_class.signals, "property::geometry");
|
||||
signal_add(&drawable_class.signals, "property::height");
|
||||
signal_add(&drawable_class.signals, "property::width");
|
||||
signal_add(&drawable_class.signals, "property::x");
|
||||
signal_add(&drawable_class.signals, "property::y");
|
||||
signal_add(&drawable_class.signals, "property::surface");
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
|
@ -759,18 +759,6 @@ drawin_class_setup(lua_State *L)
|
|||
(lua_class_propfunc_t) luaA_drawin_set_shape_clip,
|
||||
(lua_class_propfunc_t) luaA_drawin_get_shape_clip,
|
||||
(lua_class_propfunc_t) luaA_drawin_set_shape_clip);
|
||||
|
||||
signal_add(&drawin_class.signals, "property::geometry");
|
||||
signal_add(&drawin_class.signals, "property::shape_bounding");
|
||||
signal_add(&drawin_class.signals, "property::shape_clip");
|
||||
signal_add(&drawin_class.signals, "property::border_width");
|
||||
signal_add(&drawin_class.signals, "property::cursor");
|
||||
signal_add(&drawin_class.signals, "property::height");
|
||||
signal_add(&drawin_class.signals, "property::ontop");
|
||||
signal_add(&drawin_class.signals, "property::visible");
|
||||
signal_add(&drawin_class.signals, "property::width");
|
||||
signal_add(&drawin_class.signals, "property::x");
|
||||
signal_add(&drawin_class.signals, "property::y");
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
|
@ -373,11 +373,6 @@ key_class_setup(lua_State *L)
|
|||
(lua_class_propfunc_t) luaA_key_set_modifiers,
|
||||
(lua_class_propfunc_t) luaA_key_get_modifiers,
|
||||
(lua_class_propfunc_t) luaA_key_set_modifiers);
|
||||
|
||||
signal_add(&key_class.signals, "press");
|
||||
signal_add(&key_class.signals, "property::key");
|
||||
signal_add(&key_class.signals, "property::modifiers");
|
||||
signal_add(&key_class.signals, "release");
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
|
@ -1128,13 +1128,6 @@ screen_class_setup(lua_State *L)
|
|||
NULL,
|
||||
(lua_class_propfunc_t) luaA_screen_get_workarea,
|
||||
NULL);
|
||||
|
||||
signal_add(&screen_class.signals, "property::workarea");
|
||||
signal_add(&screen_class.signals, "property::geometry");
|
||||
signal_add(&screen_class.signals, "property::outputs");
|
||||
signal_add(&screen_class.signals, "primary_changed");
|
||||
signal_add(&screen_class.signals, "added");
|
||||
signal_add(&screen_class.signals, "removed");
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
|
@ -425,13 +425,6 @@ tag_class_setup(lua_State *L)
|
|||
(lua_class_propfunc_t) luaA_tag_set_activated,
|
||||
(lua_class_propfunc_t) luaA_tag_get_activated,
|
||||
(lua_class_propfunc_t) luaA_tag_set_activated);
|
||||
|
||||
signal_add(&tag_class.signals, "property::name");
|
||||
signal_add(&tag_class.signals, "property::selected");
|
||||
signal_add(&tag_class.signals, "property::activated");
|
||||
signal_add(&tag_class.signals, "request::select");
|
||||
signal_add(&tag_class.signals, "tagged");
|
||||
signal_add(&tag_class.signals, "untagged");
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
|
@ -543,13 +543,6 @@ window_class_setup(lua_State *L)
|
|||
(lua_class_propfunc_t) luaA_window_set_border_width,
|
||||
(lua_class_propfunc_t) luaA_window_get_border_width,
|
||||
(lua_class_propfunc_t) luaA_window_set_border_width);
|
||||
|
||||
signal_add(&window_class.signals, "property::border_color");
|
||||
signal_add(&window_class.signals, "property::border_width");
|
||||
signal_add(&window_class.signals, "property::buttons");
|
||||
signal_add(&window_class.signals, "property::opacity");
|
||||
signal_add(&window_class.signals, "property::struts");
|
||||
signal_add(&window_class.signals, "property::type");
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
|
@ -530,15 +530,8 @@ luaA_register_xproperty(lua_State *L)
|
|||
}
|
||||
else
|
||||
{
|
||||
buffer_t buf;
|
||||
buffer_inita(&buf, a_strlen(name) + a_strlen("xproperty::") + 1);
|
||||
buffer_addf(&buf, "xproperty::%s", name);
|
||||
|
||||
property.name = a_strdup(name);
|
||||
xproperty_array_insert(&globalconf.xproperties, property);
|
||||
signal_add(&window_class.signals, buf.s);
|
||||
signal_add(&global_signals, buf.s);
|
||||
buffer_wipe(&buf);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
6
spawn.c
6
spawn.c
|
@ -265,12 +265,6 @@ spawn_init(void)
|
|||
globalconf.default_screen,
|
||||
spawn_monitor_event,
|
||||
NULL, NULL);
|
||||
|
||||
signal_add(&global_signals, "spawn::canceled");
|
||||
signal_add(&global_signals, "spawn::change");
|
||||
signal_add(&global_signals, "spawn::completed");
|
||||
signal_add(&global_signals, "spawn::initiated");
|
||||
signal_add(&global_signals, "spawn::timeout");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in New Issue