goptions: enable combo box hiding
authorJens Axboe <axboe@kernel.dk>
Tue, 20 Mar 2012 09:29:45 +0000 (10:29 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 20 Mar 2012 09:29:45 +0000 (10:29 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
goptions.c
options.c

index b8ebaf9..ab6c815 100644 (file)
@@ -193,8 +193,10 @@ static void gopt_combo_changed(GtkComboBox *box, gpointer data)
 {
        struct gopt_combo *c = (struct gopt_combo *) data;
        struct fio_option *o = &fio_options[c->gopt.opt_index];
+       unsigned int index;
 
-       printf("combo %s changed\n", o->name);
+       index = gtk_combo_box_get_active(GTK_COMBO_BOX(c->combo));
+       gopt_set_children_visible(o, index);
 }
 
 static void gopt_combo_destroy(GtkWidget *w, gpointer data)
index 066724b..2d816f9 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1432,6 +1432,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .help   = "Accept potential duplicate random blocks",
                .parent = "rw",
                .hide   = 1,
+               .hide_on_set = 1,
                .category = FIO_OPT_C_IO,
                .group  = FIO_OPT_G_RANDOM,
        },