forked from enlightenment/terminology
parent
98a197c4b2
commit
fec0f1e071
|
@ -1,6 +1,4 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "terminology_config.h"
|
||||
#endif
|
||||
#include "private.h"
|
||||
|
||||
#include <Ecore_Getopt.h>
|
||||
#include <Elementary.h>
|
||||
|
@ -11,6 +9,8 @@
|
|||
#include "options.h"
|
||||
#include "media.h"
|
||||
|
||||
int _log_domain = -1;
|
||||
|
||||
static Evas_Object *win = NULL, *bg = NULL, *term = NULL, *media = NULL;
|
||||
static Ecore_Timer *flush_timer = NULL;
|
||||
|
||||
|
@ -180,6 +180,15 @@ elm_main(int argc, char **argv)
|
|||
int args, retval = EXIT_SUCCESS;
|
||||
Evas_Object *o;
|
||||
|
||||
|
||||
_log_domain = eina_log_domain_register("terminology", NULL);
|
||||
if (_log_domain < 0)
|
||||
{
|
||||
EINA_LOG_CRIT("could not create log domain 'terminology'.");
|
||||
elm_shutdown();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
config_init();
|
||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||
elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
|
||||
|
@ -189,7 +198,7 @@ elm_main(int argc, char **argv)
|
|||
args = ecore_getopt_parse(&options, values, argc, argv);
|
||||
if (args < 0)
|
||||
{
|
||||
fputs("Could not parse command line options.\n", stderr);
|
||||
ERR("Could not parse command line options.");
|
||||
retval = EXIT_FAILURE;
|
||||
goto end;
|
||||
}
|
||||
|
@ -276,6 +285,10 @@ elm_main(int argc, char **argv)
|
|||
elm_run();
|
||||
end:
|
||||
config_shutdown();
|
||||
|
||||
eina_log_domain_unregister(_log_domain);
|
||||
_log_domain = -1;
|
||||
|
||||
elm_shutdown();
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include "private.h"
|
||||
|
||||
#include <Elementary.h>
|
||||
#include <Emotion.h>
|
||||
#include "media.h"
|
||||
|
@ -343,9 +345,9 @@ _cb_mov_progress(void *data, Evas_Object *obj, void *event)
|
|||
{
|
||||
Media *sd = evas_object_smart_data_get(data);
|
||||
if (!sd) return;
|
||||
printf("progress: '%s' '%3.3f\n",
|
||||
emotion_object_progress_info_get(sd->o_img),
|
||||
emotion_object_progress_status_get(sd->o_img));
|
||||
DBG("progress: '%s' '%3.3f",
|
||||
emotion_object_progress_info_get(sd->o_img),
|
||||
emotion_object_progress_status_get(sd->o_img));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -353,9 +355,9 @@ _cb_mov_ref(void *data, Evas_Object *obj, void *event)
|
|||
{
|
||||
Media *sd = evas_object_smart_data_get(data);
|
||||
if (!sd) return;
|
||||
printf("ref: '%s' num '%i'\n",
|
||||
emotion_object_ref_file_get(sd->o_img),
|
||||
emotion_object_ref_num_get(sd->o_img));
|
||||
DBG("ref: '%s' num '%i'",
|
||||
emotion_object_ref_file_get(sd->o_img),
|
||||
emotion_object_ref_num_get(sd->o_img));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -381,7 +383,7 @@ _type_mov_init(Evas_Object *obj)
|
|||
mod = modules[config->vidmod];
|
||||
if (!emotion_object_init(o, mod))
|
||||
{
|
||||
printf("can't init emotion module '%s'\n", mod);
|
||||
ERR("can't init emotion module '%s'", mod);
|
||||
evas_object_del(sd->o_img);
|
||||
sd->o_img = NULL;
|
||||
return;
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "terminology_config.h"
|
||||
#endif
|
||||
|
||||
extern int _log_domain;
|
||||
|
||||
#define CRITICAL(...) EINA_LOG_DOM_CRIT(_log_domain, __VA_ARGS__)
|
||||
#define ERR(...) EINA_LOG_DOM_ERR(_log_domain, __VA_ARGS__)
|
||||
#define WRN(...) EINA_LOG_DOM_WARN(_log_domain, __VA_ARGS__)
|
||||
#define INF(...) EINA_LOG_DOM_INFO(_log_domain, __VA_ARGS__)
|
||||
#define DBG(...) EINA_LOG_DOM_DBG(_log_domain, __VA_ARGS__)
|
||||
|
|
|
@ -8,16 +8,6 @@
|
|||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//#define DBG(f, args...) printf(f, ##args)
|
||||
#define DBG(f, args...) do {} while (0)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//#define INF(f, args...) printf("==INF: "f, ##args)
|
||||
#define INF(f, args...) do {} while (0)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
#define ERR(f, args...) printf("######ERR: "f, ##args)
|
||||
//#define ERR(f, args...) do {} while (0)
|
||||
|
||||
static void
|
||||
_text_clear(Termpty *ty, Termcell *cells, int count, int val, Eina_Bool inherit_att)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue