From d3c9910ad2eead372836f24caba2b8724376eddb Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 7 Nov 2000 23:05:19 +0000 Subject: Half-ass somewhat fix this function, so that scrolling to the insertion 2000-11-07 Havoc Pennington * gtk/gtktextlayout.c (gtk_text_layout_get_iter_location): Half-ass somewhat fix this function, so that scrolling to the insertion point works. Pango hacking is in the future to really fix it. * gtk/gtktextview.c (gtk_text_view_drag_data_get): Don't calculate length of data, no longer used. * gtk/gtktextbuffer.c (gtk_text_buffer_finalize): move destroy method contents in here, get rid of destroy method (gtk_text_buffer_insert_range): Fix some g_return_if_fail checks that were backward. Remove debug spew. (cut_or_copy): Make the clipboard work with insert_range to preserve tags and pixbufs, not just the primary selection. --- gtk/gtktextbuffer.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gtk/gtktextbuffer.h') diff --git a/gtk/gtktextbuffer.h b/gtk/gtktextbuffer.h index 54844e1465..f8c00a6710 100644 --- a/gtk/gtktextbuffer.h +++ b/gtk/gtktextbuffer.h @@ -53,17 +53,21 @@ typedef struct _GtkTextBTree GtkTextBTree; typedef struct _GtkTextBufferClass GtkTextBufferClass; -struct _GtkTextBuffer { +struct _GtkTextBuffer +{ GtkObject parent_instance; GtkTextTagTable *tag_table; GtkTextBTree *btree; + GtkTextBuffer *clipboard_contents; + /* Whether the buffer has been modified since last save */ - gboolean modified; + guint modified : 1; }; -struct _GtkTextBufferClass { +struct _GtkTextBufferClass +{ GtkObjectClass parent_class; void (* insert_text) (GtkTextBuffer *buffer, -- cgit v1.2.1