remove compatibility #ifs to work with EFL < 1.16

This commit is contained in:
Boris Faure 2018-03-13 18:58:41 +01:00
parent e8214d1da2
commit dad9e0db58
8 changed files with 6 additions and 105 deletions

View File

@ -1212,12 +1212,10 @@ collections {
target: "shine_unfocused"; target: "shine_unfocused";
target: "shine_focused"; target: "shine_focused";
after: "focus_in2"; after: "focus_in2";
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
sequence { sequence {
action: STATE_SET "custom" 0.0; action: STATE_SET "custom" 0.0;
target: "shine_focused"; target: "shine_focused";
} }
#endif
} }
program { program {
signal: "focused,set"; source: "terminology"; signal: "focused,set"; source: "terminology";
@ -1225,7 +1223,6 @@ collections {
target: "glint"; target: "glint";
target: "shine_focused"; target: "shine_focused";
target: "shine_unfocused"; target: "shine_unfocused";
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
sequence { sequence {
action: STATE_SET "focused2" 0.0; action: STATE_SET "focused2" 0.0;
target: "glow"; target: "glow";
@ -1234,7 +1231,6 @@ collections {
action: STATE_SET "custom" 0.0; action: STATE_SET "custom" 0.0;
target: "shine_focused"; target: "shine_focused";
} }
#endif
} }
program { name: "focus_in2"; program { name: "focus_in2";
action: STATE_SET "focused2" 0.0; action: STATE_SET "focused2" 0.0;
@ -1248,7 +1244,6 @@ collections {
target: "glow"; target: "glow";
target: "shine_focused"; target: "shine_focused";
target: "shine_unfocused"; target: "shine_unfocused";
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
sequence { sequence {
action: STATE_SET "focused2" 0.0; action: STATE_SET "focused2" 0.0;
target: "glow"; target: "glow";
@ -1257,7 +1252,6 @@ collections {
action: STATE_SET "custom" 0.0; action: STATE_SET "custom" 0.0;
target: "shine_unfocused"; target: "shine_unfocused";
} }
#endif
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -1578,11 +1572,7 @@ collections {
} }
program { program {
signal: "bell,ring"; source: "terminology"; signal: "bell,ring"; source: "terminology";
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "bell" 1.0 ALERT; action: PLAY_SAMPLE "bell" 1.0 ALERT;
#else
action: PLAY_SAMPLE "bell" 1.0;
#endif
} }
program { program {
signal: "bell"; source: "terminology"; signal: "bell"; source: "terminology";
@ -3583,51 +3573,25 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
program { program {
signal: "key,down"; source: "terminology"; signal: "key,down"; source: "terminology";
script { script {
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 8)
new buf[32]; new buf[32];
snprintf(buf, 31, "key-down%i", (rand() % 5) + 1); snprintf(buf, 31, "key-down%i", (rand() % 5) + 1);
run_program(get_program_id(buf)); run_program(get_program_id(buf));
#else
run_program(PROGRAM:"key-down4"); // chosen by a fair dice roll
// guaranteed to be random.
// http://xkcd.com/221/
#endif
} }
} }
program { name: "key-down1"; program { name: "key-down1";
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "key-tap1" 1.0 INPUT; action: PLAY_SAMPLE "key-tap1" 1.0 INPUT;
#else
action: PLAY_SAMPLE "key-tap1" 1.0;
#endif
} }
program { name: "key-down2"; program { name: "key-down2";
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "key-tap2" 1.0 INPUT; action: PLAY_SAMPLE "key-tap2" 1.0 INPUT;
#else
action: PLAY_SAMPLE "key-tap2" 1.0;
#endif
} }
program { name: "key-down3"; program { name: "key-down3";
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "key-tap3" 1.0 INPUT; action: PLAY_SAMPLE "key-tap3" 1.0 INPUT;
#else
action: PLAY_SAMPLE "key-tap3" 1.0;
#endif
} }
program { name: "key-down4"; program { name: "key-down4";
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "key-tap4" 1.0 INPUT; action: PLAY_SAMPLE "key-tap4" 1.0 INPUT;
#else
action: PLAY_SAMPLE "key-tap4" 1.0;
#endif
} }
program { name: "key-down5"; program { name: "key-down5";
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "key-tap5" 1.0 INPUT; action: PLAY_SAMPLE "key-tap5" 1.0 INPUT;
#else
action: PLAY_SAMPLE "key-tap5" 1.0;
#endif
} }
program { program {
signal: "key,down"; source: "terminology"; signal: "key,down"; source: "terminology";

View File

@ -217,11 +217,7 @@ collections {
} }
program { program {
signal: "bell,ring"; source: "terminology"; signal: "bell,ring"; source: "terminology";
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "bell" 1.0 ALERT; action: PLAY_SAMPLE "bell" 1.0 ALERT;
#else
action: PLAY_SAMPLE "bell" 1.0;
#endif
} }
program { program {
signal: "bell"; signal: "bell";
@ -1658,15 +1654,9 @@ collections {
program { program {
signal: "key,down"; source: "terminology"; signal: "key,down"; source: "terminology";
script { script {
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 8)
new buf[32]; new buf[32];
snprintf(buf, 31, "key-down%i", (rand() % 5) + 1); snprintf(buf, 31, "key-down%i", (rand() % 5) + 1);
run_program(get_program_id(buf)); run_program(get_program_id(buf));
#else
run_program(PROGRAM:"key-down4"); // chosen by a fair dice roll
// guaranteed to be random.
// http://xkcd.com/221/
#endif
} }
} }
program { name: "key-down1"; program { name: "key-down1";

View File

@ -1351,25 +1351,8 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode,
} }
#endif #endif
#if (ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 13)
if (!sd->url) if (!sd->url)
{ sd->realf = eina_stringshare_add(sd->src);
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
if ((mode & MEDIA_SIZE_MASK) == MEDIA_THUMB) if ((mode & MEDIA_SIZE_MASK) == MEDIA_THUMB)
{ {

View File

@ -1092,7 +1092,6 @@ _cb_link_up(void *data,
} }
} }
#if !((ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8))
static void static void
_cb_link_drag_move(void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y, Elm_Xdnd_Action action) _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; *yoff = 0;
return icon; return icon;
} }
#endif
static void static void
_cb_link_move(void *data, _cb_link_move(void *data,
Evas *_e EINA_UNUSED, Evas *_e EINA_UNUSED,
Evas_Object *obj Evas_Object *obj,
#if ((ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8)) void *event)
EINA_UNUSED
#endif
, void *event)
{ {
Evas_Event_Mouse_Move *ev = event; Evas_Event_Mouse_Move *ev = event;
Termio *sd = evas_object_smart_data_get(data); 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.down = EINA_FALSE;
sd->link.down.dnd = EINA_TRUE; sd->link.down.dnd = EINA_TRUE;
#if !((ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8))
DBG("dnd start %s %i %i", sd->link.string, DBG("dnd start %s %i %i", sd->link.string,
evas_key_modifier_is_set(ev->modifiers, "Control"), evas_key_modifier_is_set(ev->modifiers, "Control"),
evas_key_modifier_is_set(ev->modifiers, "Shift")); evas_key_modifier_is_set(ev->modifiers, "Shift"));
@ -1194,7 +1188,6 @@ _cb_link_move(void *data,
_cb_link_drag_done, data); _cb_link_drag_done, data);
sd->link.down.dndobj = obj; sd->link.down.dndobj = obj;
sd->link.down.dndobjdel = EINA_FALSE; 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); evas_object_smart_callback_call(obj, "command", (void *)ty->cur_cmd);
} }
#if !((ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8))
static void static void
_smart_cb_drag_enter(void *_data EINA_UNUSED, Evas_Object *_o EINA_UNUSED) _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); termpty_write(sd->pty, ev->data, ev->len);
return EINA_TRUE; return EINA_TRUE;
} }
#endif
/* }}} */ /* }}} */
@ -6053,14 +6044,12 @@ termio_add(Evas_Object *win, Config *config,
ELM_GESTURE_STATE_ABORT, _smart_cb_gest_zoom_abort, ELM_GESTURE_STATE_ABORT, _smart_cb_gest_zoom_abort,
obj); obj);
#if !((ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8))
elm_drop_target_add(sd->event, elm_drop_target_add(sd->event,
ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_IMAGE, ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_IMAGE,
_smart_cb_drag_enter, obj, _smart_cb_drag_enter, obj,
_smart_cb_drag_leave, obj, _smart_cb_drag_leave, obj,
_smart_cb_drag_pos, obj, _smart_cb_drag_pos, obj,
_smart_cb_drop, obj); _smart_cb_drop, obj);
#endif
sd->pty = termpty_new(cmd, login_shell, cd, w, h, config->scrollback, sd->pty = termpty_new(cmd, login_shell, cd, w, h, config->scrollback,
config->xterm_256color, config->erase_is_del, mod, config->xterm_256color, config->erase_is_del, mod,

View File

@ -300,15 +300,9 @@ _fd_read_do(Termpty *ty, Ecore_Fd_Handler *fd_handler, Eina_Bool false_on_empty)
if (buf[i]) if (buf[i])
{ {
#if (EINA_VERSION_MAJOR > 1) || (EINA_VERSION_MINOR >= 8)
g = eina_unicode_utf8_next_get(buf, &i); g = eina_unicode_utf8_next_get(buf, &i);
if ((0xdc80 <= g) && (g <= 0xdcff) && if ((0xdc80 <= g) && (g <= 0xdcff) &&
(len - prev_i) <= (int)sizeof(ty->oldbuf)) (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; for (k = 0;
(k < (int)sizeof(ty->oldbuf)) && (k < (int)sizeof(ty->oldbuf)) &&

View File

@ -1748,13 +1748,8 @@ _handle_xterm_50_command(Termpty *ty,
static void static void
_handle_xterm_777_command(Termpty *_ty EINA_UNUSED, _handle_xterm_777_command(Termpty *_ty EINA_UNUSED,
char *s char *s, int _len EINA_UNUSED)
#if ((ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 8))
EINA_UNUSED
#endif
, int _len EINA_UNUSED)
{ {
#if (ELM_VERSION_MAJOR > 1) || (ELM_VERSION_MINOR >= 8)
char *cmd_end = NULL, char *cmd_end = NULL,
*title = NULL, *title = NULL,
*title_end = NULL, *title_end = NULL,
@ -1790,7 +1785,6 @@ _handle_xterm_777_command(Termpty *_ty EINA_UNUSED,
NULL, NULL); NULL, NULL);
*cmd_end = ';'; *cmd_end = ';';
*title_end = ';'; *title_end = ';';
#endif
} }
static int static int

View File

@ -138,15 +138,9 @@ main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
if (buf[i]) if (buf[i])
{ {
#if (EINA_VERSION_MAJOR > 1) || (EINA_VERSION_MINOR >= 8)
g = eina_unicode_utf8_next_get(buf, &i); g = eina_unicode_utf8_next_get(buf, &i);
if ((0xdc80 <= g) && (g <= 0xdcff) && if ((0xdc80 <= g) && (g <= 0xdcff) &&
(len - prev_i) <= (int)sizeof(ty.oldbuf)) (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; for (k = 0;
(k < (int)sizeof(ty.oldbuf)) && (k < (int)sizeof(ty.oldbuf)) &&

View File

@ -58,13 +58,8 @@ int _win_log_dom = -1;
#define INF(...) EINA_LOG_DOM_INFO(_win_log_dom, __VA_ARGS__) #define INF(...) EINA_LOG_DOM_INFO(_win_log_dom, __VA_ARGS__)
#define DBG(...) EINA_LOG_DOM_DBG(_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 "top"
#define PANES_TOP "left" #define PANES_BOTTOM "bottom"
#define PANES_BOTTOM "right"
#else
#define PANES_TOP "top"
#define PANES_BOTTOM "bottom"
#endif
/* {{{ Structs */ /* {{{ Structs */
@ -2689,9 +2684,7 @@ _tabs_restore(Tabs *tabs)
{ {
if (term->unswallowed) if (term->unswallowed)
{ {
#if (EVAS_VERSION_MAJOR > 1) || (EVAS_VERSION_MINOR >= 8)
evas_object_image_source_visible_set(term->sel, EINA_TRUE); evas_object_image_source_visible_set(term->sel, EINA_TRUE);
#endif
edje_object_part_swallow(term->bg, "terminology.content", term->base); edje_object_part_swallow(term->bg, "terminology.content", term->base);
term->unswallowed = EINA_FALSE; term->unswallowed = EINA_FALSE;
evas_object_show(term->base); evas_object_show(term->base);