Ok, config_inwin is working, and is updated/can set the project details.

This commit is contained in:
Jaime Thomas
2009-01-11 02:14:02 +00:00
parent b0ef1ae4e4
commit e9e63ee6c7
8 changed files with 370 additions and 54 deletions

View File

@ -321,6 +321,9 @@ ecdb_check_checked_set(Evas_Object *c, int state)
return;
}
if (cd->checked == state)
return;
if (state)
{
cd->checked = 1;
@ -1086,12 +1089,11 @@ _config_inwin_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
Config_Inwin_Data *iwd;
int w, h;
iwd = evas_object_data_get(data, "iwd");
if (!iwd)
{
printf("_config_inwin_resize: NULL data\n");
iwd = data;
// We get a resize event even though the evas has been destroyed
if ((!em) || (!em->main_win_ee))
return;
}
ecore_evas_geometry_get(em->main_win_ee, NULL, NULL, &w, &h);
evas_object_resize(iwd->popup, w, h);
@ -1105,15 +1107,10 @@ _config_inwin_hide(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Config_Inwin_Data *iwd;
iwd = evas_object_data_get(data, "iwd");
if (!iwd)
{
printf("_config_inwin_hide: NULL data\n");
return;
}
iwd = data;
ecore_evas_hide(iwd->popup);
ecore_evas_hide(iwd->back);
evas_object_hide(iwd->popup);
evas_object_hide(iwd->back);
}
static void
@ -1121,18 +1118,13 @@ _config_inwin_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Config_Inwin_Data *iwd;
iwd = evas_object_data_get(data, "iwd");
if (!iwd)
{
printf("_config_inwin_del: NULL data\n");
return;
}
iwd = data;
FREE(iwd);
}
Evas_Object *
ecdb_config_inwin_add(Evas_Object *parent, const char *name)
{
Evas_Object *iw;
Config_Inwin_Data *iwd;
iwd = calloc(1, sizeof(Config_Inwin_Data));
@ -1143,7 +1135,7 @@ ecdb_config_inwin_add(Evas_Object *parent, const char *name)
}
iwd->popup = ecdb_widget_add(parent, NULL);
if (!iw)
if (!iwd->popup)
{
printf("ecdb_config_inwin_add: NULL return!\n");
return NULL;
@ -1154,13 +1146,13 @@ ecdb_config_inwin_add(Evas_Object *parent, const char *name)
evas_object_event_callback_add(parent, EVAS_CALLBACK_RESIZE,
_config_inwin_resize,
iwd->popup);
iwd);
evas_object_event_callback_add(parent, EVAS_CALLBACK_HIDE,
_config_inwin_hide,
iwd->popup);
iwd);
evas_object_event_callback_add(iwd->popup, EVAS_CALLBACK_DEL,
_config_inwin_del,
iwd->popup);
iwd);
iwd->back = edje_object_add(evas_object_evas_get(parent));
edje_object_file_set(iwd->back, em->theme_path,
@ -1168,13 +1160,12 @@ ecdb_config_inwin_add(Evas_Object *parent, const char *name)
evas_object_pass_events_set(iwd->back, 1);
evas_object_show(iwd->back);
iwd->popup = edje_object_add(evas_object_evas_get(parent));
iwd->name = eina_stringshare_add(name);
evas_object_data_set(iw, "iwd", iwd);
iwd->parent = parent;
evas_object_data_set(iwd->popup, "iwd", iwd);
iwd->visible = 0;
return iw;
return iwd->popup;
}
void
@ -1197,14 +1188,13 @@ 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(inwin) + 1);
evas_object_layer_set(iwd->back, evas_object_layer_get(iwd->parent) + 1);
edje_object_signal_emit(iwd->back, "ecdb,config_inwin,back,show", "ecdb");
evas_object_pass_events_set(iwd->popup, 0);
evas_object_layer_set(iwd->popup, evas_object_layer_get(inwin->back) + 1);
evas_object_signal_emit(iwd->popup, "ecdb,config_inwin,popup,show",
evas_object_layer_set(iwd->popup, evas_object_layer_get(iwd->back) + 1);
edje_object_signal_emit(iwd->popup, "ecdb,config_inwin,popup,show",
"ecdb");
iwd->visible = 1;
}
@ -1238,7 +1228,7 @@ ecdb_config_inwin_hide(Evas_Object *inwin)
void
ecdb_config_inwin_child_add(Evas_Object *inwin, Evas_Object *child,
int sc, int ec, int sr, int er)
int c, int r, int cs, int rs)
{
if (!inwin)
{
@ -1248,7 +1238,7 @@ ecdb_config_inwin_child_add(Evas_Object *inwin, Evas_Object *child,
if (!child)
return;
if (!edje_object_part_table_pack(inwin, "ecdb.table", child, sc, sr, ec, er))
if (!edje_object_part_table_pack(inwin, "ecdb.table", child, c, r, cs, rs))
{
printf("ecdb_config_inwin_child_add: Couldn't append to table!\n");
}