[sysprof/wip/gtk4-port] recordingstateview: port to GTK 4
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/gtk4-port] recordingstateview: port to GTK 4
- Date: Fri, 1 Oct 2021 17:56:15 +0000 (UTC)
commit 8b0f07098b591c10311cf7d5d6221cf72cb33f0e
Author: Christian Hergert <chergert redhat com>
Date: Fri Oct 1 10:56:10 2021 -0700
recordingstateview: port to GTK 4
src/libsysprof-ui/sysprof-recording-state-view.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-recording-state-view.c
b/src/libsysprof-ui/sysprof-recording-state-view.c
index 1e2ecebf..b37978bb 100644
--- a/src/libsysprof-ui/sysprof-recording-state-view.c
+++ b/src/libsysprof-ui/sysprof-recording-state-view.c
@@ -79,18 +79,18 @@ sysprof_recording_state_view_notify_elapsed (SysprofRecordingStateView *self,
}
static void
-sysprof_recording_state_view_destroy (GtkWidget *widget)
+sysprof_recording_state_view_dispose (GObject *object)
{
- SysprofRecordingStateView *self = (SysprofRecordingStateView *)widget;
+ SysprofRecordingStateView *self = (SysprofRecordingStateView *)object;
SysprofRecordingStateViewPrivate *priv = sysprof_recording_state_view_get_instance_private (self);
if (priv->profiler != NULL)
{
- g_signal_handler_disconnect (priv->profiler, priv->notify_elapsed_handler);
+ g_clear_signal_handler (&priv->notify_elapsed_handler, priv->profiler);
g_clear_object (&priv->profiler);
}
- GTK_WIDGET_CLASS (sysprof_recording_state_view_parent_class)->destroy (widget);
+ G_OBJECT_CLASS (sysprof_recording_state_view_parent_class)->dispose (object);
}
static void
@@ -138,11 +138,10 @@ sysprof_recording_state_view_class_init (SysprofRecordingStateViewClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ object_class->dispose = sysprof_recording_state_view_dispose;
object_class->get_property = sysprof_recording_state_view_get_property;
object_class->set_property = sysprof_recording_state_view_set_property;
- widget_class->destroy = sysprof_recording_state_view_destroy;
-
properties [PROP_PROFILER] =
g_param_spec_object ("profiler",
"Profiler",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]