diff options
author | Michael Natterer <mitch@imendio.com> | 2006-03-22 10:39:51 +0000 |
---|---|---|
committer | Michael Natterer <mitch@src.gnome.org> | 2006-03-22 10:39:51 +0000 |
commit | ca658057e5bc60af2dc7b8ce026095d319398281 (patch) | |
tree | d0cfa309c236a7dc9efcacf921be45484f8d161a /gtk/gtktextbuffer.h | |
parent | 0c230f60610f22b537d206e3fe64fdebbb609bf7 (diff) | |
download | gtk+-ca658057e5bc60af2dc7b8ce026095d319398281.tar.gz |
count down from G_MAXUINT to avoid clashes with application-added DND
2006-03-22 Michael Natterer <mitch@imendio.com>
* gtk/gtktextbuffer.h (enum GtkTextBufferTargetInfo): count down
from G_MAXUINT to avoid clashes with application-added DND
targets.
* gtk/gtktextview.c (gtk_text_view_init): set an empty
GtkTargetList on the drag_dest so it is not NULL when a derived
class' init() function is called.
(gtk_text_view_target_list_notify): copy the text buffer's paste
targets into the view's destinstion target list (preserving
application-added DND targets), instead of replacing the view's
target list. Fixes bug #334399.
Diffstat (limited to 'gtk/gtktextbuffer.h')
-rw-r--r-- | gtk/gtktextbuffer.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk/gtktextbuffer.h b/gtk/gtktextbuffer.h index 7d69a600d5..79f969ccfa 100644 --- a/gtk/gtktextbuffer.h +++ b/gtk/gtktextbuffer.h @@ -43,12 +43,15 @@ G_BEGIN_DECLS /* these values are used as "info" for the targets contained in the * lists returned by gtk_text_buffer_get_copy,paste_target_list() + * + * the enum counts down from G_MAXUINT to avoid clashes with application + * added drag destinations which usually start at 0. */ typedef enum { - GTK_TEXT_BUFFER_TARGET_INFO_BUFFER_CONTENTS, - GTK_TEXT_BUFFER_TARGET_INFO_RICH_TEXT, - GTK_TEXT_BUFFER_TARGET_INFO_TEXT + GTK_TEXT_BUFFER_TARGET_INFO_BUFFER_CONTENTS = G_MAXUINT - 0, + GTK_TEXT_BUFFER_TARGET_INFO_RICH_TEXT = G_MAXUINT - 1, + GTK_TEXT_BUFFER_TARGET_INFO_TEXT = G_MAXUINT - 2 } GtkTextBufferTargetInfo; typedef struct _GtkTextBTree GtkTextBTree; |