Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: dialog.c dialog.h Log Message: Dialog filling tweaks. =================================================================== RCS file: /cvs/e/e16/e/src/dialog.c,v retrieving revision 1.166 retrieving revision 1.167 diff -u -3 -r1.166 -r1.167 --- dialog.c 19 Aug 2006 12:01:59 -0000 1.166 +++ dialog.c 20 Aug 2006 13:53:55 -0000 1.167 @@ -222,6 +222,11 @@ static void DialogUpdate(Dialog * d); +static void DialogAddFooter(Dialog * d, DItem * parent, + int flags, DialogCallbackFunc * cb); +static void DialogAddHeader(Dialog * d, DItem * parent, + const char *img, const char *txt); + static Ecore_List *dialog_list = NULL; static char dialog_update_pending = 0; @@ -730,11 +735,6 @@ EwinHide(d->ewin); } -static void DialogAddHeader(DItem * parent, const char *img, - const char *txt); -static void DialogAddFooter(Dialog * d, int flags, - DialogCallbackFunc * cb); - void DialogShowSimple(const DialogDef * dd, void *data) { @@ -742,6 +742,24 @@ } void +DialogFill(Dialog * d, DItem * parent, const DialogDef * dd, void *data) +{ + DItem *content; + + if (Conf.dialogs.headers && (dd->header_image || dd->header_text)) + DialogAddHeader(d, parent, dd->header_image, _(dd->header_text)); + + content = DialogAddItem(parent, DITEM_TABLE); + if (!content) + return; + + dd->fill(d, content, data); + + if (dd->func) + DialogAddFooter(d, parent, dd->flags, dd->func); +} + +void DialogShowSimpleWithName(const DialogDef * dd, const char *name, void *data) { Dialog *d; @@ -766,17 +784,7 @@ if (!table) return; - if (Conf.dialogs.headers && (dd->header_image || dd->header_text)) - DialogAddHeader(table, dd->header_image, _(dd->header_text)); - - table = DialogAddItem(d->item, DITEM_TABLE); - if (!table) - return; - - dd->fill(d, table, data); - - if (dd->func) - DialogAddFooter(d, dd->flags, dd->func); + DialogFill(d, table, dd, data); DialogShow(d); } @@ -932,13 +940,13 @@ } static void -DialogAddHeader(DItem * parent, const char *img, const char *txt) +DialogAddHeader(Dialog * d __UNUSED__, DItem * parent, const char *img, + const char *txt) { DItem *table, *di; /* FIXME - Center table horizontally */ table = DialogAddItem(parent, DITEM_TABLE); - DialogItemSetColSpan(table, 1); DialogItemTableSetOptions(table, 2, 0, 0, 0); DialogItemSetAlign(table, 512, 0); @@ -952,12 +960,16 @@ } static void -DialogAddFooter(Dialog * d, int flags, DialogCallbackFunc * cb) +DialogAddFooter(Dialog * d, DItem * parent __UNUSED__, int flags, + DialogCallbackFunc * cb) { - DItem *di; + DItem *table, *di; + + di = DialogAddItem(parent, DITEM_SEPARATOR); - di = DialogAddItem(d->item, DITEM_SEPARATOR); - DialogItemSetColSpan(di, d->item->item.table.num_columns); + table = DialogAddItem(parent, DITEM_TABLE); + DialogItemTableSetOptions(table, 1, 0, 0, 0); + DialogItemSetAlign(table, 512, 0); if (flags & 4) { =================================================================== RCS file: /cvs/e/e16/e/src/dialog.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- dialog.h 19 Aug 2006 12:01:59 -0000 1.14 +++ dialog.h 20 Aug 2006 13:53:55 -0000 1.15 @@ -90,6 +90,8 @@ void DialogShowSimple(const DialogDef * dd, void *data); void DialogShowSimpleWithName(const DialogDef * dd, const char *name, void *data); +void DialogFill(Dialog * d, DItem * parent, const DialogDef * dd, + void *data); void DialogAddButton(Dialog * d, const char *text, DialogCallbackFunc * func, char doclose, ------------------------------------------------------------------------- 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