Get burn data options working again, stop crashing when deleting the config_inwin object before showing it. Also get rid of the sloppy focus to the filelist, as it doesn't work correctly in certain cases.
This commit is contained in:
@ -615,7 +615,6 @@ _combo_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||
Combo_Data *cd;
|
||||
cd = evas_object_data_get(data, "cd");
|
||||
|
||||
eina_stringshare_del(cd->name);
|
||||
eina_stringshare_del(cd->header);
|
||||
FREE(cd);
|
||||
}
|
||||
@ -764,7 +763,6 @@ ecdb_combo_add(Evas_Object *parent, const char *name)
|
||||
evas_object_show(cd->popup);
|
||||
|
||||
cd->parent = parent;
|
||||
cd->name = eina_stringshare_add(name);
|
||||
cd->selected = -1;
|
||||
evas_object_data_set(c, "cd", cd);
|
||||
|
||||
@ -1082,14 +1080,11 @@ ecdb_label_text_set(Evas_Object *l, const char *text)
|
||||
typedef struct _Config_Inwin_Data Config_Inwin_Data;
|
||||
struct _Config_Inwin_Data
|
||||
{
|
||||
Evas_Object *parent;
|
||||
Evas_Object *follow; // For hide/resize functions
|
||||
Evas_Object *parent; // Used to calculate the popup layers
|
||||
Evas_Object *back;
|
||||
Evas_Object *popup;
|
||||
unsigned int visible;
|
||||
const char *name;
|
||||
void *data;
|
||||
void (*create_header)(Evas_Object *, const char *name, void *data,
|
||||
Evas_Object *, int);
|
||||
};
|
||||
|
||||
static void
|
||||
@ -1133,9 +1128,48 @@ _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,
|
||||
_config_inwin_hide))
|
||||
printf("_config_inwin_del: EVAS_CALLBACK_HIDE callback removal "
|
||||
"failure!\n");
|
||||
if (!evas_object_event_callback_del(iwd->follow, EVAS_CALLBACK_RESIZE,
|
||||
_config_inwin_resize))
|
||||
printf("_config_inwin_del: 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 )
|
||||
{
|
||||
printf("ecdb_config_inwin_resize_follow: NULL inwin!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!follow)
|
||||
{
|
||||
printf("ecdb_config_inwin_resize_follow: 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)
|
||||
{
|
||||
@ -1158,12 +1192,6 @@ ecdb_config_inwin_add(Evas_Object *parent, const char *name)
|
||||
evas_object_pass_events_set(iwd->popup, 1);
|
||||
evas_object_show(iwd->popup);
|
||||
|
||||
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);
|
||||
evas_object_event_callback_add(iwd->popup, EVAS_CALLBACK_DEL,
|
||||
_config_inwin_del,
|
||||
iwd);
|
||||
@ -1171,11 +1199,9 @@ ecdb_config_inwin_add(Evas_Object *parent, const char *name)
|
||||
iwd->back = edje_object_add(evas_object_evas_get(parent));
|
||||
edje_object_file_set(iwd->back, em->theme_path,
|
||||
"ecdb/config_inwin/background");
|
||||
iwd->parent = parent;
|
||||
evas_object_pass_events_set(iwd->back, 1);
|
||||
evas_object_show(iwd->back);
|
||||
|
||||
iwd->name = eina_stringshare_add(name);
|
||||
iwd->parent = parent;
|
||||
evas_object_data_set(iwd->popup, "iwd", iwd);
|
||||
iwd->visible = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user