Bug in gtkentry
- From: dov imagic weizmann ac il (Dov Grobgeld)
- To: gtk-devel-list redhat com
- Subject: Bug in gtkentry
- Date: Wed, 30 Dec 98 22:33:49 IST
I found a bug in gtk+-1.1.9/gtk/gtkentry.c .
When using a font with a glyph at character position 0x00 I got this
drawn at the end of the drawn text in gtkentry. A look at the source
revealed that the zero string terminator is sometimes drawn at the
end of the string. The following patch fixes that:
*** gtk+-1.1.9/gtk/gtkentry.c.orig Wed Dec 30 22:08:58 1998
--- gtk+-1.1.9/gtk/gtkentry.c Wed Dec 30 22:16:04 1998
***************
*** 1456,1465 ****
1, text_area_height - INNER_BORDER);
/* Draw the character under the cursor again */
! gdk_draw_text_wc (drawable, widget->style->font,
! widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
! xoffset, yoffset,
! entry->text + editable->current_pos, 1);
}
--- 1456,1466 ----
1, text_area_height - INNER_BORDER);
/* Draw the character under the cursor again */
! if (editable->current_pos < entry->text_length)
! gdk_draw_text_wc (drawable, widget->style->font,
! widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
! xoffset, yoffset,
! entry->text + editable->current_pos, 1);
}
--Dov
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]