raster pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=16402da20a481ff0c15ee6c9123f2687486b0637

commit 16402da20a481ff0c15ee6c9123f2687486b0637
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Fri Apr 3 19:50:16 2015 +0900

    fix terminology popup handling to work again
    
    popup handling was broken when adding url head checking. it ALWAYS
    used the external helpder path regardless of config requesting to
    handle internally if possible. this fixes that.
    
    @fix
---
 src/bin/win.c | 58 +++++++++++++++++++++++++++-------------------------------
 1 file changed, 27 insertions(+), 31 deletions(-)

diff --git a/src/bin/win.c b/src/bin/win.c
index 0446efc..9dfe5ba 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -1698,45 +1698,41 @@ _popmedia(Term *term, const char *src)
    Media_Type type;
    Config *config = termio_config_get(term->termio);
 
-#ifdef HAVE_ECORE_CON_URL_HEAD
-   Ty_Http_Head *ty_head = calloc(1, sizeof(Ty_Http_Head));
-   if (!ty_head)
-     return;
-
-   if (config->helper.local.general && config->helper.local.general[0])
+   type = media_src_type_get(src);
+   if (type == MEDIA_TYPE_UNKNOWN)
      {
-        ty_head->handler = eina_stringshare_add(config->helper.local.general);
-        if (!ty_head->handler)
-          goto error;
-     }
-   ty_head->src = eina_stringshare_add(src);
-   if (!ty_head->src)
-     goto error;
-   ty_head->url = ecore_con_url_new(src);
-   if (!ty_head->url)
-     goto error;
-   if (!ecore_con_url_head(ty_head->url))
-     goto error;
-   ty_head->url_complete = ecore_event_handler_add
-      (ECORE_CON_EVENT_URL_COMPLETE, _media_http_head_complete, ty_head);
-   if (!ty_head->url_complete)
-     goto error;
-   ty_head->term = term;
-   edje_object_signal_emit(term->bg, "busy", "terminology");
-   term_ref(term);
+#ifdef HAVE_ECORE_CON_URL_HEAD
+        Ty_Http_Head *ty_head = calloc(1, sizeof(Ty_Http_Head));
+        if (!ty_head) return;
 
-   return;
+        if (config->helper.local.general && config->helper.local.general[0])
+          {
+             ty_head->handler = 
eina_stringshare_add(config->helper.local.general);
+             if (!ty_head->handler) goto error;
+          }
+        ty_head->src = eina_stringshare_add(src);
+        if (!ty_head->src) goto error;
+        ty_head->url = ecore_con_url_new(src);
+        if (!ty_head->url) goto error;
+        if (!ecore_con_url_head(ty_head->url)) goto error;
+        ty_head->url_complete = ecore_event_handler_add
+          (ECORE_CON_EVENT_URL_COMPLETE, _media_http_head_complete, ty_head);
+        if (!ty_head->url_complete) goto error;
+        ty_head->term = term;
+        edje_object_signal_emit(term->bg, "busy", "terminology");
+        term_ref(term);
+        return;
 
 error:
-   _ty_http_head_delete(ty_head);
+        _ty_http_head_delete(ty_head);
 #endif
 
-   type = media_src_type_get(src);
-   if (type == MEDIA_TYPE_UNKNOWN) {
         media_unknown_handle(config->helper.local.general, src);
-   } else {
+     }
+   else
+     {
         _popmedia_show(term, src, type);
-   }
+     }
 }
 
 

-- 


Reply via email to