diff options
author | Matthias Clasen <mclasen@redhat.com> | 2004-10-27 19:01:25 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-10-27 19:01:25 +0000 |
commit | c1885969c0439b10ba71f45b1007e80e9c7bf566 (patch) | |
tree | c0fbf3aa55d10282a219965c768e518f581dbe22 /gtk/gtkclipboard.c | |
parent | 599851c837253421d595f9d1fcf05b440d9da2a1 (diff) | |
download | gtk+-c1885969c0439b10ba71f45b1007e80e9c7bf566.tar.gz |
Silently ignore non-CLIPBOARD clipboards. (#156610, Christian Persch)
2004-10-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkclipboard.c (gtk_clipboard_set_can_store): Silently
ignore non-CLIPBOARD clipboards. (#156610, Christian Persch)
Diffstat (limited to 'gtk/gtkclipboard.c')
-rw-r--r-- | gtk/gtkclipboard.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/gtkclipboard.c b/gtk/gtkclipboard.c index abb6ad2648..10f4793b1f 100644 --- a/gtk/gtkclipboard.c +++ b/gtk/gtkclipboard.c @@ -1351,7 +1351,9 @@ gtk_clipboard_set_can_store (GtkClipboard *clipboard, }; g_return_if_fail (GTK_IS_CLIPBOARD (clipboard)); - g_return_if_fail (clipboard->selection == GDK_SELECTION_CLIPBOARD); + + if (clipboard->selection != GDK_SELECTION_CLIPBOARD) + return; g_free (clipboard->storable_targets); @@ -1361,8 +1363,7 @@ gtk_clipboard_set_can_store (GtkClipboard *clipboard, * gtk_clipboard_set_can_store hasn't been called since the * clipboard owner changed. We only want to add SAVE_TARGETS and * ref the owner once , so we do that here - */ - + */ if (clipboard->n_storable_targets == -1) { gtk_selection_add_targets (clipboard_widget, clipboard->selection, |