+static GtkWidget *widgets[FIO_MAX_OPTS];
+
+/*
+ * Mark children as invisible, if needed.
+ */
+static void gopt_set_children_visible(struct fio_option *parent, gboolean visible)
+{
+ struct fio_option *o;
+ int i;
+
+ /*
+ * This isn't super fast, but it should not be an issue. If it is, we
+ * can speed it up by caching the lookup at least. Or we can do it
+ * once, at init time.
+ */
+ for (i = 0; fio_options[i].name; i++) {
+ o = &fio_options[i];
+ if (!o->parent)
+ continue;
+
+ if (strcmp(parent->name, o->parent))
+ continue;
+
+ /*
+ * This doesn't work for either the box or the widget itself...
+ */
+ gtk_widget_set_sensitive(widgets[i], visible);
+ }
+}
+
+static void gopt_str_changed(GtkEntry *entry, gpointer data)
+{
+ struct gopt_str *s = (struct gopt_str *) data;
+ struct fio_option *o = &fio_options[s->gopt.opt_index];
+ const gchar *text;
+ int set;
+
+ text = gtk_entry_get_text(GTK_ENTRY(s->entry));
+ set = strcmp(text, "") != 0;
+ gopt_set_children_visible(o, set);
+}
+
+static void gopt_mark_index(struct gopt *gopt, GtkWidget *widget, unsigned int idx)
+{
+ gopt->opt_index = idx;
+ widgets[idx] = widget;
+}
+
+static struct gopt *gopt_new_str_store(struct fio_option *o, const char *text, unsigned int idx)