[gnome-builder/gnome-builder-3-18] object: allow hooking into IdeObject::set_context()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-18] object: allow hooking into IdeObject::set_context()
- Date: Tue, 13 Oct 2015 07:23:55 +0000 (UTC)
commit 28991cb6414a71a60ddf507a8e0deaafd3e51441
Author: Christian Hergert <christian hergert me>
Date: Thu Sep 24 06:25:55 2015 -0700
object: allow hooking into IdeObject::set_context()
libide/ide-object.c | 3 +++
libide/ide-object.h | 4 +++-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-object.c b/libide/ide-object.c
index ad3d532..0394319 100644
--- a/libide/ide-object.c
+++ b/libide/ide-object.c
@@ -138,6 +138,9 @@ ide_object_set_context (IdeObject *self,
self);
}
+ if (IDE_OBJECT_GET_CLASS (self)->set_context)
+ IDE_OBJECT_GET_CLASS (self)->set_context (self, context);
+
g_object_notify_by_pspec (G_OBJECT (self), gParamSpecs [PROP_CONTEXT]);
}
}
diff --git a/libide/ide-object.h b/libide/ide-object.h
index 2337a7d..a32352d 100644
--- a/libide/ide-object.h
+++ b/libide/ide-object.h
@@ -33,7 +33,9 @@ struct _IdeObjectClass
{
GObjectClass parent;
- void (*destroy) (IdeObject *self);
+ void (*destroy) (IdeObject *self);
+ void (*set_context) (IdeObject *self,
+ IdeContext *context);
};
IdeContext *ide_object_get_context (IdeObject *self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]