Enlightenment CVS committal Author : handyande Project : e17 Module : proto
Dir : e17/proto/enhance/src/lib Modified Files: enhance_widget.c Log Message: Add support for width and height overrides =================================================================== RCS file: /cvs/e/e17/proto/enhance/src/lib/enhance_widget.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- enhance_widget.c 3 Apr 2006 22:16:49 -0000 1.2 +++ enhance_widget.c 17 May 2006 11:54:28 -0000 1.3 @@ -35,12 +35,45 @@ _e_widget_new(Enhance *en, EXML_Node *node, Etk_Widget *etk_widget, char *id) { E_Widget *widget; + Ecore_List *props; + EXML_Node *prop; + int width, height; widget = E_NEW(1, E_Widget); widget->wid = etk_widget; widget->node = node; widget->packing = NULL; en->widgets = evas_hash_add(en->widgets, id, widget); + + width = -1; + height = -1; + props = node->children; + ecore_list_goto_first(props); + prop = ecore_list_current(props); + while(prop != NULL) + { + if(!strcmp(prop->tag, "property")) + { + char *name; + + name = ecore_hash_get(prop->attributes, "name"); + if(!name) { prop = ecore_list_next(props); continue; } + + if (!strcmp(name, "width_request")) + { + if (prop->value) + width = atoi(prop->value); + } + else if (!strcmp(name, "height_request")) + { + if (prop->value) + height = atoi(prop->value); + } + } + prop = ecore_list_next(props); + } + if (width != -1 || height != -1) + etk_widget_size_request_set(etk_widget, width, height); return widget; } ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs