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

View File

@ -4,12 +4,26 @@
#include "Elementary.h" #include "Elementary.h"
#include "elm_priv.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 { typedef struct {
const char *style; const char *style;
Eina_Bool disabled:1; Eina_Bool disabled:1;
Eina_Bool disabled_exists:1; Eina_Bool disabled_exists:1;
} Elm_Params; } Elm_Params;
extern int _elm_ext_log_dom;
void external_elm_init(void); void external_elm_init(void);
void external_signal(void *data, Evas_Object *obj, const char *signal, const char *source); 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); void external_signals_proxy(Evas_Object *obj, Evas_Object *edje, const char *part_name);