Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/etox
Dir : e17/libs/etox/src
Modified Files:
Etox.h etox.c etox_line.c
Log Message:
Fix the tab display issue in etox, I've had this done for 2 weeks and forgot
to commit it apparently.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/Etox.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- Etox.h 6 May 2004 23:51:16 -0000 1.50
+++ Etox.h 10 Jul 2004 19:22:11 -0000 1.51
@@ -23,7 +23,8 @@
{
ETOX_BIT_TYPE_TEXT = 0,
ETOX_BIT_TYPE_OBSTACLE = 1,
- ETOX_BIT_TYPE_WRAP_MARKER = 2
+ ETOX_BIT_TYPE_WRAP_MARKER = 2,
+ ETOX_BIT_TYPE_TAB = 3
};
typedef enum _etox_bit_type Etox_Bit_Type;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/etox.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -3 -r1.84 -r1.85
--- etox.c 10 Jul 2004 19:06:31 -0000 1.84
+++ etox.c 10 Jul 2004 19:22:11 -0000 1.85
@@ -1160,14 +1160,15 @@
evas_object_show(bit);
*walk = '\t';
- text = walk + 1;
+ walk++;
+ text = walk;
t = *text;
/*
* Make a bit for the tab character
*/
- *text = '\0';
- bit = etox_style_new(et->evas, walk, et->context->style);
+ bit = etox_style_new(et->evas, " ",
+ et->context->style);
evas_object_smart_member_add(bit, et->smart_obj);
evas_object_color_set(bit, et->context->r,
et->context->g, et->context->b,
@@ -1175,9 +1176,9 @@
evas_object_clip_set(bit, et->clip);
etox_style_set_font(bit, et->context->font,
et->context->font_size);
+ etox_style_set_type(bit, ETOX_BIT_TYPE_TAB);
etox_line_append(line, bit);
evas_object_show(bit);
- *text = t;
break;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/etox_line.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- etox_line.c 18 May 2004 20:36:49 -0000 1.37
+++ etox_line.c 10 Jul 2004 19:22:11 -0000 1.38
@@ -373,19 +373,22 @@
* line.
*/
for (l = line->bits; l; l = l->next) {
+ int t;
es = l->data;
sum += etox_style_length(es);
- if (etox_style_get_type(es) == ETOX_BIT_TYPE_WRAP_MARKER)
- continue;
-
- temp = etox_style_get_text(es);
+ t = etox_style_get_type(es);
+ if (t == ETOX_BIT_TYPE_WRAP_MARKER)
+ continue;
+ else if (t == ETOX_BIT_TYPE_TAB)
+ temp = "\t";
+ else
+ temp = etox_style_get_text(es);
strcat(buf, temp);
free(temp);
}
line->length = sum;
-
}
int
@@ -527,13 +530,15 @@
/* remove any wrap marker bits */
ll = line->bits;
while (ll) {
+ int t;
marker = ll->data;
ll = ll->next;
- if (etox_style_get_type(marker) ==
- ETOX_BIT_TYPE_WRAP_MARKER) {
- line->bits = evas_list_remove(line->bits, marker);
+ t = etox_style_get_type(marker);
+ if (t == ETOX_BIT_TYPE_WRAP_MARKER) {
+ line->bits = evas_list_remove(line->bits,
+ marker);
}
}
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs