A bit of theme work, some random widget fixes here and there, and fix a lot of memory problems with burn_data.

This commit is contained in:
Jaime Thomas
2009-02-26 03:30:21 +00:00
parent a3af6dd9b0
commit 0fecb5f4d3
10 changed files with 104 additions and 69 deletions

View File

@@ -848,7 +848,7 @@ ecdb_combo_expand(Evas_Object *c)
ecore_evas_geometry_get(em->main_win_ee, NULL, NULL, &w, &h);
evas_object_resize(cd->back, w, h);
evas_object_pass_events_set(cd->back, 0);
evas_object_layer_set(cd->back, evas_object_layer_get(c) + 1);
evas_object_raise(cd->back);
edje_object_signal_emit(cd->back, "ecdb,combo,back,show", "ecdb");
location = _combo_best_location(c);
@@ -889,7 +889,7 @@ ecdb_combo_expand(Evas_Object *c)
eina_iterator_free(it);
evas_object_resize(cd->popup, w, h2);
evas_object_pass_events_set(cd->popup, 0);
evas_object_layer_set(cd->popup, evas_object_layer_get(cd->back) + 1);
evas_object_raise(cd->popup);
edje_object_signal_emit(cd->popup, buf, "ecdb");
cd->expanded = 1;
@@ -1080,7 +1080,6 @@ ecdb_label_text_set(Evas_Object *l, const char *text)
typedef struct _Config_Inwin_Data Config_Inwin_Data;
struct _Config_Inwin_Data
{
Evas_Object *follow; // For hide/resize functions
Evas_Object *parent; // Used to calculate the popup layers
Evas_Object *back;
Evas_Object *popup;
@@ -1128,46 +1127,16 @@ _config_inwin_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
Config_Inwin_Data *iwd;
iwd = data;
if (!evas_object_event_callback_del(iwd->follow, EVAS_CALLBACK_HIDE,
if (!evas_object_event_callback_del(iwd->parent, EVAS_CALLBACK_HIDE,
_config_inwin_hide))
EINA_ERROR_PWARN("EVAS_CALLBACK_HIDE callback removal failure!\n");
if (!evas_object_event_callback_del(iwd->follow, EVAS_CALLBACK_RESIZE,
if (!evas_object_event_callback_del(iwd->parent, EVAS_CALLBACK_RESIZE,
_config_inwin_resize))
EINA_ERROR_PWARN("EVAS_CALLBACK_RESIZE callback removal failure!\n");
FREE(iwd);
}
/* We ideally would just follow the object supplied as the parent,
* but there were some problems with this and setting the popup and background
* layers. It would work intermittantly.
*/
void
ecdb_config_inwin_follow_set(Evas_Object *inwin, Evas_Object *follow)
{
Config_Inwin_Data *iwd;
if (!inwin )
{
EINA_ERROR_PWARN("NULL inwin!\n");
return;
}
if (!follow)
{
EINA_ERROR_PWARN("NULL follow!\n");
return;
}
iwd = evas_object_data_get(inwin, "iwd");
iwd->follow = follow;
evas_object_event_callback_add(follow, EVAS_CALLBACK_RESIZE,
_config_inwin_resize, iwd);
evas_object_event_callback_add(follow, EVAS_CALLBACK_HIDE,
_config_inwin_hide, iwd);
}
Evas_Object *
ecdb_config_inwin_add(Evas_Object *parent, const char *name)
{
@@ -1202,6 +1171,12 @@ ecdb_config_inwin_add(Evas_Object *parent, const char *name)
evas_object_show(iwd->back);
evas_object_data_set(iwd->popup, "iwd", iwd);
iwd->visible = 0;
/* Add the callbacks used to contain this to the parent */
evas_object_event_callback_add(parent, EVAS_CALLBACK_RESIZE,
_config_inwin_resize, iwd);
evas_object_event_callback_add(parent, EVAS_CALLBACK_HIDE,
_config_inwin_hide, iwd);
return iwd->popup;
}
@@ -1226,14 +1201,14 @@ ecdb_config_inwin_show(Evas_Object *inwin)
}
evas_object_pass_events_set(iwd->back, 0);
evas_object_layer_set(iwd->back, evas_object_layer_get(iwd->parent) + 1);
evas_object_raise(iwd->back);
edje_object_signal_emit(iwd->back, "ecdb,config_inwin,back,show", "ecdb");
evas_object_show(iwd->back);
evas_object_pass_events_set(iwd->popup, 0);
evas_object_layer_set(iwd->popup, evas_object_layer_get(iwd->back) + 1);
evas_object_raise(iwd->popup);
edje_object_signal_emit(iwd->popup, "ecdb,config_inwin,popup,show", "ecdb");
evas_object_show(iwd->popup);
iwd->visible = 1;
}