summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2020-05-01 21:40:44 +0200
committerDave Andreoli <dave@gurumeditation.it>2020-05-01 21:40:44 +0200
commit335381d6f2406e8d7b7520d9fa8fb9934ac130a7 (patch)
tree8ed86ca18eb310acb719c61f487cd933e39b1fbc
parenta5aa37c7267194ce723947ae2a392b4778036d8a (diff)
remove all ancient #ifdefs for old efl versions, we now require efl 1.24
-rw-r--r--src/e_mod_edgar.c41
1 files changed, 1 insertions, 40 deletions
diff --git a/src/e_mod_edgar.c b/src/e_mod_edgar.c
index 7f554b5..43d9229 100644
--- a/src/e_mod_edgar.c
+++ b/src/e_mod_edgar.c
@@ -28,10 +28,8 @@
28#include "efl.eo_api.h" 28#include "efl.eo_api.h"
29 29
30 30
31 31// undef this to disable bryce integration
32#ifdef EFL_VERSION_1_21
33#define EDGAR_GADGETS_DOMAIN "Edgar" 32#define EDGAR_GADGETS_DOMAIN "Edgar"
34#endif
35 33
36 34
37/* TODO: 35/* TODO:
@@ -133,14 +131,6 @@ static PyObject *edjeEdjeType;
133#define PyString_AsString PyUnicode_AsUTF8 131#define PyString_AsString PyUnicode_AsUTF8
134#endif 132#endif
135 133
136#ifndef EFL_VERSION_1_19
137 #define efl_isa eo_isa
138#endif
139
140#ifndef EFL_VERSION_1_21
141 #define EFL_UI_LAYOUT_CLASS ELM_LAYOUT_CLASS
142#endif
143
144 134
145/*****************************************************************************/ 135/*****************************************************************************/
146/***** Main stuff ***********************************************************/ 136/***** Main stuff ***********************************************************/
@@ -582,25 +572,12 @@ edgar_show_gadget_info(Edgar_Py_Gadget *gadget)
582/*****************************************************************************/ 572/*****************************************************************************/
583/***** Gadcon (old) Popup *************************************************/ 573/***** Gadcon (old) Popup *************************************************/
584/*****************************************************************************/ 574/*****************************************************************************/
585#if defined EFL_VERSION_1_19
586static void edgar_popup_del_cb(void *data, const Efl_Event *event) 575static void edgar_popup_del_cb(void *data, const Efl_Event *event)
587#elif defined EFL_VERSION_1_18
588static void edgar_popup_del_cb(void *data, const Eo_Event *event)
589#else
590static Eina_Bool edgar_popup_del_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
591#endif
592{ 576{
593#ifdef EFL_VERSION_1_18
594 Eo *obj = event->object; 577 Eo *obj = event->object;
595#endif
596 578
597 Edgar_Py_Gadget *gadget = data; 579 Edgar_Py_Gadget *gadget = data;
598
599 edgar_notify_popup_deleted(gadget, obj); 580 edgar_notify_popup_deleted(gadget, obj);
600
601#ifndef EFL_VERSION_1_18
602 return EO_CALLBACK_CONTINUE;
603#endif
604} 581}
605 582
606static E_Gadcon_Popup * 583static E_Gadcon_Popup *
@@ -610,11 +587,7 @@ edgar_popup_new(Edgar_Py_Gadget *gadget, E_Gadcon_Client *gcc)
610 Evas_Object *content; 587 Evas_Object *content;
611 588
612 // create the gadcon popup to hold the content generated by the gadget 589 // create the gadcon popup to hold the content generated by the gadget
613#if E_VERSION_MAJOR >= 19
614 popup = e_gadcon_popup_new(gcc, EINA_FALSE); 590 popup = e_gadcon_popup_new(gcc, EINA_FALSE);
615#else
616 popup = e_gadcon_popup_new(gcc);
617#endif
618 591
619 // request the popup content from the python gadget 592 // request the popup content from the python gadget
620 content = edgar_request_popup_content(gadget, popup->comp_object); 593 content = edgar_request_popup_content(gadget, popup->comp_object);
@@ -626,16 +599,8 @@ edgar_popup_new(Edgar_Py_Gadget *gadget, E_Gadcon_Client *gcc)
626 599
627 // NOTE: del cb with priority to be called before the python-efl one. 600 // NOTE: del cb with priority to be called before the python-efl one.
628 // Otherwise python-efl delete the python obj too soon 601 // Otherwise python-efl delete the python obj too soon
629#if defined EFL_VERSION_1_19
630 efl_event_callback_priority_add(content, EFL_EVENT_DEL, 602 efl_event_callback_priority_add(content, EFL_EVENT_DEL,
631 EFL_CALLBACK_PRIORITY_BEFORE, edgar_popup_del_cb, gadget); 603 EFL_CALLBACK_PRIORITY_BEFORE, edgar_popup_del_cb, gadget);
632#elif defined EFL_VERSION_1_18
633 eo_event_callback_priority_add(content, EO_EVENT_DEL,
634 EO_CALLBACK_PRIORITY_BEFORE, edgar_popup_del_cb, gadget);
635#else
636 eo_do(content, eo_event_callback_priority_add(
637 EO_EV_DEL, EO_CALLBACK_PRIORITY_BEFORE, edgar_popup_del_cb, gadget));
638#endif
639 604
640 // put the popup content in the gadcon popup and show it 605 // put the popup content in the gadcon popup and show it
641 e_gadcon_popup_content_set(popup, content); 606 e_gadcon_popup_content_set(popup, content);
@@ -663,11 +628,7 @@ edgar_mouse_down3_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
663 E_Menu *m; 628 E_Menu *m;
664 int x, y; 629 int x, y;
665 630
666#if E_VERSION_MAJOR >= 20
667 zone = e_zone_current_get(); 631 zone = e_zone_current_get();
668#else
669 zone = e_util_zone_current_get(e_manager_current_get());
670#endif
671 m = e_menu_new(); 632 m = e_menu_new();
672 633
673 E_Menu_Item *mi; 634 E_Menu_Item *mi;