summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Wilmet <swilmet@gnome.org>2013-04-03 00:27:50 +0200
committerSébastien Wilmet <swilmet@gnome.org>2013-05-12 18:09:11 +0200
commitfcc3f973d3c9fbb17c166238866007935ecd6cfe (patch)
tree001419c25b80d04d6587765bace51f41037d22e6
parent11be64d3fe12969579843a125cf0408320384563 (diff)
downloadgtk+-fcc3f973d3c9fbb17c166238866007935ecd6cfe.tar.gz
gtktextchild: replace hard-coded values by a macro
The macro already exists, so it's better to use it. https://bugzilla.gnome.org/show_bug.cgi?id=700007
-rw-r--r--gtk/gtktextchild.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk/gtktextchild.c b/gtk/gtktextchild.c
index dd7d3a4906..9fe5fdafcf 100644
--- a/gtk/gtktextchild.c
+++ b/gtk/gtktextchild.c
@@ -101,7 +101,7 @@ pixbuf_segment_check_func (GtkTextLineSegment *seg,
if (seg->next == NULL)
g_error ("pixbuf segment is the last segment in a line");
- if (seg->byte_count != 3)
+ if (seg->byte_count != GTK_TEXT_UNKNOWN_CHAR_UTF8_LEN)
g_error ("pixbuf segment has byte count of %d", seg->byte_count);
if (seg->char_count != 1)
@@ -201,7 +201,7 @@ child_segment_check_func (GtkTextLineSegment *seg,
if (seg->next == NULL)
g_error ("child segment is the last segment in a line");
- if (seg->byte_count != 3)
+ if (seg->byte_count != GTK_TEXT_UNKNOWN_CHAR_UTF8_LEN)
g_error ("child segment has byte count of %d", seg->byte_count);
if (seg->char_count != 1)
@@ -232,9 +232,10 @@ _gtk_widget_segment_new (GtkTextChildAnchor *anchor)
seg->next = NULL;
- seg->byte_count = 3; /* We convert to the 0xFFFC "unknown character",
- * a 3-byte sequence in UTF-8
- */
+ /* We convert to the 0xFFFC "unknown character",
+ * a 3-byte sequence in UTF-8.
+ */
+ seg->byte_count = GTK_TEXT_UNKNOWN_CHAR_UTF8_LEN;
seg->char_count = 1;
seg->body.child.obj = anchor;