Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_entry.c ewl_text.c Log Message: - formatting =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_entry.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -3 -r1.62 -r1.63 --- ewl_entry.c 15 Aug 2006 20:46:33 -0000 1.62 +++ ewl_entry.c 16 Aug 2006 16:10:01 -0000 1.63 @@ -16,15 +16,14 @@ w = NEW(Ewl_Entry, 1); if (!w) - { DRETURN_PTR(NULL, DLEVEL_STABLE); - } if (!ewl_entry_init(EWL_ENTRY(w))) { ewl_widget_destroy(w); DRETURN_PTR(NULL, DLEVEL_STABLE); } + DRETURN_PTR(w, DLEVEL_STABLE); } @@ -44,9 +43,7 @@ w = EWL_WIDGET(e); if (!ewl_text_init(EWL_TEXT(e))) - { DRETURN_INT(FALSE, DLEVEL_STABLE); - } ewl_widget_inherit(w, EWL_ENTRY_TYPE); ewl_widget_appearance_set(w, EWL_ENTRY_TYPE); @@ -138,9 +135,7 @@ DCHECK_TYPE("e", e, EWL_ENTRY_TYPE); if (e->editable == editable) - { DRETURN(DLEVEL_STABLE); - } e->editable = editable; @@ -245,9 +240,7 @@ e = EWL_ENTRY(w); if (!e->editable) - { DRETURN(DLEVEL_STABLE); - } c_pos = ewl_entry_cursor_position_get(EWL_ENTRY_CURSOR(e->cursor)); ewl_text_index_geometry_map(EWL_TEXT(e), c_pos, &cx, &cy, &cw, &ch); @@ -629,8 +622,10 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("e", e); DCHECK_TYPE("e", e, EWL_ENTRY_TYPE); - if(!EWL_TEXT(e)->text) + + if (!EWL_TEXT(e)->text) DRETURN(DLEVEL_STABLE); + pos1 = ewl_entry_cursor_position_get(EWL_ENTRY_CURSOR(e->cursor)); pos2 = ewl_text_utf_char_position_prev(EWL_TEXT(e)->text, pos1); ewl_entry_cursor_position_set(EWL_ENTRY_CURSOR(e->cursor), pos2); @@ -652,8 +647,10 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("e", e); DCHECK_TYPE("e", e, EWL_ENTRY_TYPE); - if(!EWL_TEXT(e)->text) + + if (!EWL_TEXT(e)->text) DRETURN(DLEVEL_STABLE); + pos1 = ewl_entry_cursor_position_get(EWL_ENTRY_CURSOR(e->cursor)); pos2 = ewl_text_utf_char_position_next(EWL_TEXT(e)->text, pos1); ewl_text_text_delete(EWL_TEXT(e), pos2 - pos1); @@ -679,15 +676,14 @@ w = NEW(Ewl_Entry_Cursor, 1); if (!w) - { DRETURN_PTR(NULL, DLEVEL_STABLE); - } if (!ewl_entry_cursor_init(EWL_ENTRY_CURSOR(w), parent)) { ewl_widget_destroy(w); DRETURN_PTR(NULL, DLEVEL_STABLE); } + DRETURN_PTR(w, DLEVEL_STABLE); } @@ -706,9 +702,7 @@ DCHECK_TYPE_RET("parent", parent, EWL_ENTRY_TYPE, FALSE); if (!ewl_widget_init(EWL_WIDGET(c))) - { DRETURN_INT(FALSE, DLEVEL_STABLE); - } ewl_widget_appearance_set(EWL_WIDGET(c), EWL_ENTRY_CURSOR_TYPE); ewl_widget_inherit(EWL_WIDGET(c), EWL_ENTRY_CURSOR_TYPE); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_text.c,v retrieving revision 1.112 retrieving revision 1.113 diff -u -3 -r1.112 -r1.113 --- ewl_text.c 14 Jul 2006 21:31:25 -0000 1.112 +++ ewl_text.c 16 Aug 2006 16:10:01 -0000 1.113 @@ -70,9 +70,7 @@ w = NEW(Ewl_Text, 1); if (!w) - { DRETURN_PTR(NULL, DLEVEL_STABLE); - } if (!ewl_text_init(EWL_TEXT(w))) { @@ -95,9 +93,8 @@ DCHECK_PARAM_PTR_RET("t", t, FALSE); if (!ewl_container_init(EWL_CONTAINER(t))) - { DRETURN_INT(FALSE, DLEVEL_STABLE); - } + ewl_widget_appearance_set(EWL_WIDGET(t), EWL_TEXT_TYPE); ewl_widget_inherit(EWL_WIDGET(t), EWL_TEXT_TYPE); @@ -106,9 +103,7 @@ /* create the formatting tree before we do any formatting */ t->formatting.tree = ewl_text_tree_new(); if (!t->formatting.tree) - { DRETURN_INT(FALSE, DLEVEL_STABLE); - } t->formatting.tree->tx = ewl_text_context_default_create(t); ewl_text_context_acquire(t->formatting.tree->tx); @@ -276,9 +271,7 @@ DCHECK_TYPE_RET("t", t, EWL_TEXT_TYPE, 0); if ((!REALIZED(t)) || (!t->textblock) || (!t->text)) - { DRETURN_INT(0, DLEVEL_STABLE); - } /* force a display of the text */ if (t->dirty) @@ -671,9 +664,7 @@ DCHECK_TYPE_RET("t", t, EWL_TEXT_TYPE, NULL); if (t->selection && ewl_text_trigger_length_get(t->selection) > 0) - { DRETURN_PTR(t->selection, DLEVEL_STABLE); - } DRETURN_PTR(NULL, DLEVEL_STABLE); } @@ -691,9 +682,7 @@ DCHECK_TYPE_RET("t", t, EWL_TEXT_TYPE, FALSE); if (ewl_text_selection_get(t)) - { DRETURN_INT(TRUE, DLEVEL_STABLE); - } DRETURN_INT(FALSE, DLEVEL_STABLE); } @@ -875,9 +864,7 @@ /* if length is 0 we have nothing to do */ if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); @@ -960,9 +947,7 @@ DCHECK_TYPE("t", t, EWL_TEXT_TYPE); if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); tx->size = size; @@ -1051,9 +1036,7 @@ /* set this into the b-tree if we have length */ if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); tx->color.r = r; @@ -1146,9 +1129,7 @@ DCHECK_TYPE("t", t, EWL_TEXT_TYPE); if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); tx->align = align; @@ -1224,9 +1205,7 @@ DCHECK_TYPE("t", t, EWL_TEXT_TYPE); if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); tx->styles = styles; @@ -1392,9 +1371,7 @@ DCHECK_TYPE("t", t, EWL_TEXT_TYPE); if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); tx->wrap = wrap; @@ -1483,9 +1460,7 @@ /* set this into the b-tree if we have length */ if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); tx->style_colors.bg.r = r; @@ -1591,9 +1566,7 @@ /* set this into the b-tree if we have length */ if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); tx->style_colors.glow.r = r; @@ -1699,9 +1672,7 @@ /* set this into the b-tree if we have length */ if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); tx->style_colors.outline.r = r; @@ -1807,9 +1778,7 @@ /* set this into the b-tree if we have length */ if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); tx->style_colors.shadow.r = r; @@ -1915,9 +1884,7 @@ /* set this into the b-tree if we have length */ if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); tx->style_colors.strikethrough.r = r; @@ -2023,9 +1990,7 @@ /* set this into the b-tree if we have length */ if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); tx->style_colors.underline.r = r; @@ -2131,9 +2096,7 @@ /* set this into the b-tree if we have length */ if (length == 0) - { DRETURN(DLEVEL_STABLE); - } tx = ewl_text_context_new(); tx->style_colors.double_underline.r = r; @@ -2278,9 +2241,7 @@ DCHECK_PARAM_PTR("tb", tb); if (!txt) - { DRETURN(DLEVEL_STABLE); - } /* we don't free this cursor as it is actually const * Evas_Textblock_Cursor * and i'm casting it... */ @@ -2596,7 +2557,8 @@ DCHECK_TYPE("w", w, EWL_WIDGET_TYPE); /* don't do anything if we're obscured */ - if (OBSCURED(w)) DRETURN(DLEVEL_STABLE); + if (OBSCURED(w)) + DRETURN(DLEVEL_STABLE); t = EWL_TEXT(w); @@ -2651,7 +2613,8 @@ t = EWL_TEXT(w); - if (t->textblock) { + if (t->textblock) + { DWARNING("We have a textblock when we shoudn't"); DRETURN(DLEVEL_STABLE); } @@ -3837,9 +3800,7 @@ area = NEW(Ewl_Text_Trigger_Area, 1); if (!area) - { DRETURN_PTR(NULL, DLEVEL_STABLE); - } if (!ewl_text_trigger_area_init(area, type)) { @@ -4484,9 +4445,7 @@ tree = NEW(Ewl_Text_Tree, 1); if (!tree) - { DRETURN_PTR(NULL, DLEVEL_STABLE); - } DRETURN_PTR(tree, DLEVEL_STABLE); } ------------------------------------------------------------------------- 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