diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2015-04-03 19:50:16 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2015-04-03 19:50:16 +0900 |
commit | 16402da20a481ff0c15ee6c9123f2687486b0637 (patch) | |
tree | fa00bbd603b52e1c4badc303793f55e604b393ae /src | |
parent | 80bb25baaad295563838ddc106316d77de633d5d (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/win.c | 58 |
1 files 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) | |||
1698 | Media_Type type; | 1698 | Media_Type type; |
1699 | Config *config = termio_config_get(term->termio); | 1699 | Config *config = termio_config_get(term->termio); |
1700 | 1700 | ||
1701 | #ifdef HAVE_ECORE_CON_URL_HEAD | 1701 | type = media_src_type_get(src); |
1702 | Ty_Http_Head *ty_head = calloc(1, sizeof(Ty_Http_Head)); | 1702 | if (type == MEDIA_TYPE_UNKNOWN) |
1703 | if (!ty_head) | ||
1704 | return; | ||
1705 | |||
1706 | if (config->helper.local.general && config->helper.local.general[0]) | ||
1707 | { | 1703 | { |
1708 | ty_head->handler = eina_stringshare_add(config->helper.local.general); | 1704 | #ifdef HAVE_ECORE_CON_URL_HEAD |
1709 | if (!ty_head->handler) | 1705 | Ty_Http_Head *ty_head = calloc(1, sizeof(Ty_Http_Head)); |
1710 | goto error; | 1706 | if (!ty_head) return; |
1711 | } | ||
1712 | ty_head->src = eina_stringshare_add(src); | ||
1713 | if (!ty_head->src) | ||
1714 | goto error; | ||
1715 | ty_head->url = ecore_con_url_new(src); | ||
1716 | if (!ty_head->url) | ||
1717 | goto error; | ||
1718 | if (!ecore_con_url_head(ty_head->url)) | ||
1719 | goto error; | ||
1720 | ty_head->url_complete = ecore_event_handler_add | ||
1721 | (ECORE_CON_EVENT_URL_COMPLETE, _media_http_head_complete, ty_head); | ||
1722 | if (!ty_head->url_complete) | ||
1723 | goto error; | ||
1724 | ty_head->term = term; | ||
1725 | edje_object_signal_emit(term->bg, "busy", "terminology"); | ||
1726 | term_ref(term); | ||
1727 | 1707 | ||
1728 | return; | 1708 | if (config->helper.local.general && config->helper.local.general[0]) |
1709 | { | ||
1710 | ty_head->handler = eina_stringshare_add(config->helper.local.general); | ||
1711 | if (!ty_head->handler) goto error; | ||
1712 | } | ||
1713 | ty_head->src = eina_stringshare_add(src); | ||
1714 | if (!ty_head->src) goto error; | ||
1715 | ty_head->url = ecore_con_url_new(src); | ||
1716 | if (!ty_head->url) goto error; | ||
1717 | if (!ecore_con_url_head(ty_head->url)) goto error; | ||
1718 | ty_head->url_complete = ecore_event_handler_add | ||
1719 | (ECORE_CON_EVENT_URL_COMPLETE, _media_http_head_complete, ty_head); | ||
1720 | if (!ty_head->url_complete) goto error; | ||
1721 | ty_head->term = term; | ||
1722 | edje_object_signal_emit(term->bg, "busy", "terminology"); | ||
1723 | term_ref(term); | ||
1724 | return; | ||
1729 | 1725 | ||
1730 | error: | 1726 | error: |
1731 | _ty_http_head_delete(ty_head); | 1727 | _ty_http_head_delete(ty_head); |
1732 | #endif | 1728 | #endif |
1733 | 1729 | ||
1734 | type = media_src_type_get(src); | ||
1735 | if (type == MEDIA_TYPE_UNKNOWN) { | ||
1736 | media_unknown_handle(config->helper.local.general, src); | 1730 | media_unknown_handle(config->helper.local.general, src); |
1737 | } else { | 1731 | } |
1732 | else | ||
1733 | { | ||
1738 | _popmedia_show(term, src, type); | 1734 | _popmedia_show(term, src, type); |
1739 | } | 1735 | } |
1740 | } | 1736 | } |
1741 | 1737 | ||
1742 | 1738 | ||