[gnome-builder] flatpak: get context from workbench
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] flatpak: get context from workbench
- Date: Mon, 20 Nov 2017 22:16:21 +0000 (UTC)
commit 24dea04d8b8503005c467640fe4b7616a2e7ed66
Author: Christian Hergert <chergert redhat com>
Date: Mon Nov 20 14:16:09 2017 -0800
flatpak: get context from workbench
The transfer manager is not an IdeObject any longer, as it is attached to
the IdeApplication. So we need to get a context from somewhere else.
src/plugins/flatpak/gbp-flatpak-workbench-addin.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-workbench-addin.c
b/src/plugins/flatpak/gbp-flatpak-workbench-addin.c
index 131c5a7..8002cc4 100644
--- a/src/plugins/flatpak/gbp-flatpak-workbench-addin.c
+++ b/src/plugins/flatpak/gbp-flatpak-workbench-addin.c
@@ -176,6 +176,10 @@ gbp_flatpak_workbench_addin_install_cb (GObject *object,
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (GBP_IS_FLATPAK_WORKBENCH_ADDIN (self));
+ /* Make sure we've not been destroyed */
+ if (self->workbench == NULL)
+ IDE_EXIT;
+
action = g_action_map_lookup_action (G_ACTION_MAP (self->actions), "install-flatpak-builder");
g_simple_action_set_enabled (G_SIMPLE_ACTION (action), TRUE);
@@ -186,7 +190,7 @@ gbp_flatpak_workbench_addin_install_cb (GObject *object,
}
else
{
- IdeContext *context = ide_object_get_context (IDE_OBJECT (manager));
+ IdeContext *context = ide_workbench_get_context (self->workbench);
IdeConfigurationManager *config_manager = ide_context_get_configuration_manager (context);
/* TODO: It would be nice to have a cleaner way to re-setup the pipeline
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]