Commit 2db879fe authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Bug 557315 – stale clipboard target cache

2008-10-25  Matthias Clasen  <mclasen@redhat.com>

        Bug 557315 – stale clipboard target cache

        * gtk/gtkclipboard.c (gtk_clipboard_set_contents): Remove cached
        targets. Pointed out by Evan Stade


svn path=/trunk/; revision=21713
parent c2923790
2008-10-25 Matthias Clasen <mclasen@redhat.com>
Bug 557315 – stale clipboard target cache
* gtk/gtkclipboard.c (gtk_clipboard_set_contents): Remove cached
targets. Pointed out by Evan Stade
2008-10-24 Tristan Van Berkom <tvb@gnome.org>
* gtk/gtkwidget.c: Added a note about GtkWidget:has-tooltip in
......
......@@ -236,6 +236,7 @@ gtk_clipboard_finalize (GObject *object)
g_signal_handler_disconnect (clipboard_widget, clipboard->notify_signal_id);
g_free (clipboard->storable_targets);
g_free (clipboard->cached_targets);
G_OBJECT_CLASS (gtk_clipboard_parent_class)->finalize (object);
}
......@@ -514,6 +515,13 @@ gtk_clipboard_set_contents (GtkClipboard *clipboard,
{
clipboard->have_selection = TRUE;
if (clipboard->n_cached_targets != -1)
{
g_free (clipboard->cached_targets);
clipboard->cached_targets = NULL;
clipboard->n_cached_targets = -1;
}
if (!(clipboard->have_owner && have_owner) ||
clipboard->user_data != user_data)
{
......@@ -1840,8 +1848,9 @@ gtk_clipboard_owner_change (GtkClipboard *clipboard,
{
if (clipboard->n_cached_targets != -1)
{
clipboard->n_cached_targets = -1;
g_free (clipboard->cached_targets);
clipboard->cached_targets = NULL;
clipboard->n_cached_targets = -1;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment