remove compatibility #ifs to work with EFL < 1.16

terminology-1.2
Boris Faure 5 years ago
parent e8214d1da2
commit dad9e0db58
  1. 36
      data/themes/default.edc
  2. 10
      data/themes/mild.edc
  3. 19
      src/bin/media.c
  4. 15
      src/bin/termio.c
  5. 6
      src/bin/termpty.c
  6. 8
      src/bin/termptyesc.c
  7. 6
      src/bin/tyfuzz.c
  8. 11
      src/bin/win.c

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

@ -217,11 +217,7 @@ collections {
}
program {
signal: "bell,ring"; source: "terminology";
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "bell" 1.0 ALERT;
#else
action: PLAY_SAMPLE "bell" 1.0;
#endif
}
program {
signal: "bell";
@ -1658,15 +1654,9 @@ collections {
program {
signal: "key,down"; source: "terminology";
script {
#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 8)
new buf[32];
snprintf(buf, 31, "key-down%i", (rand() % 5) + 1);
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";

@ -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)
{

@ -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,

@ -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)) &&

@ -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

@ -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)) &&

@ -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);

Loading…
Cancel
Save