move adding of events if entry only if entry part exists.

SVN revision: 41103
This commit is contained in:
Carsten Haitzler 2009-06-18 14:01:26 +00:00
parent 5d0a773fef
commit 02fef22de9
3 changed files with 16 additions and 3 deletions

View File

@ -1541,6 +1541,10 @@ _edje_entry_init(Edje *ed)
void void
_edje_entry_shutdown(Edje *ed) _edje_entry_shutdown(Edje *ed)
{ {
evas_object_event_callback_del(ed->obj, EVAS_CALLBACK_FOCUS_IN, _edje_focus_in_cb);
evas_object_event_callback_del(ed->obj, EVAS_CALLBACK_FOCUS_OUT, _edje_focus_out_cb);
evas_object_event_callback_del(ed->obj, EVAS_CALLBACK_KEY_DOWN, _edje_key_down_cb);
evas_object_event_callback_del(ed->obj, EVAS_CALLBACK_KEY_UP, _edje_key_up_cb);
} }
void void

View File

@ -281,6 +281,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
Eina_List *parts = NULL; Eina_List *parts = NULL;
Eina_List *old_swallows; Eina_List *old_swallows;
int group_path_started = 0; int group_path_started = 0;
int entries = 0;
ed = _edje_fetch(obj); ed = _edje_fetch(obj);
if (!ed) return 0; if (!ed) return 0;
@ -290,6 +291,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
(ed->group) && (!strcmp(group, ed->group))) (ed->group) && (!strcmp(group, ed->group)))
return 1; return 1;
//**//
_edje_entry_shutdown(ed);
old_swallows = _edje_swallows_collect(ed); old_swallows = _edje_swallows_collect(ed);
if (_edje_script_only(ed)) _edje_script_only_shutdown(ed); if (_edje_script_only(ed)) _edje_script_only_shutdown(ed);
@ -480,7 +483,10 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
if (rp->param1.description->text.id_text_source >= 0) if (rp->param1.description->text.id_text_source >= 0)
rp->text.text_source = ed->table_parts[rp->param1.description->text.id_text_source % ed->table_parts_size]; rp->text.text_source = ed->table_parts[rp->param1.description->text.id_text_source % ed->table_parts_size];
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
_edje_entry_real_part_init(rp); {
_edje_entry_real_part_init(rp);
entries++;
}
} }
} }
@ -707,11 +713,14 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
} }
} }
} }
//**//
if (entries > 0) _edje_entry_init(ed);
return 1; return 1;
} }
else else
return 0; return 0;
ed->load_error = EDJE_LOAD_ERROR_NONE; ed->load_error = EDJE_LOAD_ERROR_NONE;
if (entries > 0) _edje_entry_init(ed);
return 1; return 1;
} }

View File

@ -68,7 +68,7 @@ _edje_smart_add(Evas_Object *obj)
evas_object_geometry_get(obj, &(ed->x), &(ed->y), &(ed->w), &(ed->h)); evas_object_geometry_get(obj, &(ed->x), &(ed->y), &(ed->w), &(ed->h));
ed->obj = obj; ed->obj = obj;
_edje_edjes = eina_list_append(_edje_edjes, obj); _edje_edjes = eina_list_append(_edje_edjes, obj);
_edje_entry_init(ed); //**// _edje_entry_init(ed);
/* /*
{ {
Eina_List *l; Eina_List *l;
@ -93,7 +93,7 @@ _edje_smart_del(Evas_Object * obj)
ed = evas_object_smart_data_get(obj); ed = evas_object_smart_data_get(obj);
if (!ed) return; if (!ed) return;
_edje_block_violate(ed); _edje_block_violate(ed);
_edje_entry_shutdown(ed); //**// _edje_entry_shutdown(ed);
ed->delete_me = 1; ed->delete_me = 1;
_edje_clean_objects(ed); _edje_clean_objects(ed);
_edje_edjes = eina_list_remove(_edje_edjes, obj); _edje_edjes = eina_list_remove(_edje_edjes, obj);