Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_button.c Log Message: - type checking =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_button.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- ewl_button.c 23 Oct 2005 05:19:37 -0000 1.13 +++ ewl_button.c 23 Oct 2005 05:33:10 -0000 1.14 @@ -73,11 +73,11 @@ if (!ewl_box_init(EWL_BOX(b))) { DRETURN_INT(FALSE, DLEVEL_STABLE); } + ewl_widget_inherit(w, "button"); + ewl_button_stock_type_set(b, EWL_STOCK_NONE); ewl_box_orientation_set(EWL_BOX(b), EWL_ORIENTATION_VERTICAL); - ewl_widget_appearance_set(w, "button"); - ewl_widget_inherit(w, "button"); b->body = ewl_hbox_new(); ewl_container_child_append(EWL_CONTAINER(b), b->body); @@ -87,6 +87,7 @@ ewl_widget_show(b->body); ewl_container_redirect_set(EWL_CONTAINER(b), EWL_CONTAINER(b->body)); + ewl_widget_appearance_set(w, "button"); DRETURN_INT(TRUE, DLEVEL_STABLE); } @@ -100,12 +101,9 @@ void ewl_button_label_set(Ewl_Button *b, const char *l) { - Ewl_Widget *w; - DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("b", b); - - w = EWL_WIDGET(b); + DCHECK_TYPE("b", b, "button"); if (!l) { ewl_widget_destroy(b->label_object); @@ -133,6 +131,8 @@ ewl_button_label_get(Ewl_Button *b) { DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR_RET("b", b, NULL); + DCHECK_TYPE_RET("b", b, "button", NULL); if (b->label_object) DRETURN_PTR(ewl_label_text_get(EWL_LABEL(b->label_object)), @@ -153,6 +153,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("b", b); + DCHECK_TYPE("b", b, "button"); if (stock == b->stock_type) { DRETURN(DLEVEL_STABLE); @@ -189,6 +190,7 @@ { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("b", b, EWL_STOCK_NONE); + DCHECK_TYPE_RET("b", b, "button", EWL_STOCK_NONE); DRETURN_INT(b->stock_type, DLEVEL_STABLE); } @@ -205,6 +207,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("b", b); DCHECK_PARAM_PTR("file", file); + DCHECK_TYPE("b", b, "button"); if (b->image_object) { ewl_widget_destroy(b->image_object); @@ -231,6 +234,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("b", b, NULL); + DCHECK_TYPE_RET("b", b, "button", NULL); if (!b->image_object) file = NULL; @@ -241,4 +245,3 @@ } - ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs