static void
_entry_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
+ _ctxpopup_hide(data);
evas_object_del(data);
+ data = NULL;
}
static void
static void
_select_all(void *data, Evas_Object *obj, void *event_info)
{
- if(!ext_mod) return;
+ if((!ext_mod) || (!data)) return;
ext_mod->selectall(data,obj,event_info);
_ctxpopup_hide(obj);
static void
_select(void *data, Evas_Object *obj, void *event_info)
{
- if(!ext_mod) return;
+ if((!ext_mod) || (!data)) return;
ext_mod->select(data,obj,event_info);
_ctxpopup_hide(obj);
static void
_paste(void *data, Evas_Object *obj, void *event_info)
{
- if(!ext_mod) return;
+ if((!ext_mod) || (!data)) return;
ext_mod->paste(data,obj,event_info);
_ctxpopup_hide(obj);
static void
_cut(void *data, Evas_Object *obj, void *event_info)
{
- if(!ext_mod) return;
+ if((!ext_mod) || (!data)) return;
ext_mod->cut(data,obj,event_info);
_ctxpopup_hide(obj);
static void
_copy(void *data, Evas_Object *obj, void *event_info)
{
- if(!ext_mod) return;
+ if((!ext_mod) || (!data)) return;
ext_mod->copy(data,obj,event_info);
_ctxpopup_hide(obj);
static void
_cancel(void *data, Evas_Object *obj, void *event_info)
{
- if(!ext_mod) return;
+ if((!ext_mod) || (!data)) return;
ext_mod->cancel(data,obj,event_info);
_ctxpopup_hide(obj);
if(!ext_mod)
{
ext_mod = ELM_NEW(Elm_Entry_Extension_data);
+ if (!ext_mod) return;
elm_entry_extension_module_data_get(obj,ext_mod);
}
}
if(ext_mod)
{
+ if (ext_mod->popup)
+ {
+ evas_object_del(ext_mod->popup);
+ ext_mod->popup = NULL;
+ }
free(ext_mod);
ext_mod = NULL;
}
#ifdef HAVE_ELEMENTARY_X
int cbhm_count = _cbhm_item_count_get(obj);
#endif
- if (ext_mod->popup) evas_object_del(ext_mod->popup);
+ if (ext_mod->popup)
+ {
+ evas_object_del(ext_mod->popup);
+ ext_mod->popup = NULL;
+ }
//else elm_widget_scroll_freeze_push(obj);
top = elm_widget_top_get(obj);
if(top)
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _entry_del_cb, ext_mod->popup);
evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _entry_hide_cb, ext_mod->popup);
}
+ else
+ {
+ ext_mod->caller = NULL;
+ return;
+ }
elm_object_style_set(ext_mod->popup,"copypaste");
context_menu_orientation = edje_object_data_get