diff options
author | Michael Natterer <mitch@imendio.com> | 2008-06-16 22:47:50 +0000 |
---|---|---|
committer | Michael Natterer <mitch@src.gnome.org> | 2008-06-16 22:47:50 +0000 |
commit | 9dd2aa7edc150d6f21c6a7346d1ad62d414778d9 (patch) | |
tree | 8e83a333e890fe20b7ab41641eaa3bcc20e4fddf | |
parent | a09bebd5b98180cf9ba3d3f6ff1208ac40af2ae8 (diff) | |
download | gtk+-9dd2aa7edc150d6f21c6a7346d1ad62d414778d9.tar.gz |
use g_object_ref() and unref() instead of the deprecated gtk_widget_ref()
2008-06-17 Michael Natterer <mitch@imendio.com>
* gtk/gtkplug.c (_gtk_plug_send_delete_event): use g_object_ref()
and unref() instead of the deprecated gtk_widget_ref() and unref().
svn path=/trunk/; revision=20411
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gtk/gtkplug.c | 10 |
2 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,8 @@ +2008-06-17 Michael Natterer <mitch@imendio.com> + + * gtk/gtkplug.c (_gtk_plug_send_delete_event): use g_object_ref() + and unref() instead of the deprecated gtk_widget_ref() and unref(). + 2008-06-16 Michael Natterer <mitch@imendio.com> * gtk/gtkentry.c: removed function drag_begin_cb(), which was in diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c index 6fc1e53667..1c07d72d32 100644 --- a/gtk/gtkplug.c +++ b/gtk/gtkplug.c @@ -294,16 +294,16 @@ void _gtk_plug_send_delete_event (GtkWidget *widget) { GdkEvent *event = gdk_event_new (GDK_DELETE); - + event->any.window = g_object_ref (widget->window); event->any.send_event = FALSE; - gtk_widget_ref (widget); - + g_object_ref (widget); + if (!gtk_widget_event (widget, event)) gtk_widget_destroy (widget); - - gtk_widget_unref (widget); + + g_object_unref (widget); gdk_event_free (event); } |