aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-03-13 18:58:41 +0100
committerBoris Faure <billiob@gmail.com>2018-03-13 18:58:41 +0100
commitdad9e0db58856f1ce392fe1899710c766d7aacc4 (patch)
tree4a28c81e666954cd071c9a02e3d7073bdc85955a /src
parenttabs: on tab selector, be sure only one tab is focused (diff)
downloadterminology-dad9e0db58856f1ce392fe1899710c766d7aacc4.tar.gz
remove compatibility #ifs to work with EFL < 1.16
Diffstat (limited to 'src')
-rw-r--r--src/bin/media.c19
-rw-r--r--src/bin/termio.c15
-rw-r--r--src/bin/termpty.c6
-rw-r--r--src/bin/termptyesc.c8
-rw-r--r--src/bin/tyfuzz.c6
-rw-r--r--src/bin/win.c11
6 files changed, 6 insertions, 59 deletions
diff --git a/src/bin/media.c b/src/bin/media.c
index e1af48b..29381a0 100644
--- a/src/bin/media.c
+++ b/src/bin/media.c
@@ -1351,25 +1351,8 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode,
}
#endif
-#if (ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 13)
if (!sd->url)
- {
- Efreet_Uri *uri;
- const char *file_path = eina_stringshare_printf("file://%s", sd->src);
- uri = efreet_uri_decode(file_path);
- eina_stringshare_del(file_path);
- if (!uri)
- {
- ERR("can not decode '%s'", sd->src);
- goto err;
- }
- sd->realf = uri->path;
- eina_stringshare_ref(sd->realf);
- efreet_uri_free(uri);
- }
-#else
- if (!sd->url) sd->realf = eina_stringshare_add(sd->src);
-#endif
+ sd->realf = eina_stringshare_add(sd->src);
if ((mode & MEDIA_SIZE_MASK) == MEDIA_THUMB)
{
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 3606751..cc28028 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -1092,7 +1092,6 @@ _cb_link_up(void *data,
}
}
-#if !((ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8))
static void
_cb_link_drag_move(void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y, Elm_Xdnd_Action action)
{
@@ -1148,16 +1147,12 @@ _cb_link_icon_new(void *data, Evas_Object *par, Evas_Coord *xoff, Evas_Coord *yo
*yoff = 0;
return icon;
}
-#endif
static void
_cb_link_move(void *data,
Evas *_e EINA_UNUSED,
- Evas_Object *obj
-#if ((ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8))
- EINA_UNUSED
-#endif
- , void *event)
+ Evas_Object *obj,
+ void *event)
{
Evas_Event_Mouse_Move *ev = event;
Termio *sd = evas_object_smart_data_get(data);
@@ -1174,7 +1169,6 @@ _cb_link_move(void *data,
{
sd->link.down.down = EINA_FALSE;
sd->link.down.dnd = EINA_TRUE;
-#if !((ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8))
DBG("dnd start %s %i %i", sd->link.string,
evas_key_modifier_is_set(ev->modifiers, "Control"),
evas_key_modifier_is_set(ev->modifiers, "Shift"));
@@ -1194,7 +1188,6 @@ _cb_link_move(void *data,
_cb_link_drag_done, data);
sd->link.down.dndobj = obj;
sd->link.down.dndobjdel = EINA_FALSE;
-#endif
}
}
@@ -5916,7 +5909,6 @@ _smart_pty_command(void *data)
evas_object_smart_callback_call(obj, "command", (void *)ty->cur_cmd);
}
-#if !((ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8))
static void
_smart_cb_drag_enter(void *_data EINA_UNUSED, Evas_Object *_o EINA_UNUSED)
{
@@ -5993,7 +5985,6 @@ _smart_cb_drop(void *data,
termpty_write(sd->pty, ev->data, ev->len);
return EINA_TRUE;
}
-#endif
/* }}} */
@@ -6053,14 +6044,12 @@ termio_add(Evas_Object *win, Config *config,
ELM_GESTURE_STATE_ABORT, _smart_cb_gest_zoom_abort,
obj);
-#if !((ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8))
elm_drop_target_add(sd->event,
ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_IMAGE,
_smart_cb_drag_enter, obj,
_smart_cb_drag_leave, obj,
_smart_cb_drag_pos, obj,
_smart_cb_drop, obj);
-#endif
sd->pty = termpty_new(cmd, login_shell, cd, w, h, config->scrollback,
config->xterm_256color, config->erase_is_del, mod,
diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index e857676..a3e5f58 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -300,15 +300,9 @@ _fd_read_do(Termpty *ty, Ecore_Fd_Handler *fd_handler, Eina_Bool false_on_empty)
if (buf[i])
{
-#if (EINA_VERSION_MAJOR > 1) || (EINA_VERSION_MINOR >= 8)
g = eina_unicode_utf8_next_get(buf, &i);
if ((0xdc80 <= g) && (g <= 0xdcff) &&
(len - prev_i) <= (int)sizeof(ty->oldbuf))
-#else
- i = evas_string_char_next_get(buf, i, &g);
- if (i < 0 &&
- (len - prev_i) <= (int)sizeof(ty->oldbuf))
-#endif
{
for (k = 0;
(k < (int)sizeof(ty->oldbuf)) &&
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 3cc4e20..63aabe1 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -1748,13 +1748,8 @@ _handle_xterm_50_command(Termpty *ty,
static void
_handle_xterm_777_command(Termpty *_ty EINA_UNUSED,
- char *s
-#if ((ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8))
- EINA_UNUSED
-#endif
- , int _len EINA_UNUSED)
+ char *s, int _len EINA_UNUSED)
{
-#if (ELM_VERSION_MAJOR > 1) || (ELM_VERSION_MINOR >= 8)
char *cmd_end = NULL,
*title = NULL,
*title_end = NULL,
@@ -1790,7 +1785,6 @@ _handle_xterm_777_command(Termpty *_ty EINA_UNUSED,
NULL, NULL);
*cmd_end = ';';
*title_end = ';';
-#endif
}
static int
diff --git a/src/bin/tyfuzz.c b/src/bin/tyfuzz.c
index 311ed2b..b0e817e 100644
--- a/src/bin/tyfuzz.c
+++ b/src/bin/tyfuzz.c
@@ -138,15 +138,9 @@ main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
if (buf[i])
{
-#if (EINA_VERSION_MAJOR > 1) || (EINA_VERSION_MINOR >= 8)
g = eina_unicode_utf8_next_get(buf, &i);
if ((0xdc80 <= g) && (g <= 0xdcff) &&
(len - prev_i) <= (int)sizeof(ty.oldbuf))
-#else
- i = evas_string_char_next_get(buf, i, &g);
- if (i < 0 &&
- (len - prev_i) <= (int)sizeof(ty.oldbuf))
-#endif
{
for (k = 0;
(k < (int)sizeof(ty.oldbuf)) &&
diff --git a/src/bin/win.c b/src/bin/win.c
index 0223fcb..919cd2b 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -58,13 +58,8 @@ int _win_log_dom = -1;
#define INF(...) EINA_LOG_DOM_INFO(_win_log_dom, __VA_ARGS__)
#define DBG(...) EINA_LOG_DOM_DBG(_win_log_dom, __VA_ARGS__)
-#if (ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8)
- #define PANES_TOP "left"
- #define PANES_BOTTOM "right"
-#else
- #define PANES_TOP "top"
- #define PANES_BOTTOM "bottom"
-#endif
+#define PANES_TOP "top"
+#define PANES_BOTTOM "bottom"
/* {{{ Structs */
@@ -2689,9 +2684,7 @@ _tabs_restore(Tabs *tabs)
{
if (term->unswallowed)
{
-#if (EVAS_VERSION_MAJOR > 1) || (EVAS_VERSION_MINOR >= 8)
evas_object_image_source_visible_set(term->sel, EINA_TRUE);
-#endif
edje_object_part_swallow(term->bg, "terminology.content", term->base);
term->unswallowed = EINA_FALSE;
evas_object_show(term->base);