[gnome-builder] flatpak: ensure configuration requires GbpFlatpakRuntime
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] flatpak: ensure configuration requires GbpFlatpakRuntime
- Date: Tue, 14 Feb 2017 19:26:32 +0000 (UTC)
commit 68e4f4531c9489fb5f639b3e0e8344242782e175
Author: Christian Hergert <chergert redhat com>
Date: Tue Feb 14 11:26:11 2017 -0800
flatpak: ensure configuration requires GbpFlatpakRuntime
We only can use flatpak runtimes for build configurations for flatpak
applications. So ensure that we filter those down when asked by the
configuration view.
plugins/flatpak/gbp-flatpak-configuration.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-configuration.c b/plugins/flatpak/gbp-flatpak-configuration.c
index 758fe82..d3dea00 100644
--- a/plugins/flatpak/gbp-flatpak-configuration.c
+++ b/plugins/flatpak/gbp-flatpak-configuration.c
@@ -189,6 +189,16 @@ gbp_flatpak_configuration_set_sdk (GbpFlatpakConfiguration *self,
}
}
+static gboolean
+gbp_flatpak_configuration_supports_runtime (IdeConfiguration *configuration,
+ IdeRuntime *runtime)
+{
+ g_assert (GBP_IS_FLATPAK_CONFIGURATION (configuration));
+ g_assert (IDE_IS_RUNTIME (runtime));
+
+ return GBP_IS_FLATPAK_RUNTIME (runtime);
+}
+
static void
gbp_flatpak_configuration_get_property (GObject *object,
guint prop_id,
@@ -295,11 +305,14 @@ static void
gbp_flatpak_configuration_class_init (GbpFlatpakConfigurationClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ IdeConfigurationClass *config_class = IDE_CONFIGURATION_CLASS (klass);
object_class->finalize = gbp_flatpak_configuration_finalize;
object_class->get_property = gbp_flatpak_configuration_get_property;
object_class->set_property = gbp_flatpak_configuration_set_property;
+ config_class->supports_runtime = gbp_flatpak_configuration_supports_runtime;
+
properties [PROP_BRANCH] =
g_param_spec_string ("branch",
"Branch",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]