summaryrefslogtreecommitdiff
path: root/gtk/gtktextbufferserialize.c
diff options
context:
space:
mode:
authorIgnacio Casal Quinteiro <icq@gnome.org>2010-07-13 11:23:57 +0200
committerIgnacio Casal Quinteiro <icq@gnome.org>2010-07-17 10:39:37 +0200
commita1be4eccb0cf3174860d9fc23f75aad3421f1886 (patch)
treee7a7d4fd3a5f0e7fea5d6c5a7685fb8c0abae0b1 /gtk/gtktextbufferserialize.c
parente42c29ca98c9a6316d5fe9158514ec0d0db52f9b (diff)
downloadgtk+-a1be4eccb0cf3174860d9fc23f75aad3421f1886.tar.gz
Move GtkTextBuffer sealed attributes to private struct.
Diffstat (limited to 'gtk/gtktextbufferserialize.c')
-rw-r--r--gtk/gtktextbufferserialize.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gtk/gtktextbufferserialize.c b/gtk/gtktextbufferserialize.c
index b6948e9d5d..76040f25c3 100644
--- a/gtk/gtktextbufferserialize.c
+++ b/gtk/gtktextbufferserialize.c
@@ -997,8 +997,11 @@ tag_exists (GMarkupParseContext *context,
ParseInfo *info,
GError **error)
{
+ GtkTextTagTable *tag_table;
const gchar *real_name;
+ tag_table = gtk_text_buffer_get_tag_table (info->buffer);
+
if (info->create_tags)
{
/* If we have an anonymous tag, just return it directly */
@@ -1010,11 +1013,11 @@ tag_exists (GMarkupParseContext *context,
real_name = g_hash_table_lookup (info->substitutions, name);
if (real_name)
- return gtk_text_tag_table_lookup (info->buffer->tag_table, real_name);
+ return gtk_text_tag_table_lookup (tag_table, real_name);
/* Next, try the list of defined tags */
if (g_hash_table_lookup (info->defined_tags, name) != NULL)
- return gtk_text_tag_table_lookup (info->buffer->tag_table, name);
+ return gtk_text_tag_table_lookup (tag_table, name);
set_error (error, context,
G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
@@ -1034,7 +1037,7 @@ tag_exists (GMarkupParseContext *context,
return NULL;
}
- tag = gtk_text_tag_table_lookup (info->buffer->tag_table, name);
+ tag = gtk_text_tag_table_lookup (tag_table, name);
if (tag)
return tag;
@@ -1225,6 +1228,7 @@ static gchar *
get_tag_name (ParseInfo *info,
const gchar *tag_name)
{
+ GtkTextTagTable *tag_table;
gchar *name;
gint i;
@@ -1234,8 +1238,9 @@ get_tag_name (ParseInfo *info,
return name;
i = 0;
+ tag_table = gtk_text_buffer_get_tag_table (info->buffer);
- while (gtk_text_tag_table_lookup (info->buffer->tag_table, name) != NULL)
+ while (gtk_text_tag_table_lookup (tag_table, name) != NULL)
{
g_free (name);
name = g_strdup_printf ("%s-%d", tag_name, ++i);
@@ -1454,7 +1459,8 @@ end_element_handler (GMarkupParseContext *context,
TextTagPrio *prio = list->data;
if (info->create_tags)
- gtk_text_tag_table_add (info->buffer->tag_table, prio->tag);
+ gtk_text_tag_table_add (gtk_text_buffer_get_tag_table (info->buffer),
+ prio->tag);
g_object_unref (prio->tag);
prio->tag = NULL;