replace e17 logging "system" with custom eina log domain
SVN revision: 72089
This commit is contained in:
parent
3ed7397f04
commit
f784bff213
|
@ -109,6 +109,7 @@ e_ipc_codec.h \
|
||||||
e_ipc.h \
|
e_ipc.h \
|
||||||
e_layout.h \
|
e_layout.h \
|
||||||
e_livethumb.h \
|
e_livethumb.h \
|
||||||
|
e_log.h \
|
||||||
e_manager.h \
|
e_manager.h \
|
||||||
e_maximize.h \
|
e_maximize.h \
|
||||||
e_menu.h \
|
e_menu.h \
|
||||||
|
@ -258,6 +259,7 @@ e_ipc.c \
|
||||||
e_ipc_codec.c \
|
e_ipc_codec.c \
|
||||||
e_layout.c \
|
e_layout.c \
|
||||||
e_livethumb.c \
|
e_livethumb.c \
|
||||||
|
e_log.c \
|
||||||
e_manager.c \
|
e_manager.c \
|
||||||
e_maximize.c \
|
e_maximize.c \
|
||||||
e_menu.c \
|
e_menu.c \
|
||||||
|
@ -344,6 +346,7 @@ e_xsettings.c \
|
||||||
e_zone.c \
|
e_zone.c \
|
||||||
$(ENLIGHTENMENTHEADERS)
|
$(ENLIGHTENMENTHEADERS)
|
||||||
|
|
||||||
|
enlightenment_CPPFLAGS = -DE_LOGGING=1
|
||||||
enlightenment_SOURCES = \
|
enlightenment_SOURCES = \
|
||||||
e_main.c \
|
e_main.c \
|
||||||
$(enlightenment_src)
|
$(enlightenment_src)
|
||||||
|
|
|
@ -568,12 +568,12 @@ e_border_new(E_Container *con,
|
||||||
}
|
}
|
||||||
else if (atoms[i] == ECORE_X_ATOM_NET_WM_STRUT)
|
else if (atoms[i] == ECORE_X_ATOM_NET_WM_STRUT)
|
||||||
{
|
{
|
||||||
printf("ECORE_X_ATOM_NET_WM_STRUT\n");
|
DBG("ECORE_X_ATOM_NET_WM_STRUT");
|
||||||
bd->client.netwm.fetch.strut = 1;
|
bd->client.netwm.fetch.strut = 1;
|
||||||
}
|
}
|
||||||
else if (atoms[i] == ECORE_X_ATOM_NET_WM_STRUT_PARTIAL)
|
else if (atoms[i] == ECORE_X_ATOM_NET_WM_STRUT_PARTIAL)
|
||||||
{
|
{
|
||||||
printf("ECORE_X_ATOM_NET_WM_STRUT_PARTIAL\n");
|
DBG("ECORE_X_ATOM_NET_WM_STRUT_PARTIAL");
|
||||||
bd->client.netwm.fetch.strut = 1;
|
bd->client.netwm.fetch.strut = 1;
|
||||||
}
|
}
|
||||||
else if (atoms[i] == ECORE_X_ATOM_NET_WM_WINDOW_TYPE)
|
else if (atoms[i] == ECORE_X_ATOM_NET_WM_WINDOW_TYPE)
|
||||||
|
@ -681,12 +681,21 @@ e_border_new(E_Container *con,
|
||||||
bd2 = eina_hash_find(borders_hash, e_util_winid_str_get(bd->client.win));
|
bd2 = eina_hash_find(borders_hash, e_util_winid_str_get(bd->client.win));
|
||||||
if (bd2)
|
if (bd2)
|
||||||
{
|
{
|
||||||
|
#ifdef E_LOGGING
|
||||||
|
WRN("EEEEK! 2 borders with same client window id in them! very bad!\n"
|
||||||
|
"optimisations failing due to bizarre client behavior. will\n"
|
||||||
|
"work around.\n"
|
||||||
|
"bd=%p, bd->references=%i, bd->deleted=%i, bd->client.win=%x",
|
||||||
|
bd2, bd2->e_obj_inherit.references, bd2->e_obj_inherit.deleted,
|
||||||
|
bd2->client.win);
|
||||||
|
#else
|
||||||
printf("EEEEK! 2 borders with same client window id in them! very bad!\n");
|
printf("EEEEK! 2 borders with same client window id in them! very bad!\n");
|
||||||
printf("optimisations failing due to bizarre client behavior. will\n");
|
printf("optimisations failing due to bizarre client behavior. will\n");
|
||||||
printf("work around.\n");
|
printf("work around.\n");
|
||||||
printf("bd=%p, bd->references=%i, bd->deleted=%i, bd->client.win=%x\n",
|
printf("bd=%p, bd->references=%i, bd->deleted=%i, bd->client.win=%x\n",
|
||||||
bd2, bd2->e_obj_inherit.references, bd2->e_obj_inherit.deleted,
|
bd2, bd2->e_obj_inherit.references, bd2->e_obj_inherit.deleted,
|
||||||
bd2->client.win);
|
bd2->client.win);
|
||||||
|
#endif
|
||||||
eina_hash_del(borders_hash, e_util_winid_str_get(bd->client.win), bd2);
|
eina_hash_del(borders_hash, e_util_winid_str_get(bd->client.win), bd2);
|
||||||
eina_hash_del(borders_hash, e_util_winid_str_get(bd2->bg_win), bd2);
|
eina_hash_del(borders_hash, e_util_winid_str_get(bd2->bg_win), bd2);
|
||||||
eina_hash_del(borders_hash, e_util_winid_str_get(bd2->win), bd2);
|
eina_hash_del(borders_hash, e_util_winid_str_get(bd2->win), bd2);
|
||||||
|
@ -2624,7 +2633,7 @@ e_border_unmaximize(E_Border *bd,
|
||||||
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
|
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
|
||||||
if (!(max & E_MAXIMIZE_DIRECTION))
|
if (!(max & E_MAXIMIZE_DIRECTION))
|
||||||
{
|
{
|
||||||
printf("BUG: Unmaximize call without direction!\n");
|
CRI("BUG: Unmaximize call without direction!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4707,7 +4716,7 @@ _e_border_print(E_Border *bd,
|
||||||
{
|
{
|
||||||
if (!bd) return;
|
if (!bd) return;
|
||||||
|
|
||||||
printf("*Window Info*"
|
DBG("*Window Info*"
|
||||||
"\tPointer: %p\n"
|
"\tPointer: %p\n"
|
||||||
"\tName: %s\n"
|
"\tName: %s\n"
|
||||||
"\tTitle: %s\n"
|
"\tTitle: %s\n"
|
||||||
|
@ -5498,14 +5507,14 @@ _e_border_cb_window_focus_in(void *data __UNUSED__,
|
||||||
t = time(NULL);
|
t = time(NULL);
|
||||||
ct = ctime(&t);
|
ct = ctime(&t);
|
||||||
ct[strlen(ct) - 1] = 0;
|
ct[strlen(ct) - 1] = 0;
|
||||||
printf("FF ->IN %i 0x%x %s md=%s dt=%s\n",
|
DBG("FF ->IN %i 0x%x %s md=%s dt=%s",
|
||||||
e->time,
|
e->time,
|
||||||
e->win,
|
e->win,
|
||||||
ct,
|
ct,
|
||||||
modes[e->mode],
|
modes[e->mode],
|
||||||
details[e->detail]);
|
details[e->detail]);
|
||||||
|
|
||||||
printf("%s cb focus in %d %d\n",
|
DBG("%s cb focus in %d %d",
|
||||||
e_border_name_get(bd),
|
e_border_name_get(bd),
|
||||||
bd->client.icccm.accepts_focus,
|
bd->client.icccm.accepts_focus,
|
||||||
bd->client.icccm.take_focus);
|
bd->client.icccm.take_focus);
|
||||||
|
@ -5566,14 +5575,14 @@ _e_border_cb_window_focus_out(void *data __UNUSED__,
|
||||||
t = time(NULL);
|
t = time(NULL);
|
||||||
ct = ctime(&t);
|
ct = ctime(&t);
|
||||||
ct[strlen(ct) - 1] = 0;
|
ct[strlen(ct) - 1] = 0;
|
||||||
printf("FF <-OUT %i 0x%x %s md=%s dt=%s\n",
|
DBG("FF <-OUT %i 0x%x %s md=%s dt=%s",
|
||||||
e->time,
|
e->time,
|
||||||
e->win,
|
e->win,
|
||||||
ct,
|
ct,
|
||||||
modes[e->mode],
|
modes[e->mode],
|
||||||
details[e->detail]);
|
details[e->detail]);
|
||||||
|
|
||||||
printf("%s cb focus out %d %d\n",
|
DBG("%s cb focus out %d %d",
|
||||||
e_border_name_get(bd),
|
e_border_name_get(bd),
|
||||||
bd->client.icccm.accepts_focus,
|
bd->client.icccm.accepts_focus,
|
||||||
bd->client.icccm.take_focus);
|
bd->client.icccm.take_focus);
|
||||||
|
@ -5969,7 +5978,7 @@ _e_border_cb_mouse_in(void *data,
|
||||||
t = time(NULL);
|
t = time(NULL);
|
||||||
ct = ctime(&t);
|
ct = ctime(&t);
|
||||||
ct[strlen(ct) - 1] = 0;
|
ct[strlen(ct) - 1] = 0;
|
||||||
printf("@@ ->IN 0x%x 0x%x %s md=%s dt=%s\n",
|
DBG("@@ ->IN 0x%x 0x%x %s md=%s dt=%s",
|
||||||
ev->win, ev->event_win,
|
ev->win, ev->event_win,
|
||||||
ct,
|
ct,
|
||||||
modes[ev->mode],
|
modes[ev->mode],
|
||||||
|
@ -6034,7 +6043,7 @@ _e_border_cb_mouse_out(void *data,
|
||||||
t = time(NULL);
|
t = time(NULL);
|
||||||
ct = ctime(&t);
|
ct = ctime(&t);
|
||||||
ct[strlen(ct) - 1] = 0;
|
ct[strlen(ct) - 1] = 0;
|
||||||
printf("@@ <-OUT 0x%x 0x%x %s md=%s dt=%s\n",
|
DBG("@@ <-OUT 0x%x 0x%x %s md=%s dt=%s",
|
||||||
ev->win, ev->event_win,
|
ev->win, ev->event_win,
|
||||||
ct,
|
ct,
|
||||||
modes[ev->mode],
|
modes[ev->mode],
|
||||||
|
|
|
@ -1031,8 +1031,7 @@ e_config_load(void)
|
||||||
}
|
}
|
||||||
if (!e_config)
|
if (!e_config)
|
||||||
{
|
{
|
||||||
printf("EEEK! no config of any sort! abort abort abort!\n");
|
ERR("EEEK! no config of any sort! abort abort abort!");
|
||||||
fprintf(stderr, "EEEK! no config of any sort! abort abort abort!\n");
|
|
||||||
e_error_message_show("Enlightenment was started without any configuration\n"
|
e_error_message_show("Enlightenment was started without any configuration\n"
|
||||||
"files available for the given profile (normally\n"
|
"files available for the given profile (normally\n"
|
||||||
"default or the last profile used or provided on the\n"
|
"default or the last profile used or provided on the\n"
|
||||||
|
@ -1747,9 +1746,7 @@ e_config_domain_save(const char *domain, E_Config_DD *edd, const void *data)
|
||||||
}
|
}
|
||||||
ret = ecore_file_mv(buf2, buf);
|
ret = ecore_file_mv(buf2, buf);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
ERR("*** Error saving config. ***");
|
||||||
printf("*** Error saving config. ***\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ecore_file_unlink(buf2);
|
ecore_file_unlink(buf2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -657,10 +657,10 @@ _e_fm2_op_registry_entry_print(const E_Fm2_Op_Registry_Entry *ere)
|
||||||
else
|
else
|
||||||
status = status_strings[0];
|
status = status_strings[0];
|
||||||
|
|
||||||
printf("id: %8d, op: %2d [%s] finished: %hhu, needs_attention: %hhu\n"
|
DBG("id: %8d, op: %2d [%s] finished: %hhu, needs_attention: %hhu\n"
|
||||||
" %3d%% (%" PRIi64 "/%" PRIi64 "), start_time: %10.0f, eta: %5ds, xwin: %#x\n"
|
" %3d%% (%" PRIi64 "/%" PRIi64 "), start_time: %10.0f, eta: %5ds, xwin: %#x\n"
|
||||||
" src=[%s]\n"
|
" src=[%s]\n"
|
||||||
" dst=[%s]\n",
|
" dst=[%s]",
|
||||||
ere->id, ere->op, status, ere->finished, ere->needs_attention,
|
ere->id, ere->op, status, ere->finished, ere->needs_attention,
|
||||||
ere->percent, ere->done, ere->total, ere->start_time, ere->eta,
|
ere->percent, ere->done, ere->total, ere->start_time, ere->eta,
|
||||||
e_fm2_op_registry_entry_xwin_get(ere),
|
e_fm2_op_registry_entry_xwin_get(ere),
|
||||||
|
@ -671,7 +671,7 @@ static Eina_Bool
|
||||||
_e_fm2_op_registry_entry_add_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_e_fm2_op_registry_entry_add_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
||||||
{
|
{
|
||||||
const E_Fm2_Op_Registry_Entry *ere = event;
|
const E_Fm2_Op_Registry_Entry *ere = event;
|
||||||
printf("E FM OPERATION STARTED: id=%d, op=%d\n", ere->id, ere->op);
|
DBG("E FM OPERATION STARTED: id=%d, op=%d", ere->id, ere->op);
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1907,7 +1907,7 @@ _e_fm2_icon_explicit_get(Evas *evas, const E_Fm2_Icon *ic, const char *icon, con
|
||||||
iconpath = _e_fm2_path_join(buf, sizeof(buf), ic->sd->realpath, icon);
|
iconpath = _e_fm2_path_join(buf, sizeof(buf), ic->sd->realpath, icon);
|
||||||
if (!iconpath)
|
if (!iconpath)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "ERROR: could not create icon \"%s\".\n", icon);
|
ERR("could not create icon \"%s\".", icon);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2573,7 +2573,7 @@ _e_fm2_client_file_symlink(const char *path, const char *dest, const char *rel,
|
||||||
args = _e_fm_string_append_char(args, &size, &length, ' ');
|
args = _e_fm_string_append_char(args, &size, &length, ' ');
|
||||||
args = _e_fm_string_append_quoted(args, &size, &length, dest);
|
args = _e_fm_string_append_quoted(args, &size, &length, dest);
|
||||||
|
|
||||||
fputs("WARNING: using new E_FM_OP_SYMLINK, remove deprecated ASAP\n", stderr);
|
WRN("using new E_FM_OP_SYMLINK, remove deprecated ASAP", stderr);
|
||||||
r = _e_fm_client_file_symlink(args, e_fm);
|
r = _e_fm_client_file_symlink(args, e_fm);
|
||||||
free(args);
|
free(args);
|
||||||
return r;
|
return r;
|
||||||
|
@ -3113,7 +3113,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
||||||
case E_FM_OP_ERROR: /*error*/
|
case E_FM_OP_ERROR: /*error*/
|
||||||
{
|
{
|
||||||
E_Dialog *dlg;
|
E_Dialog *dlg;
|
||||||
printf("%s:%s(%d) Error from slave #%d: %s\n", __FILE__, __FUNCTION__, __LINE__, e->ref, (char *)e->data);
|
ERR("Error from slave #%d: %s", e->ref, (char *)e->data);
|
||||||
dlg = _e_fm_error_dialog(e->ref, e->data);
|
dlg = _e_fm_error_dialog(e->ref, e->data);
|
||||||
_e_fm2_op_registry_error(e->ref, dlg);
|
_e_fm2_op_registry_error(e->ref, dlg);
|
||||||
}
|
}
|
||||||
|
@ -3122,7 +3122,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
||||||
case E_FM_OP_ERROR_RETRY_ABORT: /*error*/
|
case E_FM_OP_ERROR_RETRY_ABORT: /*error*/
|
||||||
{
|
{
|
||||||
E_Dialog *dlg;
|
E_Dialog *dlg;
|
||||||
printf("%s:%s(%d) Error from slave #%d: %s\n", __FILE__, __FUNCTION__, __LINE__, e->ref, (char *)e->data);
|
ERR("Error from slave #%d: %s", e->ref, (char *)e->data);
|
||||||
dlg = _e_fm_retry_abort_dialog(e->ref, (char *)e->data);
|
dlg = _e_fm_retry_abort_dialog(e->ref, (char *)e->data);
|
||||||
_e_fm2_op_registry_error(e->ref, dlg);
|
_e_fm2_op_registry_error(e->ref, dlg);
|
||||||
}
|
}
|
||||||
|
@ -3131,7 +3131,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
||||||
case E_FM_OP_OVERWRITE: /*overwrite*/
|
case E_FM_OP_OVERWRITE: /*overwrite*/
|
||||||
{
|
{
|
||||||
E_Dialog *dlg;
|
E_Dialog *dlg;
|
||||||
printf("%s:%s(%d) Overwrite from slave #%d: %s\n", __FILE__, __FUNCTION__, __LINE__, e->ref, (char *)e->data);
|
ERR("Overwrite from slave #%d: %s", e->ref, (char *)e->data);
|
||||||
dlg = _e_fm_overwrite_dialog(e->ref, (char *)e->data);
|
dlg = _e_fm_overwrite_dialog(e->ref, (char *)e->data);
|
||||||
_e_fm2_op_registry_needs_attention(e->ref, dlg);
|
_e_fm2_op_registry_needs_attention(e->ref, dlg);
|
||||||
}
|
}
|
||||||
|
@ -4478,7 +4478,7 @@ _e_fm2_icon_fill(E_Fm2_Icon *ic, E_Fm2_Finfo *finf)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("FIXME: remove old non finf icon fill code\n");
|
ERR("FIXME: remove old non finf icon fill code");
|
||||||
/* FIXME: this should go away... get this from the fm slave proc above */
|
/* FIXME: this should go away... get this from the fm slave proc above */
|
||||||
lnk = ecore_file_readlink(buf);
|
lnk = ecore_file_readlink(buf);
|
||||||
if (stat(buf, &(ic->info.statinfo)) == -1)
|
if (stat(buf, &(ic->info.statinfo)) == -1)
|
||||||
|
|
|
@ -2,7 +2,11 @@
|
||||||
#define E_FM_MAIN_H
|
#define E_FM_MAIN_H
|
||||||
|
|
||||||
#include <Ecore_Ipc.h>
|
#include <Ecore_Ipc.h>
|
||||||
|
#undef DBG
|
||||||
|
#undef INF
|
||||||
|
#undef WRN
|
||||||
|
#undef ERR
|
||||||
|
#undef CRI
|
||||||
#define DBG(...) EINA_LOG_DOM_DBG(efm_log_dom, __VA_ARGS__)
|
#define DBG(...) EINA_LOG_DOM_DBG(efm_log_dom, __VA_ARGS__)
|
||||||
#define INF(...) EINA_LOG_DOM_INFO(efm_log_dom, __VA_ARGS__)
|
#define INF(...) EINA_LOG_DOM_INFO(efm_log_dom, __VA_ARGS__)
|
||||||
#define WRN(...) EINA_LOG_DOM_WARN(efm_log_dom, __VA_ARGS__)
|
#define WRN(...) EINA_LOG_DOM_WARN(efm_log_dom, __VA_ARGS__)
|
||||||
|
|
|
@ -143,3 +143,4 @@
|
||||||
#include "e_xsettings.h"
|
#include "e_xsettings.h"
|
||||||
#include "e_update.h"
|
#include "e_update.h"
|
||||||
#include "e_xkb.h"
|
#include "e_xkb.h"
|
||||||
|
#include "e_log.h"
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
#include "e.h"
|
||||||
|
|
||||||
|
#ifndef E_LOG_LEVEL
|
||||||
|
# define E_LOG_LEVEL EINA_LOG_LEVEL_INFO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
EINTERN int e_log_dom = -1;
|
||||||
|
|
||||||
|
static const char *_names[] = {
|
||||||
|
"CRI",
|
||||||
|
"ERR",
|
||||||
|
"WRN",
|
||||||
|
"INF",
|
||||||
|
"DBG",
|
||||||
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
_e_log_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc __UNUSED__, int line, const char *fmt, void *data __UNUSED__, va_list args)
|
||||||
|
{
|
||||||
|
const char *color;
|
||||||
|
|
||||||
|
color = eina_log_level_color_get(level);
|
||||||
|
fprintf(stdout,
|
||||||
|
"%s%s<" EINA_COLOR_RESET "%s%s>" EINA_COLOR_RESET "%s:%d" EINA_COLOR_RESET " ",
|
||||||
|
color, _names[level > EINA_LOG_LEVEL_DBG ? EINA_LOG_LEVEL_DBG : level],
|
||||||
|
d->domain_str, color, file, line);
|
||||||
|
vfprintf(stdout, fmt, args);
|
||||||
|
putc('\n', stdout);
|
||||||
|
}
|
||||||
|
|
||||||
|
EINTERN int
|
||||||
|
e_log_init(void)
|
||||||
|
{
|
||||||
|
e_log_dom = eina_log_domain_register("e", EINA_COLOR_WHITE);
|
||||||
|
eina_log_domain_level_set("e", E_LOG_LEVEL);
|
||||||
|
eina_log_print_cb_set(_e_log_cb, NULL);
|
||||||
|
return (e_log_dom != -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
EINTERN int
|
||||||
|
e_log_shutdown(void)
|
||||||
|
{
|
||||||
|
eina_log_domain_unregister(e_log_dom);
|
||||||
|
e_log_dom = -1;
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
#ifdef E_TYPEDEFS
|
||||||
|
|
||||||
|
#else
|
||||||
|
#ifndef E_LOG_H
|
||||||
|
#define E_LOG_H
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef E_LOGGING
|
||||||
|
#undef DBG
|
||||||
|
#undef INF
|
||||||
|
#undef WRN
|
||||||
|
#undef ERR
|
||||||
|
#undef CRI
|
||||||
|
#define DBG(...) EINA_LOG_DOM_DBG(e_log_dom, __VA_ARGS__)
|
||||||
|
#define INF(...) EINA_LOG_DOM_INFO(e_log_dom, __VA_ARGS__)
|
||||||
|
#define WRN(...) EINA_LOG_DOM_WARN(e_log_dom, __VA_ARGS__)
|
||||||
|
#define ERR(...) EINA_LOG_DOM_ERR(e_log_dom, __VA_ARGS__)
|
||||||
|
#define CRI(...) EINA_LOG_DOM_CRIT(e_log_dom, __VA_ARGS__)
|
||||||
|
|
||||||
|
EINTERN extern int e_log_dom;
|
||||||
|
|
||||||
|
EINTERN int e_log_init(void);
|
||||||
|
EINTERN int e_log_shutdown(void);
|
||||||
|
#else
|
||||||
|
#undef DBG
|
||||||
|
#undef INF
|
||||||
|
#undef WRN
|
||||||
|
#undef ERR
|
||||||
|
#undef CRI
|
||||||
|
#define DBG(...) printf(__VA_ARGS__); putc('\n', stdout)
|
||||||
|
#define INF(...) printf(__VA_ARGS__); putc('\n', stdout)
|
||||||
|
#define WRN(...) printf(__VA_ARGS__); putc('\n', stdout)
|
||||||
|
#define ERR(...) printf(__VA_ARGS__); putc('\n', stdout)
|
||||||
|
#define CRI(...) printf(__VA_ARGS__); putc('\n', stdout)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
|
@ -106,6 +106,8 @@ static Ecore_Idle_Enterer *_idle_before = NULL;
|
||||||
static Ecore_Idle_Enterer *_idle_after = NULL;
|
static Ecore_Idle_Enterer *_idle_after = NULL;
|
||||||
static Ecore_Idle_Enterer *_idle_flush = NULL;
|
static Ecore_Idle_Enterer *_idle_flush = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* external variables */
|
/* external variables */
|
||||||
EAPI Eina_Bool e_precache_end = EINA_FALSE;
|
EAPI Eina_Bool e_precache_end = EINA_FALSE;
|
||||||
EAPI Eina_Bool x_fatal = EINA_FALSE;
|
EAPI Eina_Bool x_fatal = EINA_FALSE;
|
||||||
|
@ -191,8 +193,23 @@ main(int argc, char **argv)
|
||||||
e_error_message_show(_("Enlightenment cannot initialize Eina!\n"));
|
e_error_message_show(_("Enlightenment cannot initialize Eina!\n"));
|
||||||
_e_main_shutdown(-1);
|
_e_main_shutdown(-1);
|
||||||
}
|
}
|
||||||
TS("Eina Init Done");
|
|
||||||
_e_main_shutdown_push(eina_shutdown);
|
_e_main_shutdown_push(eina_shutdown);
|
||||||
|
if (!e_log_init())
|
||||||
|
{
|
||||||
|
e_error_message_show(_("Enlightenment could not create a logging domain!"));
|
||||||
|
_e_main_shutdown(-1);
|
||||||
|
}
|
||||||
|
#ifdef TS_DO
|
||||||
|
#undef TS
|
||||||
|
# define TS(x) \
|
||||||
|
{ \
|
||||||
|
t1 = ecore_time_unix_get(); \
|
||||||
|
INF("ESTART: %1.5f [%1.5f] - %s", t1 - t0, t1 - t2, x); \
|
||||||
|
t2 = t1; \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
TS("Eina Init Done");
|
||||||
|
_e_main_shutdown_push(e_log_shutdown);
|
||||||
|
|
||||||
TS("Determine Prefix");
|
TS("Determine Prefix");
|
||||||
if (!e_prefix_determine(argv[0]))
|
if (!e_prefix_determine(argv[0]))
|
||||||
|
@ -976,7 +993,7 @@ main(int argc, char **argv)
|
||||||
if (!setjmp(x_fatal_buff))
|
if (!setjmp(x_fatal_buff))
|
||||||
ecore_main_loop_begin();
|
ecore_main_loop_begin();
|
||||||
else
|
else
|
||||||
printf("FATAL: X Died. Connection gone. Abbreviated Shutdown\n");
|
CRI("FATAL: X Died. Connection gone. Abbreviated Shutdown\n");
|
||||||
|
|
||||||
inloop = EINA_FALSE;
|
inloop = EINA_FALSE;
|
||||||
stopping = EINA_TRUE;
|
stopping = EINA_TRUE;
|
||||||
|
@ -1028,7 +1045,7 @@ _e_main_shutdown(int errcode)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
printf("E17: Begin Shutdown Procedure!\n");
|
INF("E17: Begin Shutdown Procedure!\n");
|
||||||
|
|
||||||
if (_idle_before) ecore_idle_enterer_del(_idle_before);
|
if (_idle_before) ecore_idle_enterer_del(_idle_before);
|
||||||
_idle_before = NULL;
|
_idle_before = NULL;
|
||||||
|
|
|
@ -51,7 +51,7 @@ e_msgbus_init(void)
|
||||||
_e_msgbus_data->conn = e_dbus_bus_get(DBUS_BUS_SESSION);
|
_e_msgbus_data->conn = e_dbus_bus_get(DBUS_BUS_SESSION);
|
||||||
if (!_e_msgbus_data->conn)
|
if (!_e_msgbus_data->conn)
|
||||||
{
|
{
|
||||||
printf("WARNING: Cannot get DBUS_BUS_SESSION\n");
|
WRN("Cannot get DBUS_BUS_SESSION");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
e_dbus_request_name(_e_msgbus_data->conn, "org.enlightenment.wm.service", 0, _e_msgbus_request_name_cb, NULL);
|
e_dbus_request_name(_e_msgbus_data->conn, "org.enlightenment.wm.service", 0, _e_msgbus_request_name_cb, NULL);
|
||||||
|
@ -60,7 +60,7 @@ e_msgbus_init(void)
|
||||||
iface = e_dbus_interface_new("org.enlightenment.wm.Core");
|
iface = e_dbus_interface_new("org.enlightenment.wm.Core");
|
||||||
if (!iface)
|
if (!iface)
|
||||||
{
|
{
|
||||||
printf("WARNING: Cannot add org.enlightenment.wm.Core interface\n");
|
WRN("Cannot add org.enlightenment.wm.Core interface");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
e_dbus_object_interface_attach(_e_msgbus_data->obj, iface);
|
e_dbus_object_interface_attach(_e_msgbus_data->obj, iface);
|
||||||
|
@ -73,7 +73,7 @@ e_msgbus_init(void)
|
||||||
iface = e_dbus_interface_new("org.enlightenment.wm.Module");
|
iface = e_dbus_interface_new("org.enlightenment.wm.Module");
|
||||||
if (!iface)
|
if (!iface)
|
||||||
{
|
{
|
||||||
printf("WARNING: Cannot add org.enlightenment.wm.Module interface\n");
|
WRN("Cannot add org.enlightenment.wm.Module interface");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
e_dbus_object_interface_attach(_e_msgbus_data->obj, iface);
|
e_dbus_object_interface_attach(_e_msgbus_data->obj, iface);
|
||||||
|
@ -89,7 +89,7 @@ e_msgbus_init(void)
|
||||||
iface = e_dbus_interface_new("org.enlightenment.wm.Profile");
|
iface = e_dbus_interface_new("org.enlightenment.wm.Profile");
|
||||||
if (!iface)
|
if (!iface)
|
||||||
{
|
{
|
||||||
printf("WARNING: Cannot add org.enlightenment.wm.Profile interface\n");
|
WRN("Cannot add org.enlightenment.wm.Profile interface");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
e_dbus_object_interface_attach(_e_msgbus_data->obj, iface);
|
e_dbus_object_interface_attach(_e_msgbus_data->obj, iface);
|
||||||
|
|
|
@ -21,7 +21,17 @@ e_prefix_determine(char *argv0)
|
||||||
|
|
||||||
_prefix_path_data = eina_prefix_data_get(pfx);
|
_prefix_path_data = eina_prefix_data_get(pfx);
|
||||||
_prefix_path_data_len= strlen(_prefix_path_data);
|
_prefix_path_data_len= strlen(_prefix_path_data);
|
||||||
|
#ifdef E_LOGGING
|
||||||
|
INF("=================================");
|
||||||
|
INF("Enlightenment relocation handling");
|
||||||
|
INF("=================================");
|
||||||
|
INF("PREFIX: %s", eina_prefix_get(pfx));
|
||||||
|
INF("BINDIR: %s", eina_prefix_bin_get(pfx));
|
||||||
|
INF("LIBDIR: %s", eina_prefix_lib_get(pfx));
|
||||||
|
INF("DATADIR: %s", eina_prefix_data_get(pfx));
|
||||||
|
INF("LOCALE: %s", eina_prefix_locale_get(pfx));
|
||||||
|
INF("=================================");
|
||||||
|
#else
|
||||||
printf("=================================\n");
|
printf("=================================\n");
|
||||||
printf("Enlightenment relocation handling\n");
|
printf("Enlightenment relocation handling\n");
|
||||||
printf("=================================\n");
|
printf("=================================\n");
|
||||||
|
@ -31,6 +41,7 @@ e_prefix_determine(char *argv0)
|
||||||
printf("DATADIR: %s\n", eina_prefix_data_get(pfx));
|
printf("DATADIR: %s\n", eina_prefix_data_get(pfx));
|
||||||
printf("LOCALE: %s\n", eina_prefix_locale_get(pfx));
|
printf("LOCALE: %s\n", eina_prefix_locale_get(pfx));
|
||||||
printf("=================================\n");
|
printf("=================================\n");
|
||||||
|
#endif
|
||||||
e_util_env_set("E_PREFIX", eina_prefix_get(pfx));
|
e_util_env_set("E_PREFIX", eina_prefix_get(pfx));
|
||||||
e_util_env_set("E_BIN_DIR", eina_prefix_bin_get(pfx));
|
e_util_env_set("E_BIN_DIR", eina_prefix_bin_get(pfx));
|
||||||
e_util_env_set("E_LIB_DIR", eina_prefix_lib_get(pfx));
|
e_util_env_set("E_LIB_DIR", eina_prefix_lib_get(pfx));
|
||||||
|
|
|
@ -1257,7 +1257,7 @@ e_util_image_import(const char *image_path, const char *edje_path, const char *e
|
||||||
if (evas_object_image_load_error_get(img) != EVAS_LOAD_ERROR_NONE)
|
if (evas_object_image_load_error_get(img) != EVAS_LOAD_ERROR_NONE)
|
||||||
{
|
{
|
||||||
ecore_evas_free(ee);
|
ecore_evas_free(ee);
|
||||||
printf("Error loading image '%s'\n", image_path);
|
ERR("Error loading image '%s'", image_path);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
evas_object_image_size_get(img, &w, &h);
|
evas_object_image_size_get(img, &w, &h);
|
||||||
|
@ -1272,14 +1272,14 @@ e_util_image_import(const char *image_path, const char *edje_path, const char *e
|
||||||
fd = mkstemp(tmpn);
|
fd = mkstemp(tmpn);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
printf("Error Creating tmp file: %s\n", strerror(errno));
|
ERR("Error Creating tmp file: %s", strerror(errno));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
f = fdopen(fd, "wb");
|
f = fdopen(fd, "wb");
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
printf("Cannot open %s for writing\n", tmpn);
|
ERR("Cannot open %s for writing", tmpn);
|
||||||
close(fd);
|
close(fd);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ _e_xinerama_update(void)
|
||||||
{
|
{
|
||||||
E_Screen *screen;
|
E_Screen *screen;
|
||||||
|
|
||||||
printf("E17 INIT: XINERAMA SCREEN: [%i][%i], %ix%i+%i+%i\n",
|
INF("E17 INIT: XINERAMA SCREEN: [%i][%i], %ix%i+%i+%i",
|
||||||
i, i, w, h, x, y);
|
i, i, w, h, x, y);
|
||||||
/* add it to our list */
|
/* add it to our list */
|
||||||
screen = E_NEW(E_Screen, 1);
|
screen = E_NEW(E_Screen, 1);
|
||||||
|
@ -175,12 +175,12 @@ _e_xinerama_update(void)
|
||||||
chosen_screens = eina_list_sort(chosen_screens,
|
chosen_screens = eina_list_sort(chosen_screens,
|
||||||
eina_list_count(chosen_screens),
|
eina_list_count(chosen_screens),
|
||||||
_e_xinerama_cb_screen_sort);
|
_e_xinerama_cb_screen_sort);
|
||||||
printf("======================= screens:\n");
|
INF("======================= screens:");
|
||||||
n = 0;
|
n = 0;
|
||||||
EINA_LIST_FOREACH(chosen_screens, l, scr)
|
EINA_LIST_FOREACH(chosen_screens, l, scr)
|
||||||
{
|
{
|
||||||
scr->escreen = n;
|
scr->escreen = n;
|
||||||
printf("E17 INIT: XINERAMA CHOSEN: [%i][%i], %ix%i+%i+%i\n",
|
INF("E17 INIT: XINERAMA CHOSEN: [%i][%i], %ix%i+%i+%i",
|
||||||
scr->screen, scr->escreen, scr->w, scr->h, scr->x, scr->y);
|
scr->screen, scr->escreen, scr->w, scr->h, scr->x, scr->y);
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ e_xkb_update(void)
|
||||||
eina_strbuf_append(buf, "'");
|
eina_strbuf_append(buf, "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("SET XKB RUN:\n %s\n", eina_strbuf_string_get(buf));
|
INF("SET XKB RUN: %s", eina_strbuf_string_get(buf));
|
||||||
ecore_exe_run(eina_strbuf_string_get(buf), NULL);
|
ecore_exe_run(eina_strbuf_string_get(buf), NULL);
|
||||||
eina_strbuf_free(buf);
|
eina_strbuf_free(buf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ _e_xsettings_selection_owner_set(Settings_Manager *sm)
|
||||||
|
|
||||||
ret = (cur_selection == sm->selection);
|
ret = (cur_selection == sm->selection);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
fprintf(stderr, "XSETTINGS: tried to set selection to %#x, but got %#x\n",
|
ERR("XSETTINGS: tried to set selection to %#x, but got %#x",
|
||||||
sm->selection, cur_selection);
|
sm->selection, cur_selection);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -134,13 +134,12 @@ _e_xsettings_activate_retry(void *data)
|
||||||
Settings_Manager *sm = data;
|
Settings_Manager *sm = data;
|
||||||
Eina_Bool ret;
|
Eina_Bool ret;
|
||||||
|
|
||||||
fputs("XSETTINGS: reactivate...\n", stderr);
|
INF("XSETTINGS: reactivate...");
|
||||||
ret = _e_xsettings_activate(sm);
|
ret = _e_xsettings_activate(sm);
|
||||||
if (ret)
|
if (ret)
|
||||||
fputs("XSETTINGS: activate success!\n", stderr);
|
INF("XSETTINGS: activate success!");
|
||||||
else
|
else
|
||||||
fprintf(stderr, "XSETTINGS: activate failure! retrying in %0.1f seconds\n",
|
ERR("XSETTINGS: activate failure! retrying in %0.1f seconds", RETRY_TIMEOUT);
|
||||||
RETRY_TIMEOUT);
|
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
|
@ -174,7 +173,7 @@ _e_xsettings_string_set(const char *name, const char *value)
|
||||||
if (!value)
|
if (!value)
|
||||||
{
|
{
|
||||||
if (!s) return;
|
if (!s) return;
|
||||||
printf("remove %s\n", name);
|
DBG("remove %s\n", name);
|
||||||
eina_stringshare_del(name);
|
eina_stringshare_del(name);
|
||||||
eina_stringshare_del(s->name);
|
eina_stringshare_del(s->name);
|
||||||
eina_stringshare_del(s->s.value);
|
eina_stringshare_del(s->s.value);
|
||||||
|
@ -184,13 +183,13 @@ _e_xsettings_string_set(const char *name, const char *value)
|
||||||
}
|
}
|
||||||
if (s)
|
if (s)
|
||||||
{
|
{
|
||||||
printf("update %s %s\n", name, value);
|
DBG("update %s %s\n", name, value);
|
||||||
eina_stringshare_del(name);
|
eina_stringshare_del(name);
|
||||||
eina_stringshare_replace(&s->s.value, value);
|
eina_stringshare_replace(&s->s.value, value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("add %s %s\n", name, value);
|
DBG("add %s %s\n", name, value);
|
||||||
s = E_NEW(Setting, 1);
|
s = E_NEW(Setting, 1);
|
||||||
s->type = SETTING_TYPE_STRING;
|
s->type = SETTING_TYPE_STRING;
|
||||||
s->name = name;
|
s->name = name;
|
||||||
|
@ -223,7 +222,7 @@ _e_xsettings_int_set(const char *name, int value, Eina_Bool set)
|
||||||
if (!set)
|
if (!set)
|
||||||
{
|
{
|
||||||
if (!s) return;
|
if (!s) return;
|
||||||
printf("remove %s\n", name);
|
DBG("remove %s\n", name);
|
||||||
eina_stringshare_del(name);
|
eina_stringshare_del(name);
|
||||||
eina_stringshare_del(s->name);
|
eina_stringshare_del(s->name);
|
||||||
settings = eina_list_remove(settings, s);
|
settings = eina_list_remove(settings, s);
|
||||||
|
@ -232,13 +231,13 @@ _e_xsettings_int_set(const char *name, int value, Eina_Bool set)
|
||||||
}
|
}
|
||||||
if (s)
|
if (s)
|
||||||
{
|
{
|
||||||
printf("update %s %d\n", name, value);
|
DBG("update %s %d\n", name, value);
|
||||||
eina_stringshare_del(name);
|
eina_stringshare_del(name);
|
||||||
s->i.value = value;
|
s->i.value = value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("add %s %d\n", name, value);
|
DBG("add %s %d\n", name, value);
|
||||||
s = E_NEW(Setting, 1);
|
s = E_NEW(Setting, 1);
|
||||||
s->type = SETTING_TYPE_INT;
|
s->type = SETTING_TYPE_INT;
|
||||||
s->name = name;
|
s->name = name;
|
||||||
|
|
Loading…
Reference in New Issue