+ ui->vbox = gtk_vbox_new(FALSE, 0);
+ gtk_container_add(GTK_CONTAINER (ui->window), ui->vbox);
+
+ /*
+ * 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(ui->vbox), ui->topalign, FALSE, FALSE, 0);
+
+ /*
+ * Set up hostname label + entry, port label + entry,
+ */
+ ui->hostname_hbox = gtk_hbox_new(FALSE, 0);
+ ui->hostname_label = gtk_label_new("Host:");
+ ui->hostname_entry = gtk_entry_new();
+ gtk_entry_set_text(GTK_ENTRY(ui->hostname_entry), "localhost");
+ ui->port_label = gtk_label_new("Port:");
+ ui->port_entry = gtk_entry_new();
+ snprintf(portnum, sizeof(portnum) - 1, "%d", FIO_NET_PORT);
+ gtk_entry_set_text(GTK_ENTRY(ui->port_entry), (gchar *) portnum);
+
+ /*
+ * Set up combo box for address type
+ */
+ ui->hostname_combo_box = gtk_combo_new();
+ gtk_entry_set_text(GTK_ENTRY (GTK_COMBO(ui->hostname_combo_box)->entry), "IPv4");
+ hostname_type_list = g_list_append(hostname_type_list, (gpointer) "IPv4");
+ hostname_type_list = g_list_append(hostname_type_list, (gpointer) "local socket");
+ hostname_type_list = g_list_append(hostname_type_list, (gpointer) "IPv6");
+ gtk_combo_set_popdown_strings (GTK_COMBO (ui->hostname_combo_box), hostname_type_list);
+ g_list_free(hostname_type_list);
+
+ gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->hostname_label);
+ gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->hostname_entry);
+ gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->port_label);
+ gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->port_entry);
+ gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->hostname_combo_box);
+ gtk_container_add(GTK_CONTAINER (ui->topvbox), ui->hostname_hbox);
+
+ /*
+ * Set up jobfile text entry (temporary until gui really works)
+ */
+ ui->jobfile_hbox = gtk_hbox_new(FALSE, 0);
+ ui->jobfile_label = gtk_label_new("Job file:");
+ ui->jobfile_entry = gtk_entry_new();
+ gtk_container_add(GTK_CONTAINER (ui->jobfile_hbox), ui->jobfile_label);
+ gtk_container_add(GTK_CONTAINER (ui->jobfile_hbox), ui->jobfile_entry);
+ gtk_container_add(GTK_CONTAINER (ui->topvbox), ui->jobfile_hbox);
+
+ /*
+ * Set up thread status progress bar
+ */
+ ui->thread_status_pb = gtk_progress_bar_new();
+ gtk_progress_bar_set_fraction(
+ GTK_PROGRESS_BAR(ui->thread_status_pb), 0.0);
+ gtk_progress_bar_set_text(
+ GTK_PROGRESS_BAR(ui->thread_status_pb), "No jobs running");
+ gtk_container_add(GTK_CONTAINER (ui->topvbox), ui->thread_status_pb);
+
+ /*
+ * Add a text box for text op messages
+ */
+ ui->textview = gtk_text_view_new();
+ ui->text = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ui->textview));
+ gtk_text_buffer_set_text(ui->text, "", -1);
+ gtk_text_view_set_editable(GTK_TEXT_VIEW(ui->textview), FALSE);
+ gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(ui->textview), FALSE);
+ ui->scrolled_window = gtk_scrolled_window_new(NULL, NULL);
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(ui->scrolled_window),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_container_add(GTK_CONTAINER(ui->scrolled_window), ui->textview);
+ gtk_box_pack_start(GTK_BOX(ui->vbox), ui->scrolled_window,
+ TRUE, TRUE, 0);
+
+ /*
+ * Set up alignments for widgets at the bottom of ui,
+ * align bottom left, expand horizontally but not vertically
+ */
+ ui->bottomalign = gtk_alignment_new(0, 1, 1, 0);
+ ui->buttonbox = gtk_hbox_new(FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(ui->bottomalign), ui->buttonbox);
+ gtk_box_pack_start(GTK_BOX(ui->vbox), ui->bottomalign,
+ FALSE, FALSE, 0);
+