Enlightenment CVS committal
Author : pfritz
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_text.c ewl_text_trigger.h ewl_text_trigger.c
Log Message:
fix some selection problems, e.g. if you select from code and not by hand
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -3 -r1.205 -r1.206
--- ewl_text.c 29 Jul 2008 02:31:47 -0000 1.205
+++ ewl_text.c 30 Jul 2008 21:43:54 -0000 1.206
@@ -3231,15 +3231,21 @@
t = EWL_TEXT(w);
if (t->textblock)
{
+ Ewl_Widget *child;
+
ewl_text_size(t);
if (t->dirty) ewl_text_display(t);
ewl_text_triggers_place(t);
- /* re-configure the selection to make sure it resizes
- * if needed */
- if (t->selection)
- ewl_widget_configure(EWL_WIDGET(t->selection));
+ /*
+ * configure all children. We actually only need to configure
+ * the area parts, but it doesn't hurt if we call the configure
+ * call for the trigger, too
+ */
+ ecore_dlist_first_goto(EWL_CONTAINER(t)->children);
+ while ((child = ecore_dlist_next(EWL_CONTAINER(t)->children)))
+ ewl_widget_configure(child);
}
DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -3474,13 +3480,6 @@
t->selection = ewl_text_selection_new(t);
sel = EWL_TEXT_TRIGGER(t->selection);
-
- /* Move the selection widget to wherever the mouse was clicked,
- * as this way we are always marked onscreen, and receive configuration
- * callbacks
- */
- ewl_object_position_request(EWL_OBJECT(t->selection), event->x,
- event->y);
char_idx = ewl_text_coord_index_map(EWL_TEXT(w), event->x, event->y);
ewl_text_cursor_position_set(t, char_idx);
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_text_trigger.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ewl_text_trigger.h 5 Jul 2008 18:03:53 -0000 1.10
+++ ewl_text_trigger.h 30 Jul 2008 21:43:54 -0000 1.11
@@ -83,7 +83,6 @@
*/
void ewl_text_trigger_cb_show(Ewl_Widget *w, void *ev, void *data);
void ewl_text_trigger_cb_hide(Ewl_Widget *w, void *ev, void *data);
-void ewl_text_trigger_cb_configure(Ewl_Widget *w, void *ev, void *data);
void ewl_text_trigger_cb_unrealize(Ewl_Widget *w, void *ev, void *data);
/**
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_text_trigger.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- ewl_text_trigger.c 7 May 2008 13:38:25 -0000 1.14
+++ ewl_text_trigger.c 30 Jul 2008 21:43:54 -0000 1.15
@@ -108,8 +108,6 @@
ewl_callback_prepend(EWL_WIDGET(trigger), EWL_CALLBACK_DESTROY,
ewl_text_trigger_cb_destroy, NULL);
- ewl_callback_append(EWL_WIDGET(trigger), EWL_CALLBACK_CONFIGURE,
- ewl_text_trigger_cb_configure, NULL);
ewl_callback_append(EWL_WIDGET(trigger), EWL_CALLBACK_SHOW,
ewl_text_trigger_cb_show, NULL);
ewl_callback_append(EWL_WIDGET(trigger), EWL_CALLBACK_HIDE,
@@ -326,35 +324,6 @@
while ((area = ecore_list_first_remove(trig->areas)))
ewl_text_trigger_area_cache(trig->text_parent, area);
}
-
- DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-/**
- * @param w: The trigger to work with
- * @param ev: UNUSED
- * @param data: UNUSED
- * @return Returns no value
- * @brief Configures the areas associated with @a trig
- */
-void
-ewl_text_trigger_cb_configure(Ewl_Widget *w, void *ev __UNUSED__,
- void *data __UNUSED__)
-{
- Ewl_Text_Trigger *trig;
- Ewl_Text_Trigger_Area *area;
-
- DENTER_FUNCTION(DLEVEL_STABLE);
- DCHECK_PARAM_PTR(w);
- DCHECK_TYPE(w, EWL_TEXT_TRIGGER_TYPE);
-
- trig = EWL_TEXT_TRIGGER(w);
-
- if (!trig->areas) DRETURN(DLEVEL_STABLE);
-
- ecore_list_first_goto(trig->areas);
- while ((area = ecore_list_next(trig->areas)))
- ewl_widget_configure(EWL_WIDGET(area));
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs