From f274652e1f5f1f6679f02d093619dd7e3012b9a7 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 6 Feb 2010 09:47:17 +0000 Subject: [PATCH] add sugusr1 to bring uo std config panel SVN revision: 45929 --- src/bin/e_main.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/bin/e_main.c b/src/bin/e_main.c index 5efd281..a4e8996 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -77,6 +77,7 @@ static int _e_main_path_shutdown(void); static void _e_main_cb_x_fatal(void *data); static int _e_main_cb_signal_exit(void *data, int ev_type, void *ev); static int _e_main_cb_signal_hup(void *data, int ev_type, void *ev); +static int _e_main_cb_signal_user(void *data, int ev_type, void *ev); static int _e_main_cb_x_flusher(void *data); static int _e_main_cb_idler_before(void *data); static int _e_main_cb_idler_after(void *data); @@ -429,6 +430,12 @@ main(int argc, char **argv) "Perhaps you are out of memory?")); _e_main_shutdown(-1); } + if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER, _e_main_cb_signal_user, NULL)) + { + e_error_message_show(_("Enlightenment cannot set up a USER signal handler.\n" + "Perhaps you are out of memory?")); + _e_main_shutdown(-1); + } /* an idle enterer to be called before all others */ _e_main_idle_enterer_before = ecore_idle_enterer_before_add(_e_main_cb_idler_before, NULL); @@ -1495,6 +1502,23 @@ _e_main_cb_signal_hup(void *data __UNUSED__, int ev_type __UNUSED__, void *ev __ } static int +_e_main_cb_signal_user(void *data __UNUSED__, int ev_type __UNUSED__, void *ev) +{ + Ecore_Event_Signal_User *e = ev; + + if (e->number == 1) + { + E_Action *a = e_action_find("configuration"); + if ((a) && (a->func.go)) a->func.go(NULL, NULL); + } + else if (e->number == 2) + { + // FIXME: another core util for doing things with e + } + return 1; +} + +static int _e_main_cb_x_flusher(void *data __UNUSED__) { eet_clearcache(); -- 2.7.4