Commit fc9895cb authored by Christian Hergert's avatar Christian Hergert
Browse files

buildui: set runtime/device sensitivity

The configuration can tell us if it supports the runtime or
device. So we should use that to set the sensitivity of the
row in the configuration view.
parent 2563567a
......@@ -74,10 +74,13 @@ create_runtime_row (gpointer item,
GtkWidget *image;
GtkWidget *label;
GtkWidget *row;
gboolean sensitive;
g_assert (IDE_IS_RUNTIME (runtime));
g_assert (IDE_IS_CONFIGURATION (configuration));
sensitive = ide_configuration_supports_runtime (configuration, runtime);
box = g_object_new (GTK_TYPE_BOX,
"spacing", 12,
"visible", TRUE,
......@@ -112,6 +115,7 @@ create_runtime_row (gpointer item,
row = g_object_new (GTK_TYPE_LIST_BOX_ROW,
"child", box,
"sensitive", sensitive,
"visible", TRUE,
NULL);
......@@ -130,10 +134,13 @@ create_device_row (gpointer item,
GtkWidget *image;
GtkWidget *label;
GtkWidget *row;
gboolean sensitive;
g_assert (IDE_IS_DEVICE (device));
g_assert (IDE_IS_CONFIGURATION (configuration));
sensitive = ide_configuration_supports_device (configuration, device);
box = g_object_new (GTK_TYPE_BOX,
"spacing", 12,
"visible", TRUE,
......@@ -168,6 +175,7 @@ create_device_row (gpointer item,
row = g_object_new (GTK_TYPE_LIST_BOX_ROW,
"child", box,
"sensitive", sensitive,
"visible", TRUE,
NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment