diff options
author | Havoc Pennington <hp@redhat.com> | 2001-02-19 23:27:27 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2001-02-19 23:27:27 +0000 |
commit | bc31a1bcca308f345343aa82f0b54072fccbc693 (patch) | |
tree | 591e11b74eae3ea337250ac03a3e6880de9a8557 /gtk/gtktextchild.c | |
parent | 027c3154997eed2f371025399b764321b44a19b3 (diff) | |
download | gtk+-bc31a1bcca308f345343aa82f0b54072fccbc693.tar.gz |
add insert_child_anchor signal, bug #50245
2001-02-19 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.h (struct _GtkTextBufferClass): add
insert_child_anchor signal, bug #50245
* gtk/gtktextbtree.c (_gtk_text_btree_insert_child_anchor): change
from create_child_anchor, so the anchor is passed in
* gtk/gtktextchild.c (gtk_text_child_anchor_new): new function
(_gtk_widget_segment_new): have the child anchor object passed in,
instead of creating it.
* gtk/gtktextbuffer.c (gtk_text_buffer_modified): rename
to gtk_text_buffer_get_modified
Diffstat (limited to 'gtk/gtktextchild.c')
-rw-r--r-- | gtk/gtktextchild.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk/gtktextchild.c b/gtk/gtktextchild.c index ee0537e4a2..6c573b7568 100644 --- a/gtk/gtktextchild.c +++ b/gtk/gtktextchild.c @@ -199,7 +199,7 @@ GtkTextLineSegmentClass gtk_text_child_type = { + sizeof (GtkTextChildBody))) GtkTextLineSegment * -_gtk_widget_segment_new (void) +_gtk_widget_segment_new (GtkTextChildAnchor *anchor) { GtkTextLineSegment *seg; @@ -214,12 +214,14 @@ _gtk_widget_segment_new (void) */ seg->char_count = 1; - seg->body.child.obj = g_object_new (GTK_TYPE_TEXT_CHILD_ANCHOR, NULL); + seg->body.child.obj = anchor; seg->body.child.obj->segment = seg; seg->body.child.widgets = NULL; seg->body.child.tree = NULL; seg->body.child.line = NULL; + g_object_ref (G_OBJECT (anchor)); + return seg; } @@ -331,6 +333,13 @@ gtk_text_child_anchor_class_init (GtkTextChildAnchorClass *klass) object_class->finalize = gtk_text_child_anchor_finalize; } +GtkTextChildAnchor* +gtk_text_child_anchor_new (void) +{ + return GTK_TEXT_CHILD_ANCHOR (g_object_new (GTK_TYPE_TEXT_CHILD_ANCHOR, + NULL)); +} + static void gtk_text_child_anchor_finalize (GObject *obj) { |