terminology: move log dom registering

the log domain should be registered when there is a new window, not when
there is a new term. A windows can exist before a term can exist.
Further more, win_new function is using this log domain so it should be
inited.
This commit is contained in:
Marcel Hollerbach 2019-01-14 22:44:31 +00:00 committed by Boris Faure
parent c1d030da0a
commit b37a3eefb6
1 changed files with 7 additions and 7 deletions

View File

@ -1628,6 +1628,13 @@ win_new(const char *name, const char *role, const char *title,
return NULL;
}
if (_win_log_dom < 0)
{
_win_log_dom = eina_log_domain_register("win", NULL);
if (_win_log_dom < 0)
EINA_LOG_CRIT("Could not create logging domain '%s'.", "win");
}
tc = (Term_Container*) wn;
tc->term_next = _win_term_next;
tc->term_prev = _win_term_prev;
@ -5598,13 +5605,6 @@ term_new(Win *wn, Config *config, const char *cmd,
if (!config) abort();
/* TODO: clean up that */
if (_win_log_dom < 0)
{
_win_log_dom = eina_log_domain_register("win", NULL);
if (_win_log_dom < 0)
EINA_LOG_CRIT("Could not create logging domain '%s'.", "win");
}
termpty_init();
miniview_init();
gravatar_init();