From 1d12801c6f46f92ffc9c58044c2eed0ab6b906e4 Mon Sep 17 00:00:00 2001 From: Bruno Dilly Date: Wed, 22 Aug 2012 20:01:30 +0000 Subject: [PATCH] ephoto: Register log domain first SVN revision: 75559 --- src/bin/ephoto.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/bin/ephoto.c b/src/bin/ephoto.c index b0b5cdc..3bf301e 100644 --- a/src/bin/ephoto.c +++ b/src/bin/ephoto.c @@ -29,28 +29,29 @@ elm_main(int argc, char **argv) elm_need_ethumb(); elm_init(argc, argv); + __log_domain = eina_log_domain_register("ephoto", EINA_COLOR_ORANGE); + if (!__log_domain) + { + EINA_LOG_ERR("Could not register log domain: Ephoto"); + r = 1; + goto end_log_domain; + } + elm_theme_extension_add(NULL, PACKAGE_DATA_DIR"/themes/default/ephoto.edj"); if (!efreet_mime_init()) - fprintf(stderr, "Could not init efreet_mime!\n"); + ERR("Could not init efreet_mime!"); client = elm_thumb_ethumb_client_get(); if (!client) { ERR("could not get ethumb_client"); r = 1; - goto end_log_domain; + goto end; } ethumb_client_crop_align_set(client, 0.5, 0.5); ethumb_client_aspect_set(client, ETHUMB_THUMB_CROP); ethumb_client_orientation_set(client, ETHUMB_THUMB_ORIENT_ORIGINAL); - __log_domain = eina_log_domain_register("ephoto", EINA_COLOR_ORANGE); - if (!__log_domain) - { - EINA_LOG_ERR("Could not register log domain: Ephoto"); - r = 1; - goto end_log_domain; - } elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); @@ -99,8 +100,8 @@ elm_main(int argc, char **argv) end: eina_log_domain_unregister(__log_domain); - end_log_domain: efreet_mime_shutdown(); + end_log_domain: elm_shutdown(); eio_shutdown();