+
+ ge->eta.cr_bw = new_info_label_in_frame(probe_box, "Commit BW");
+ ge->eta.cr_iops = new_info_label_in_frame(probe_box, "Commit IOPS");
+
+ ge->eta.cw_bw = new_info_label_in_frame(probe_box, "Commit BW");
+ ge->eta.cw_iops = new_info_label_in_frame(probe_box, "Commit IOPS");
+#endif
+
+ /*
+ * Set up a drawing area and IOPS and bandwidth graphs
+ */
+ gdk_color_parse("white", &white);
+ ge->graphs.drawing_area = gtk_drawing_area_new();
+ gtk_widget_set_size_request(GTK_WIDGET(ge->graphs.drawing_area),
+ DRAWING_AREA_XDIM, DRAWING_AREA_YDIM);
+ gtk_widget_modify_bg(ge->graphs.drawing_area, GTK_STATE_NORMAL, &white);
+ g_signal_connect(G_OBJECT(ge->graphs.drawing_area), "expose_event",
+ G_CALLBACK(on_expose_drawing_area), &ge->graphs);
+ g_signal_connect(G_OBJECT(ge->graphs.drawing_area), "configure_event",
+ G_CALLBACK(on_config_drawing_area), &ge->graphs);
+ ge->scrolled_window = gtk_scrolled_window_new(NULL, NULL);
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(ge->scrolled_window),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(ge->scrolled_window),
+ ge->graphs.drawing_area);
+ gtk_box_pack_start(GTK_BOX(main_vbox), ge->scrolled_window,
+ TRUE, TRUE, 0);
+
+ setup_graphs(&ge->graphs);
+
+ /*
+ * Set up alignments for widgets at the bottom of ui,
+ * align bottom left, expand horizontally but not vertically
+ */
+ ge->bottomalign = gtk_alignment_new(0, 1, 1, 0);
+ ge->buttonbox = gtk_hbox_new(FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(ge->bottomalign), ge->buttonbox);
+ gtk_box_pack_start(GTK_BOX(main_vbox), ge->bottomalign,
+ FALSE, FALSE, 0);
+
+ add_buttons(ge, buttonspeclist, ARRAYSIZE(buttonspeclist));
+
+ /*
+ * Set up thread status progress bar
+ */
+ ge->thread_status_pb = gtk_progress_bar_new();
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ge->thread_status_pb), 0.0);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ge->thread_status_pb), "No connections");
+ gtk_container_add(GTK_CONTAINER(ge->buttonbox), ge->thread_status_pb);
+
+
+ return main_vbox;
+}
+
+static GtkWidget *new_main_page(struct gui *ui)
+{
+ GtkWidget *main_vbox, *probe, *probe_frame, *probe_box;
+ GdkColor white;
+
+ main_vbox = gtk_vbox_new(FALSE, 3);
+
+ /*
+ * Set up alignments for widgets at the top of ui,
+ * align top left, expand horizontally but not vertically
+ */
+ ui->topalign = gtk_alignment_new(0, 0, 1, 0);
+ ui->topvbox = gtk_vbox_new(FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(ui->topalign), ui->topvbox);
+ gtk_box_pack_start(GTK_BOX(main_vbox), ui->topalign, FALSE, FALSE, 0);
+
+ probe = gtk_frame_new("Run statistics");
+ gtk_box_pack_start(GTK_BOX(main_vbox), probe, FALSE, FALSE, 3);
+ probe_frame = gtk_vbox_new(FALSE, 3);
+ gtk_container_add(GTK_CONTAINER(probe), probe_frame);
+
+ probe_box = gtk_hbox_new(FALSE, 3);
+ gtk_box_pack_start(GTK_BOX(probe_frame), probe_box, FALSE, FALSE, 3);
+ ui->eta.jobs = new_info_entry_in_frame(probe_box, "Running");