[gnome-builder] object: allow hooking into IdeObject::set_context()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] object: allow hooking into IdeObject::set_context()
- Date: Sat, 26 Sep 2015 05:35:40 +0000 (UTC)
commit 59ecfab6dd38ce1f4ba6f849eab6ea424c7b78a4
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]