diff options
author | Havoc Pennington <hp@redhat.com> | 2001-12-05 01:43:48 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2001-12-05 01:43:48 +0000 |
commit | 6b1407a3eccd772a6ad25e058bd0b0a9881f9ccb (patch) | |
tree | 75861622240b902dfe2e85cc5c2419f7a1abae2f /gtk/gtktextbtree.c | |
parent | a7bab735ad1ef4d8e5736f58b50c9003aa244e8f (diff) | |
download | gtk+-6b1407a3eccd772a6ad25e058bd0b0a9881f9ccb.tar.gz |
remove g_assert_not_reached() that was bogus, since we demand-create the
2001-12-04 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbtree.c (gtk_text_btree_remove_tag_info): remove
g_assert_not_reached() that was bogus, since we demand-create the
tag info. reported by Chris Phelps
Jump through assorted hoops to fix bug from Chris Phelps where
removing tags from the table resulted in btree trying to
access tag->table
* gtk/gtktextbuffer.c: set up mechanics of adding/removing
ourselves to the tag table
* gtk/gtktexttagtable.c (_gtk_text_tag_table_add_buffer)
(_gtk_text_tag_table_remove_buffer): private cruft to
let us notify buffer of disappearing tags
* gtk/gtktexttag.h: remove BTreeNode typedef from this public
header, put it in tagprivate
* gtk/gtktextbtree.c (_gtk_text_btree_new): don't connect to
tag_removed; it's emitted too late.
(_gtk_text_btree_notify_will_remove_tag): rename tag_remove_cb to
this
Padding for ABI-compat expansion
* gtk/gtktexttag.h (struct _GtkTextAttributes): pad this
(struct _GtkTextAppearance): one pad in here too
* gtk/gtktextlayout.h (struct _GtkTextLayoutClass): padding here
* gtk/gtktextview.h (struct _GtkTextViewClass): more padding,
since action signals etc. seem pretty likely
* gtk/gtktextbuffer.h (struct _GtkTextBufferClass): padding
* gtk/gtktexttag.h (struct _GtkTextTagClass): padding
* gtk/gtktexttagtable.h (struct _GtkTextTagTableClass): padding
Diffstat (limited to 'gtk/gtktextbtree.c')
-rw-r--r-- | gtk/gtktextbtree.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 44cf702c3c..87713ff40b 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -184,7 +184,7 @@ struct _GtkTextBTree { BTreeView *views; GSList *tag_infos; guint tag_changed_handler; - guint tag_removed_handler; + /* Incremented when a segment with a byte size > 0 * is added to or removed from the tree (i.e. the * length of a line may have changed, and lines may @@ -315,9 +315,6 @@ static void tag_changed_cb (GtkTextTagTable *table, GtkTextTag *tag, gboolean size_changed, GtkTextBTree *tree); -static void tag_removed_cb (GtkTextTagTable *table, - GtkTextTag *tag, - GtkTextBTree *tree); static void cleanup_line (GtkTextLine *line); static void recompute_node_counts (GtkTextBTree *tree, GtkTextBTreeNode *node); @@ -436,11 +433,6 @@ _gtk_text_btree_new (GtkTextTagTable *table, G_CALLBACK (tag_changed_cb), tree); - tree->tag_removed_handler = g_signal_connect (G_OBJECT (tree->table), - "tag_removed", - G_CALLBACK (tag_removed_cb), - tree); - tree->mark_table = g_hash_table_new (g_str_hash, g_str_equal); tree->child_anchor_table = NULL; @@ -519,9 +511,6 @@ _gtk_text_btree_unref (GtkTextBTree *tree) g_signal_handler_disconnect (G_OBJECT (tree->table), tree->tag_changed_handler); - g_signal_handler_disconnect (G_OBJECT (tree->table), - tree->tag_removed_handler); - g_object_unref (G_OBJECT (tree->table)); g_free (tree); @@ -5480,10 +5469,9 @@ tag_changed_cb (GtkTextTagTable *table, } } -static void -tag_removed_cb (GtkTextTagTable *table, - GtkTextTag *tag, - GtkTextBTree *tree) +void +_gtk_text_btree_notify_will_remove_tag (GtkTextBTree *tree, + GtkTextTag *tag) { /* Remove the tag from the tree */ @@ -5852,9 +5840,6 @@ gtk_text_btree_remove_tag_info (GtkTextBTree *tree, list = g_slist_next (list); } - - g_assert_not_reached (); - return; } static void |