Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_text.c
Log Message:
- if we set the text to "" then textblock returns a width of 0. EWL dosen't
like that.
- a couple more ewl_text_display calls moved to ewl_widget_configure calls
- convert some spaces to tabs
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- ewl_text.c 22 Nov 2005 06:56:59 -0000 1.60
+++ ewl_text.c 22 Nov 2005 16:09:59 -0000 1.61
@@ -448,14 +448,10 @@
t->cursor_position = idx + len;
}
- if (text)
- ewl_text_triggers_shift(t, idx, strlen(text));
- else
- ewl_text_triggers_remove(t);
-
- if (REALIZED(t))
- ewl_text_display(t);
+ if (text) ewl_text_triggers_shift(t, idx, strlen(text));
+ else ewl_text_triggers_remove(t);
+ ewl_widget_configure(EWL_WIDGET(t));
ewl_callback_call(EWL_WIDGET(t), EWL_CALLBACK_VALUE_CHANGED);
DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -516,8 +512,7 @@
if (t->cursor_position > t->length)
t->cursor_position = t->length;
- if (REALIZED(t))
- ewl_text_display(t);
+ ewl_widget_configure(EWL_WIDGET(t));
ewl_callback_call(EWL_WIDGET(t), EWL_CALLBACK_VALUE_CHANGED);
@@ -2678,7 +2673,7 @@
/* printf("Revealing text %p\n", w); */
if (t->textblock) {
- ewl_print_warning();
+ DWARNING("We have a textblock when we shoudn't");
DRETURN(DLEVEL_STABLE);
}
@@ -2843,7 +2838,7 @@
ewl_text_cb_mouse_move, NULL);
idx = ewl_text_coord_index_map(EWL_TEXT(w), event->x, event->y);
-
+
modifiers = ewl_ev_modifiers_get();
if (modifiers & EWL_KEY_MODIFIER_SHIFT)
ewl_text_selection_select_to(t->selection, idx);
@@ -2852,13 +2847,13 @@
ewl_text_trigger_start_pos_set(t->selection, idx);
ewl_text_trigger_base_set(t->selection, idx);
ewl_text_trigger_length_set(t->selection, 0);
- }
+ }
t->in_select = TRUE;
ewl_text_selection_cb_configure(EWL_WIDGET(t->selection), NULL, NULL);
DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
+}
void
ewl_text_cb_mouse_up(Ewl_Widget *w, void *ev, void *data __UNUSED__)
@@ -3971,12 +3966,12 @@
/* Fallback, just in case we hit a corner case */
if (!h) h = 1;
+ if (!w) w = 1;
ewl_object_preferred_inner_size_set(EWL_OBJECT(t), (int)w, (int)h);
/* re-configure the selection to make sure it resizes if needed */
ewl_text_selection_cb_configure(EWL_WIDGET(t->selection), NULL, NULL);
- /* ewl_widget_configure(EWL_WIDGET(t)); */
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -4167,12 +4162,12 @@
ewl_text_trigger_start_pos_set(s, idx);
ewl_text_trigger_length_set(s, base - idx);
}
- else
+ else
{
ewl_text_trigger_start_pos_set(s, base);
ewl_text_trigger_length_set(s, idx - base);
}
- }
+ }
else
{
ewl_text_trigger_start_pos_set(s, base);
-------------------------------------------------------
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. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs