[gnome-builder] debuggerui: style cleanup and fix ref tracking
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] debuggerui: style cleanup and fix ref tracking
- Date: Fri, 7 May 2021 16:45:30 +0000 (UTC)
commit 12ca73398016372869c5a36a5d9d49c2914b9b00
Author: Christian Hergert <chergert redhat com>
Date: Fri May 7 09:45:24 2021 -0700
debuggerui: style cleanup and fix ref tracking
src/plugins/debuggerui/ide-debugger-log-view.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/debuggerui/ide-debugger-log-view.c b/src/plugins/debuggerui/ide-debugger-log-view.c
index 5033a27b4..014221816 100644
--- a/src/plugins/debuggerui/ide-debugger-log-view.c
+++ b/src/plugins/debuggerui/ide-debugger-log-view.c
@@ -52,13 +52,13 @@ ide_debugger_log_view_new (void)
}
static void
-ide_debugger_log_view_finalize (GObject *object)
+ide_debugger_log_view_dispose (GObject *object)
{
IdeDebuggerLogView *self = (IdeDebuggerLogView *)object;
g_clear_object (&self->debugger);
- G_OBJECT_CLASS (ide_debugger_log_view_parent_class)->finalize (object);
+ G_OBJECT_CLASS (ide_debugger_log_view_parent_class)->dispose (object);
}
static void
@@ -74,6 +74,7 @@ ide_debugger_log_view_get_property (GObject *object,
case PROP_DEBUGGER:
g_value_set_object (value, ide_debugger_log_view_get_debugger (self));
break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -92,6 +93,7 @@ ide_debugger_log_view_set_property (GObject *object,
case PROP_DEBUGGER:
ide_debugger_log_view_set_debugger (self, g_value_get_object (value));
break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -161,7 +163,7 @@ ide_debugger_log_view_class_init (IdeDebuggerLogViewClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->finalize = ide_debugger_log_view_finalize;
+ object_class->dispose = ide_debugger_log_view_dispose;
object_class->get_property = ide_debugger_log_view_get_property;
object_class->set_property = ide_debugger_log_view_set_property;
@@ -237,7 +239,8 @@ ide_debugger_log_view_set_debugger (IdeDebuggerLogView *self,
g_return_if_fail (IDE_IS_DEBUGGER_LOG_VIEW (self));
g_return_if_fail (!debugger || IDE_IS_DEBUGGER (debugger));
- self->debugger = g_object_ref (debugger);
+ if (g_set_object (&self->debugger, debugger))
+ g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_DEBUGGER]);
}
IdeDebugger *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]