gravatar: also with hyperlinks starting with "mailto:"
This commit is contained in:
parent
0a6589ca31
commit
1b909cb569
|
@ -7,6 +7,7 @@
|
||||||
#include "termio.h"
|
#include "termio.h"
|
||||||
#include "media.h"
|
#include "media.h"
|
||||||
#include "md5/md5.h"
|
#include "md5/md5.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
/* specific log domain to help debug the gravatar module */
|
/* specific log domain to help debug the gravatar module */
|
||||||
int _gravatar_log_dom = -1;
|
int _gravatar_log_dom = -1;
|
||||||
|
@ -76,6 +77,9 @@ gravatar_tooltip(Evas_Object *obj, const Config *config, const char *email)
|
||||||
return;
|
return;
|
||||||
g->config = config;
|
g->config = config;
|
||||||
|
|
||||||
|
if (casestartswith(email, "mailto:"))
|
||||||
|
email += strlen("mailto:");
|
||||||
|
|
||||||
len = strlen(email);
|
len = strlen(email);
|
||||||
str = strndup(email, len);
|
str = strndup(email, len);
|
||||||
if (!str)
|
if (!str)
|
||||||
|
|
|
@ -1417,12 +1417,13 @@ _hyperlink_end(Termio *sd,
|
||||||
popup_exists = main_term_popup_exists(sd->term);
|
popup_exists = main_term_popup_exists(sd->term);
|
||||||
if (!popup_exists && add_tooltip)
|
if (!popup_exists && add_tooltip)
|
||||||
{
|
{
|
||||||
|
/* display tooltip */
|
||||||
|
elm_object_tooltip_text_set(o, hl->url);
|
||||||
|
|
||||||
if (link_is_email(hl->url))
|
if (link_is_email(hl->url))
|
||||||
{
|
{
|
||||||
gravatar_tooltip(o, sd->config, hl->url);
|
gravatar_tooltip(o, sd->config, hl->url);
|
||||||
}
|
}
|
||||||
/* display tooltip */
|
|
||||||
elm_object_tooltip_text_set(o, hl->url);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue