Sharing is good, but not when it makes the domain appear incorrectly in error messages, so let's have externals use its own variable for that.

SVN revision: 67295
This commit is contained in:
Iván Briano 2012-01-18 16:31:41 +00:00
parent 80a3a87fa9
commit d0570e47f3
2 changed files with 18 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#include "Elementary.h"
#include "private.h"
int _elm_log_dom = -1;
int _elm_ext_log_dom = -1;
static int init_count = 0;
@ -302,7 +302,7 @@ static Edje_External_Type_Info elm_external_types[] =
static Eina_Bool
elm_mod_init(void)
{
_elm_log_dom = eina_log_domain_register("elm-externals", EINA_COLOR_LIGHTBLUE);
_elm_ext_log_dom = eina_log_domain_register("elm-externals", EINA_COLOR_LIGHTBLUE);
edje_external_type_array_register(elm_external_types);
return EINA_TRUE;
}
@ -311,8 +311,8 @@ static void
elm_mod_shutdown(void)
{
edje_external_type_array_unregister(elm_external_types);
if (_elm_log_dom >= 0) eina_log_domain_unregister(_elm_log_dom);
_elm_log_dom = -1;
if (_elm_ext_log_dom >= 0) eina_log_domain_unregister(_elm_log_dom);
_elm_ext_log_dom = -1;
}
EINA_MODULE_INIT(elm_mod_init);

View File

@ -4,12 +4,26 @@
#include "Elementary.h"
#include "elm_priv.h"
#undef CRITICAL
#undef ERR
#undef WRN
#undef INF
#undef DBG
#define CRITICAL(...) EINA_LOG_DOM_CRIT(_elm_ext_log_dom, __VA_ARGS__)
#define ERR(...) EINA_LOG_DOM_ERR (_elm_ext_log_dom, __VA_ARGS__)
#define WRN(...) EINA_LOG_DOM_WARN(_elm_ext_log_dom, __VA_ARGS__)
#define INF(...) EINA_LOG_DOM_INFO(_elm_ext_log_dom, __VA_ARGS__)
#define DBG(...) EINA_LOG_DOM_DBG (_elm_ext_log_dom, __VA_ARGS__)
typedef struct {
const char *style;
Eina_Bool disabled:1;
Eina_Bool disabled_exists:1;
} Elm_Params;
extern int _elm_ext_log_dom;
void external_elm_init(void);
void external_signal(void *data, Evas_Object *obj, const char *signal, const char *source);
void external_signals_proxy(Evas_Object *obj, Evas_Object *edje, const char *part_name);