billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=6762578ace9a7a036636aeb28710c925ddf07dc1

commit 6762578ace9a7a036636aeb28710c925ddf07dc1
Author: Boris Faure <[email protected]>
Date:   Sun Feb 15 18:03:40 2015 +0100

    do only once ecore_con_(url_)init/shutdown()
---
 src/bin/main.c  |  6 ++++++
 src/bin/media.c | 10 ----------
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/bin/main.c b/src/bin/main.c
index d6cbb11..9bd6484 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -922,8 +922,14 @@ remote:
 
    ty_dbus_init();
 
+   ecore_con_init();
+   ecore_con_url_init();
+
    elm_run();
 
+   ecore_con_url_shutdown();
+   ecore_con_shutdown();
+
    ty_dbus_shutdown();
    config = NULL;
  end:
diff --git a/src/bin/media.c b/src/bin/media.c
index 651548b..c0bfc26 100644
--- a/src/bin/media.c
+++ b/src/bin/media.c
@@ -866,8 +866,6 @@ _smart_del(Evas_Object *obj)
         ecore_event_handler_del(sd->url_prog_hand);
         ecore_event_handler_del(sd->url_compl_hand);
         ecore_con_url_free(sd->url);
-        ecore_con_url_shutdown();
-        ecore_con_shutdown();
      }
    sd->url = NULL;
    sd->url_prog_hand = NULL;
@@ -1055,8 +1053,6 @@ _url_compl_cb(void *data, int type EINA_UNUSED, void 
*event_info)
    ecore_event_handler_del(sd->url_prog_hand);
    ecore_event_handler_del(sd->url_compl_hand);
    ecore_con_url_free(sd->url);
-   ecore_con_url_shutdown();
-   ecore_con_shutdown();
    sd->url = NULL;
    sd->url_prog_hand = NULL;
    sd->url_compl_hand = NULL;
@@ -1210,15 +1206,11 @@ media_add(Evas_Object *parent, const char *src, const 
Config *config, int mode,
              sd->tmpfd = mkstemps(buf, strlen(sd->ext));
              if (sd->tmpfd >= 0)
                {
-                  ecore_con_init();
-                  ecore_con_url_init();
                   sd->url = ecore_con_url_new(tbuf);
                   if (!sd->url)
                     {
                        unlink(buf);
                        close(sd->tmpfd);
-                       ecore_con_url_shutdown();
-                       ecore_con_shutdown();
                     }
                   else
                     {
@@ -1227,8 +1219,6 @@ media_add(Evas_Object *parent, const char *src, const 
Config *config, int mode,
                          {
                             unlink(buf);
                             close(sd->tmpfd);
-                            ecore_con_url_shutdown();
-                            ecore_con_shutdown();
                             sd->url = NULL;
                          }
                        else

-- 


Reply via email to