use Media_Type instead of int

terminology-1.3
Boris Faure 5 years ago
parent 460c516db9
commit dccd1dec39
  1. 9
      src/bin/termio.c
  2. 3
      src/bin/termpty.h

@ -780,7 +780,6 @@ _activate_link(Evas_Object *obj, Eina_Bool may_inline)
char buf[PATH_MAX], *s, *escaped;
const char *path = NULL, *cmd = NULL;
Eina_Bool url = EINA_FALSE, email = EINA_FALSE, handled = EINA_FALSE;
int type;
EINA_SAFETY_ON_NULL_RETURN(sd);
config = sd->config;
@ -837,7 +836,7 @@ _activate_link(Evas_Object *obj, Eina_Bool may_inline)
escaped = ecore_file_escape_name(s);
if (escaped)
{
type = media_src_type_get(sd->link.string);
Media_Type type = media_src_type_get(sd->link.string);
if (may_inline && _should_inline(obj))
{
if ((type == MEDIA_TYPE_IMG) ||
@ -888,7 +887,7 @@ _activate_link(Evas_Object *obj, Eina_Bool may_inline)
escaped = ecore_file_escape_name(s);
if (escaped)
{
type = media_src_type_get(sd->link.string);
Media_Type type = media_src_type_get(sd->link.string);
if (may_inline && _should_inline(obj))
{
evas_object_smart_callback_call(obj, "popup", NULL);
@ -1056,7 +1055,7 @@ _cb_link_down(void *data,
if (sd->config->helper.inline_please)
{
int type = media_src_type_get(sd->link.string);
Media_Type type = media_src_type_get(sd->link.string);
if ((type == MEDIA_TYPE_IMG) ||
(type == MEDIA_TYPE_SCALE) ||
@ -1353,7 +1352,7 @@ _smart_media_clicked(void *data, Evas_Object *obj, void *_info EINA_UNUSED)
{
if (blk->link)
{
int type = media_src_type_get(blk->link);
Media_Type type = media_src_type_get(blk->link);
Config *config = termio_config_get(data);
if (config)

@ -2,6 +2,7 @@
#define _TERMPTY_H__ 1
#include "config.h"
#include "media.h"
typedef struct _Termpty Termpty;
typedef struct _Termcell Termcell;
@ -210,7 +211,7 @@ struct _Termblock
Evas_Object *obj;
Eina_List *cmds;
int id;
int type;
Media_Type type;
int refs;
short w, h;
short x, y;

Loading…
Cancel
Save