[gnome-builder] plugins/sessionui: add hooks for session save/restore
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] plugins/sessionui: add hooks for session save/restore
- Date: Thu, 15 Sep 2022 00:01:14 +0000 (UTC)
commit fcc0c26e68717223e80b1e5871ac50be1143ff9e
Author: Christian Hergert <chergert redhat com>
Date: Wed Sep 14 17:01:01 2022 -0700
plugins/sessionui: add hooks for session save/restore
.../sessionui/gbp-sessionui-workbench-addin.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
---
diff --git a/src/plugins/sessionui/gbp-sessionui-workbench-addin.c
b/src/plugins/sessionui/gbp-sessionui-workbench-addin.c
index 1023feaae..8cf1a51ae 100644
--- a/src/plugins/sessionui/gbp-sessionui-workbench-addin.c
+++ b/src/plugins/sessionui/gbp-sessionui-workbench-addin.c
@@ -56,11 +56,33 @@ gbp_sessionui_workbench_addin_unload (IdeWorkbenchAddin *addin,
self->workbench = NULL;
}
+static void
+gbp_sessionui_workbench_addin_save_session (IdeWorkbenchAddin *addin,
+ IdeSession *session)
+{
+ GbpSessionuiWorkbenchAddin *self = (GbpSessionuiWorkbenchAddin *)addin;
+
+ g_assert (GBP_IS_SESSIONUI_WORKBENCH_ADDIN (self));
+ g_assert (IDE_IS_SESSION (session));
+}
+
+static void
+gbp_sessionui_workbench_addin_restore_session (IdeWorkbenchAddin *addin,
+ IdeSession *session)
+{
+ GbpSessionuiWorkbenchAddin *self = (GbpSessionuiWorkbenchAddin *)addin;
+
+ g_assert (GBP_IS_SESSIONUI_WORKBENCH_ADDIN (self));
+ g_assert (IDE_IS_SESSION (session));
+}
+
static void
workbench_addin_iface_init (IdeWorkbenchAddinInterface *iface)
{
iface->load = gbp_sessionui_workbench_addin_load;
iface->unload = gbp_sessionui_workbench_addin_unload;
+ iface->save_session = gbp_sessionui_workbench_addin_save_session;
+ iface->restore_session = gbp_sessionui_workbench_addin_restore_session;
}
G_DEFINE_FINAL_TYPE_WITH_CODE (GbpSessionuiWorkbenchAddin, gbp_sessionui_workbench_addin, G_TYPE_OBJECT,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]