Merge branch 'g-clear-pointer-propagate' into 'master'

Remove GDestroyNotify casts in g_clear_pointer() uses

See merge request GNOME/gtk!269
This commit is contained in:
Timm Bäder 2018-07-26 07:34:12 +00:00
commit 798ad9f62a
7 changed files with 12 additions and 12 deletions

View File

@ -52,13 +52,13 @@ static void
gdk_wayland_clipboard_discard_offer (GdkWaylandClipboard *cb) gdk_wayland_clipboard_discard_offer (GdkWaylandClipboard *cb)
{ {
g_clear_pointer (&cb->offer_formats, gdk_content_formats_unref); g_clear_pointer (&cb->offer_formats, gdk_content_formats_unref);
g_clear_pointer (&cb->offer, (GDestroyNotify) wl_data_offer_destroy); g_clear_pointer (&cb->offer, wl_data_offer_destroy);
} }
static void static void
gdk_wayland_clipboard_discard_source (GdkWaylandClipboard *cb) gdk_wayland_clipboard_discard_source (GdkWaylandClipboard *cb)
{ {
g_clear_pointer (&cb->source, (GDestroyNotify) wl_data_source_destroy); g_clear_pointer (&cb->source, wl_data_source_destroy);
} }
static void static void

View File

@ -1087,7 +1087,7 @@ gdk_wayland_seat_discard_pending_offer (GdkWaylandSeat *seat)
gdk_content_formats_unref (ignore); gdk_content_formats_unref (ignore);
seat->pending_builder = NULL; seat->pending_builder = NULL;
} }
g_clear_pointer (&seat->pending_offer, (GDestroyNotify) wl_data_offer_destroy); g_clear_pointer (&seat->pending_offer, wl_data_offer_destroy);
seat->pending_source_actions = 0; seat->pending_source_actions = 0;
seat->pending_action = 0; seat->pending_action = 0;
} }

View File

@ -78,8 +78,8 @@ gdk_wayland_drag_finalize (GObject *object)
gdk_drag_set_cursor (drag, NULL); gdk_drag_set_cursor (drag, NULL);
g_clear_pointer (&wayland_drag->data_source, (GDestroyNotify) wl_data_source_destroy); g_clear_pointer (&wayland_drag->data_source, wl_data_source_destroy);
g_clear_pointer (&wayland_drag->offer, (GDestroyNotify) wl_data_offer_destroy); g_clear_pointer (&wayland_drag->offer, wl_data_offer_destroy);
dnd_surface = wayland_drag->dnd_surface; dnd_surface = wayland_drag->dnd_surface;

View File

@ -69,7 +69,7 @@ gdk_wayland_drop_finalize (GObject *object)
{ {
GdkWaylandDrop *wayland_drop = GDK_WAYLAND_DROP (object); GdkWaylandDrop *wayland_drop = GDK_WAYLAND_DROP (object);
g_clear_pointer (&wayland_drop->offer, (GDestroyNotify) wl_data_offer_destroy); g_clear_pointer (&wayland_drop->offer, wl_data_offer_destroy);
G_OBJECT_CLASS (gdk_wayland_drop_parent_class)->finalize (object); G_OBJECT_CLASS (gdk_wayland_drop_parent_class)->finalize (object);
} }

View File

@ -62,20 +62,20 @@ gdk_wayland_primary_discard_pending (GdkWaylandPrimary *cb)
gdk_content_formats_unref (ignore); gdk_content_formats_unref (ignore);
cb->pending_builder = NULL; cb->pending_builder = NULL;
} }
g_clear_pointer (&cb->pending, (GDestroyNotify) gtk_primary_selection_offer_destroy); g_clear_pointer (&cb->pending, gtk_primary_selection_offer_destroy);
} }
static void static void
gdk_wayland_primary_discard_offer (GdkWaylandPrimary *cb) gdk_wayland_primary_discard_offer (GdkWaylandPrimary *cb)
{ {
g_clear_pointer (&cb->offer_formats, gdk_content_formats_unref); g_clear_pointer (&cb->offer_formats, gdk_content_formats_unref);
g_clear_pointer (&cb->offer, (GDestroyNotify) gtk_primary_selection_offer_destroy); g_clear_pointer (&cb->offer, gtk_primary_selection_offer_destroy);
} }
static void static void
gdk_wayland_primary_discard_source (GdkWaylandPrimary *cb) gdk_wayland_primary_discard_source (GdkWaylandPrimary *cb)
{ {
g_clear_pointer (&cb->source, (GDestroyNotify) wl_data_source_destroy); g_clear_pointer (&cb->source, gtk_primary_selection_source_destroy);
} }
static void static void

View File

@ -847,7 +847,7 @@ gtk_drag_content_finalize (GObject *object)
GtkDragContent *content = GTK_DRAG_CONTENT (object); GtkDragContent *content = GTK_DRAG_CONTENT (object);
g_clear_object (&content->widget); g_clear_object (&content->widget);
g_clear_pointer (&content->formats, (GDestroyNotify) gdk_content_formats_unref); g_clear_pointer (&content->formats, gdk_content_formats_unref);
G_OBJECT_CLASS (gtk_drag_content_parent_class)->finalize (object); G_OBJECT_CLASS (gtk_drag_content_parent_class)->finalize (object);
} }

View File

@ -3253,7 +3253,7 @@ scrolled_window_deceleration_cb (GtkWidget *widget,
gtk_adjustment_set_value (hadjustment, position); gtk_adjustment_set_value (hadjustment, position);
} }
else if (data->hscrolling) else if (data->hscrolling)
g_clear_pointer (&data->hscrolling, (GDestroyNotify) gtk_kinetic_scrolling_free); g_clear_pointer (&data->hscrolling, gtk_kinetic_scrolling_free);
if (data->vscrolling && if (data->vscrolling &&
gtk_kinetic_scrolling_tick (data->vscrolling, elapsed, &position)) gtk_kinetic_scrolling_tick (data->vscrolling, elapsed, &position))
@ -3262,7 +3262,7 @@ scrolled_window_deceleration_cb (GtkWidget *widget,
gtk_adjustment_set_value (vadjustment, position); gtk_adjustment_set_value (vadjustment, position);
} }
else if (data->vscrolling) else if (data->vscrolling)
g_clear_pointer (&data->vscrolling, (GDestroyNotify) gtk_kinetic_scrolling_free); g_clear_pointer (&data->vscrolling, gtk_kinetic_scrolling_free);
if (!data->hscrolling && !data->vscrolling) if (!data->hscrolling && !data->vscrolling)
{ {