Revert to old e_gadcon_client_new, some modules require id to be set on

the gadcon client after this func returns.


SVN revision: 27684
This commit is contained in:
Sebastian Dransfeld 2006-12-30 23:32:25 +00:00
parent e2ad139030
commit cba29bd250
10 changed files with 16 additions and 11 deletions

View File

@ -371,8 +371,10 @@ e_gadcon_populate(E_Gadcon *gc)
if (gcc)
{
#if 0
gcc->name = evas_stringshare_add(cf_gcc->name);
gcc->id = evas_stringshare_add(cf_gcc->id);
#endif
gcc->client_class = cc;
gcc->config.pos = cf_gcc->geom.pos;
gcc->config.size = cf_gcc->geom.size;
@ -440,8 +442,10 @@ e_gadcon_populate_class(E_Gadcon *gc, const E_Gadcon_Client_Class *cc)
cf_gcc->style);
if (gcc)
{
#if 0
gcc->name = evas_stringshare_add(cf_gcc->name);
gcc->id = evas_stringshare_add(cf_gcc->id);
#endif
gcc->client_class = cc;
gcc->config.pos = cf_gcc->geom.pos;
gcc->config.size = cf_gcc->geom.size;
@ -739,7 +743,7 @@ e_gadcon_client_config_del(E_Gadcon *gc, const char *id)
}
EAPI E_Gadcon_Client *
e_gadcon_client_new(E_Gadcon *gc, const char *style, Evas_Object *base_obj)
e_gadcon_client_new(E_Gadcon *gc, const char *name, const char *id, const char *style, Evas_Object *base_obj)
{
E_Gadcon_Client *gcc;
@ -747,6 +751,8 @@ e_gadcon_client_new(E_Gadcon *gc, const char *style, Evas_Object *base_obj)
E_OBJECT_TYPE_CHECK_RETURN(gc, E_GADCON_TYPE, NULL);
gcc = E_OBJECT_ALLOC(E_Gadcon_Client, E_GADCON_CLIENT_TYPE, _e_gadcon_client_free);
if (!gcc) return NULL;
gcc->name = evas_stringshare_add(name);
gcc->id = evas_stringshare_add(id);
gcc->gadcon = gc;
gcc->o_base = base_obj;
gc->clients = evas_list_append(gc->clients, gcc);
@ -1547,7 +1553,6 @@ _e_gadcon_cb_size_request(void *data, Evas_Object *obj, void *event_info)
Evas_Coord w, h;
e_gadcon_layout_asked_size_get(gc->o_container, &w, &h);
gc->resize_request.func(gc->resize_request.data, gc, w, h);
}
evas_object_geometry_get(gc->o_container, &x, &y, &w, &h);

View File

@ -183,7 +183,7 @@ EAPI Ecore_X_Window e_gadcon_dnd_window_get(E_Gadcon *gc);
EAPI E_Config_Gadcon_Client *e_gadcon_client_config_new(E_Gadcon *gc, const char *name);
EAPI E_Config_Gadcon_Client *e_gadcon_client_config_get(E_Gadcon *gc, const char *name, const char *id);
EAPI void e_gadcon_client_config_del(E_Gadcon *gc, const char *id);
EAPI E_Gadcon_Client *e_gadcon_client_new(E_Gadcon *gc, const char *style, Evas_Object *base_obj);
EAPI E_Gadcon_Client *e_gadcon_client_new(E_Gadcon *gc, const char *name, const char *id, const char *style, Evas_Object *base_obj);
EAPI void e_gadcon_client_edit_begin(E_Gadcon_Client *gcc);
EAPI void e_gadcon_client_edit_end(E_Gadcon_Client *gcc);
EAPI void e_gadcon_client_size_request(E_Gadcon_Client *gcc, Evas_Coord w, Evas_Coord h);

View File

@ -91,7 +91,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
e_theme_edje_object_set(o, "base/theme/modules/battery",
"e/modules/battery/main");
gcc = e_gadcon_client_new(gc, style, o);
gcc = e_gadcon_client_new(gc, name, id, style, o);
gcc->data = inst;
inst->gcc = gcc;

View File

@ -53,7 +53,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
"e/modules/clock/main");
evas_object_show(o);
gcc = e_gadcon_client_new(gc, style, o);
gcc = e_gadcon_client_new(gc, name, id, style, o);
gcc->data = inst;
inst->gcc = gcc;

View File

@ -86,7 +86,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
edje_object_signal_callback_add(o, "e,action,frequency,increase", "*", _cpufreq_face_cb_set_frequency, NULL);
edje_object_signal_callback_add(o, "e,action,frequency,decrease", "*", _cpufreq_face_cb_set_frequency, NULL);
gcc = e_gadcon_client_new(gc, style, o);
gcc = e_gadcon_client_new(gc, name, id, style, o);
gcc->data = inst;
inst->gcc = gcc;

View File

@ -141,7 +141,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
b->inst = inst;
inst->ibar = b;
o = b->o_box;
gcc = e_gadcon_client_new(gc, style, o);
gcc = e_gadcon_client_new(gc, name, id, style, o);
gcc->data = inst;
inst->gcc = gcc;

View File

@ -151,7 +151,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
b->inst = inst;
inst->ibox = b;
o = b->o_box;
gcc = e_gadcon_client_new(gc, style, o);
gcc = e_gadcon_client_new(gc, name, id, style, o);
gcc->data = inst;
inst->gcc = gcc;

View File

@ -171,7 +171,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
p->inst = inst;
inst->pager = p;
o = p->o_table;
gcc = e_gadcon_client_new(gc, style, o);
gcc = e_gadcon_client_new(gc, name, id, style, o);
gcc->data = inst;
inst->gcc = gcc;

View File

@ -56,7 +56,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
e_theme_edje_object_set(o, "base/theme/modules/start", "e/modules/start/main");
edje_object_signal_emit(o, "e,state,unfocused", "e");
gcc = e_gadcon_client_new(gc, style, o);
gcc = e_gadcon_client_new(gc, name, id, style, o);
gcc->data = inst;
inst->gcc = gcc;

View File

@ -77,7 +77,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
e_theme_edje_object_set(o, "base/theme/modules/temperature",
"e/modules/temperature/main");
gcc = e_gadcon_client_new(gc, style, o);
gcc = e_gadcon_client_new(gc, name, id, style, o);
gcc->data = inst;
inst->gcc = gcc;