diff options
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtktextbtree.c | 2 | ||||
-rw-r--r-- | gtk/gtktextbufferserialize.c | 3 | ||||
-rw-r--r-- | gtk/gtktextchild.c | 4 | ||||
-rw-r--r-- | gtk/gtktextlayout.c | 13 | ||||
-rw-r--r-- | gtk/gtktextmark.c | 4 | ||||
-rw-r--r-- | gtk/gtktextsegment.c | 8 | ||||
-rw-r--r-- | gtk/gtktextsegment.h | 8 | ||||
-rw-r--r-- | gtk/gtktexttypes.h | 14 | ||||
-rw-r--r-- | gtk/gtkuimanager.c | 2 |
9 files changed, 28 insertions, 30 deletions
diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 1269256256..1216d1834b 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -6923,7 +6923,7 @@ _gtk_text_btree_check (GtkTextBTree *tree) } else { - GtkTextLineSegmentClass * last = NULL; + const GtkTextLineSegmentClass *last = NULL; for (line = node->children.line ; line != NULL ; line = line->next) diff --git a/gtk/gtktextbufferserialize.c b/gtk/gtktextbufferserialize.c index 4a869d5c99..f8cb1fe5f4 100644 --- a/gtk/gtktextbufferserialize.c +++ b/gtk/gtktextbufferserialize.c @@ -1798,8 +1798,7 @@ deserialize_text (GtkTextBuffer *buffer, ParseInfo info; gboolean retval = FALSE; - - static GMarkupParser rich_text_parser = { + static const GMarkupParser rich_text_parser = { start_element_handler, end_element_handler, text_handler, diff --git a/gtk/gtktextchild.c b/gtk/gtktextchild.c index 05a1a3c7e3..5fd0d72108 100644 --- a/gtk/gtktextchild.c +++ b/gtk/gtktextchild.c @@ -108,7 +108,7 @@ pixbuf_segment_check_func (GtkTextLineSegment *seg, } -GtkTextLineSegmentClass gtk_text_pixbuf_type = { +const GtkTextLineSegmentClass gtk_text_pixbuf_type = { "pixbuf", /* name */ FALSE, /* leftGravity */ NULL, /* splitFunc */ @@ -206,7 +206,7 @@ child_segment_check_func (GtkTextLineSegment *seg, g_error ("child segment has char count of %d", seg->char_count); } -GtkTextLineSegmentClass gtk_text_child_type = { +const GtkTextLineSegmentClass gtk_text_child_type = { "child-widget", /* name */ FALSE, /* leftGravity */ NULL, /* splitFunc */ diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index b46d1685ba..85ff8966e2 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -1293,7 +1293,6 @@ set_para_values (GtkTextLayout *layout, pango_layout_set_width (display->layout, layout_width * PANGO_SCALE); pango_layout_set_wrap (display->layout, PANGO_WRAP_CHAR); break; - case GTK_WRAP_WORD: layout_width = layout->screen_width - display->left_margin - display->right_margin; pango_layout_set_width (display->layout, layout_width * PANGO_SCALE); @@ -1329,14 +1328,14 @@ gtk_text_attr_appearance_copy (const PangoAttribute *attr) static void gtk_text_attr_appearance_destroy (PangoAttribute *attr) { - GtkTextAppearance *appearance = &((GtkTextAttrAppearance *)attr)->appearance; + GtkTextAttrAppearance *appearance_attr = (GtkTextAttrAppearance *)attr; - if (appearance->bg_stipple) - g_object_unref (appearance->bg_stipple); - if (appearance->fg_stipple) - g_object_unref (appearance->fg_stipple); + if (appearance_attr->appearance.bg_stipple) + g_object_unref (appearance_attr->appearance.bg_stipple); + if (appearance_attr->appearance.fg_stipple) + g_object_unref (appearance_attr->appearance.fg_stipple); - g_slice_free (GtkTextAttrAppearance, attr); + g_slice_free (GtkTextAttrAppearance, appearance_attr); } static gboolean diff --git a/gtk/gtktextmark.c b/gtk/gtktextmark.c index 260cc44d1d..4961b8d50b 100644 --- a/gtk/gtktextmark.c +++ b/gtk/gtktextmark.c @@ -291,7 +291,7 @@ static void mark_segment_check_func (GtkTextLineSegment *segPtr * their gravity property. */ -GtkTextLineSegmentClass gtk_text_right_mark_type = { +const GtkTextLineSegmentClass gtk_text_right_mark_type = { "mark", /* name */ FALSE, /* leftGravity */ NULL, /* splitFunc */ @@ -301,7 +301,7 @@ GtkTextLineSegmentClass gtk_text_right_mark_type = { mark_segment_check_func /* checkFunc */ }; -GtkTextLineSegmentClass gtk_text_left_mark_type = { +const GtkTextLineSegmentClass gtk_text_left_mark_type = { "mark", /* name */ TRUE, /* leftGravity */ NULL, /* splitFunc */ diff --git a/gtk/gtktextsegment.c b/gtk/gtktextsegment.c index 3b961ad66b..71c4e16dd8 100644 --- a/gtk/gtktextsegment.c +++ b/gtk/gtktextsegment.c @@ -196,7 +196,7 @@ _gtk_char_segment_new (const gchar *text, guint len) g_assert (gtk_text_byte_begins_utf8_char (text)); seg = g_malloc (CSEG_SIZE (len)); - seg->type = >k_text_char_type; + seg->type = (GtkTextLineSegmentClass *)>k_text_char_type; seg->next = NULL; seg->byte_count = len; memcpy (seg->body.chars, text, len); @@ -590,7 +590,7 @@ toggle_segment_line_change_func (segPtr, line) */ -GtkTextLineSegmentClass gtk_text_char_type = { +const GtkTextLineSegmentClass gtk_text_char_type = { "character", /* name */ 0, /* leftGravity */ char_segment_split_func, /* splitFunc */ @@ -605,7 +605,7 @@ GtkTextLineSegmentClass gtk_text_char_type = { * range: */ -GtkTextLineSegmentClass gtk_text_toggle_on_type = { +const GtkTextLineSegmentClass gtk_text_toggle_on_type = { "toggleOn", /* name */ 0, /* leftGravity */ NULL, /* splitFunc */ @@ -620,7 +620,7 @@ GtkTextLineSegmentClass gtk_text_toggle_on_type = { * range: */ -GtkTextLineSegmentClass gtk_text_toggle_off_type = { +const GtkTextLineSegmentClass gtk_text_toggle_off_type = { "toggleOff", /* name */ 1, /* leftGravity */ NULL, /* splitFunc */ diff --git a/gtk/gtktextsegment.h b/gtk/gtktextsegment.h index 691147b08c..394703b9d4 100644 --- a/gtk/gtktextsegment.h +++ b/gtk/gtktextsegment.h @@ -131,10 +131,10 @@ struct _GtkTextLineSegmentClass { */ struct _GtkTextLineSegment { - GtkTextLineSegmentClass *type; /* Pointer to record describing - * segment's type. */ - GtkTextLineSegment *next; /* Next in list of segments for this - * line, or NULL for end of list. */ + const GtkTextLineSegmentClass *type; /* Pointer to record describing + * segment's type. */ + GtkTextLineSegment *next; /* Next in list of segments for this + * line, or NULL for end of list. */ int char_count; /* # of chars of index space occupied */ diff --git a/gtk/gtktexttypes.h b/gtk/gtktexttypes.h index 635f6e0f50..3324ec9edc 100644 --- a/gtk/gtktexttypes.h +++ b/gtk/gtktexttypes.h @@ -55,17 +55,17 @@ typedef struct _GtkTextMarkBody GtkTextMarkBody; #endif /* In gtktextbtree.c */ -extern GtkTextLineSegmentClass gtk_text_char_type; -extern GtkTextLineSegmentClass gtk_text_toggle_on_type; -extern GtkTextLineSegmentClass gtk_text_toggle_off_type; +extern const GtkTextLineSegmentClass gtk_text_char_type; +extern const GtkTextLineSegmentClass gtk_text_toggle_on_type; +extern const GtkTextLineSegmentClass gtk_text_toggle_off_type; /* In gtktextmark.c */ -extern GtkTextLineSegmentClass gtk_text_left_mark_type; -extern GtkTextLineSegmentClass gtk_text_right_mark_type; +extern const GtkTextLineSegmentClass gtk_text_left_mark_type; +extern const GtkTextLineSegmentClass gtk_text_right_mark_type; /* In gtktextchild.c */ -extern GtkTextLineSegmentClass gtk_text_pixbuf_type; -extern GtkTextLineSegmentClass gtk_text_child_type; +extern const GtkTextLineSegmentClass gtk_text_pixbuf_type; +extern const GtkTextLineSegmentClass gtk_text_child_type; /* * UTF 8 Stubs diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c index 4ed119624c..f7fa90b7f0 100644 --- a/gtk/gtkuimanager.c +++ b/gtk/gtkuimanager.c @@ -1467,7 +1467,7 @@ text_handler (GMarkupParseContext *context, } -static GMarkupParser ui_parser = { +static const GMarkupParser ui_parser = { start_element_handler, end_element_handler, text_handler, |