2 * gfio - gui front end for fio - the flexible io tester
4 * Copyright (C) 2012 Stephen M. Cameron <stephenmcameron@gmail.com>
6 * The license below covers all files distributed with fio unless otherwise
7 * noted in the file itself.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 static void gfio_update_thread_status(char *status_message, double perc);
33 #define ARRAYSIZE(x) (sizeof((x)) / (sizeof((x)[0])))
35 typedef void (*clickfunction)(GtkWidget *widget, gpointer data);
37 static void connect_clicked(GtkWidget *widget, gpointer data);
38 static void start_job_clicked(GtkWidget *widget, gpointer data);
40 static struct button_spec {
41 const char *buttontext;
43 const char *tooltiptext;
44 const int start_insensitive;
45 } buttonspeclist[] = {
46 #define CONNECT_BUTTON 0
47 #define START_JOB_BUTTON 1
48 { "Connect", connect_clicked, "Connect to host", 0 },
51 "Send current fio job to fio server to be executed", 1 },
69 GtkWidget *write_iops;
79 GtkWidget *bottomalign;
80 GtkWidget *thread_status_pb;
82 GtkWidget *button[ARRAYSIZE(buttonspeclist)];
83 GtkWidget *hostname_hbox;
84 GtkWidget *hostname_label;
85 GtkWidget *hostname_entry;
86 GtkWidget *port_label;
87 GtkWidget *port_entry;
88 GtkWidget *hostname_combo_box; /* ipv4, ipv6 or socket */
89 GtkWidget *scrolled_window;
91 GtkWidget *error_info_bar;
92 GtkWidget *error_label;
94 struct probe_widget probe;
95 struct eta_widget eta;
103 static void gfio_text_op(struct fio_client *client,
104 FILE *f, __u16 pdu_len, const char *buf)
106 GtkTextBuffer *buffer;
109 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ui.textview));
111 gtk_text_buffer_get_end_iter(buffer, &end);
112 gtk_text_buffer_insert(buffer, &end, buf, -1);
114 gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(ui.textview),
115 &end, 0.0, FALSE, 0.0,0.0);
118 static void gfio_disk_util_op(struct fio_client *client, struct fio_net_cmd *cmd)
120 printf("gfio_disk_util_op called\n");
121 fio_client_ops.disk_util(client, cmd);
124 static void gfio_thread_status_op(struct fio_net_cmd *cmd)
126 printf("gfio_thread_status_op called\n");
127 fio_client_ops.thread_status(cmd);
130 static void gfio_group_stats_op(struct fio_net_cmd *cmd)
132 printf("gfio_group_stats_op called\n");
133 fio_client_ops.group_stats(cmd);
136 static void gfio_update_eta(struct jobs_eta *je)
148 if (je->eta_sec != INT_MAX && je->elapsed_sec) {
149 perc = (double) je->elapsed_sec / (double) (je->elapsed_sec + je->eta_sec);
150 eta_to_str(eta_str, je->eta_sec);
153 sprintf(tmp, "%u", je->nr_running);
154 gtk_label_set_text(GTK_LABEL(ui.eta.jobs), tmp);
155 sprintf(tmp, "%u", je->files_open);
156 gtk_label_set_text(GTK_LABEL(ui.eta.files), tmp);
159 if (je->m_rate[0] || je->m_rate[1] || je->t_rate[0] || je->t_rate[1]) {
160 if (je->m_rate || je->t_rate) {
163 mr = num2str(je->m_rate, 4, 0, i2p);
164 tr = num2str(je->t_rate, 4, 0, i2p);
165 gtk_label_set_text(GTK_LABEL(ui.eta.
166 p += sprintf(p, ", CR=%s/%s KB/s", tr, mr);
169 } else if (je->m_iops || je->t_iops)
170 p += sprintf(p, ", CR=%d/%d IOPS", je->t_iops, je->m_iops);
172 gtk_label_set_text(GTK_LABEL(ui.eta.cr_bw), "---");
173 gtk_label_set_text(GTK_LABEL(ui.eta.cr_iops), "---");
174 gtk_label_set_text(GTK_LABEL(ui.eta.cw_bw), "---");
175 gtk_label_set_text(GTK_LABEL(ui.eta.cw_iops), "---");
178 if (je->eta_sec != INT_MAX && je->nr_running) {
182 if ((!je->eta_sec && !eta_good) || je->nr_ramp == je->nr_running)
183 strcpy(output, "-.-% done");
187 sprintf(output, "%3.1f%% done", perc);
190 rate_str[0] = num2str(je->rate[0], 5, 10, i2p);
191 rate_str[1] = num2str(je->rate[1], 5, 10, i2p);
193 iops_str[0] = num2str(je->iops[0], 4, 1, 0);
194 iops_str[1] = num2str(je->iops[1], 4, 1, 0);
196 gtk_label_set_text(GTK_LABEL(ui.eta.read_bw), rate_str[0]);
197 gtk_label_set_text(GTK_LABEL(ui.eta.read_iops), iops_str[0]);
198 gtk_label_set_text(GTK_LABEL(ui.eta.write_bw), rate_str[1]);
199 gtk_label_set_text(GTK_LABEL(ui.eta.write_iops), iops_str[1]);
208 char *dst = output + strlen(output);
210 sprintf(dst, " - %s", eta_str);
213 gfio_update_thread_status(output, perc);
216 static void gfio_eta_op(struct fio_client *client, struct fio_net_cmd *cmd)
218 struct jobs_eta *je = (struct jobs_eta *) cmd->payload;
219 struct client_eta *eta = (struct client_eta *) (uintptr_t) cmd->tag;
221 client->eta_in_flight = NULL;
222 flist_del_init(&client->eta_list);
224 fio_client_convert_jobs_eta(je);
225 fio_client_sum_jobs_eta(&eta->eta, je);
226 fio_client_dec_jobs_eta(eta, gfio_update_eta);
229 static void gfio_probe_op(struct fio_client *client, struct fio_net_cmd *cmd)
231 struct cmd_probe_pdu *probe = (struct cmd_probe_pdu *) cmd->payload;
232 const char *os, *arch;
235 os = fio_get_os_string(probe->os);
239 arch = fio_get_arch_string(probe->arch);
244 client->name = strdup((char *) probe->hostname);
246 gtk_label_set_text(GTK_LABEL(ui.probe.hostname), (char *) probe->hostname);
247 gtk_label_set_text(GTK_LABEL(ui.probe.os), os);
248 gtk_label_set_text(GTK_LABEL(ui.probe.arch), arch);
249 sprintf(buf, "%u.%u.%u", probe->fio_major, probe->fio_minor, probe->fio_patch);
250 gtk_label_set_text(GTK_LABEL(ui.probe.fio_ver), buf);
253 static void gfio_update_thread_status(char *status_message, double perc)
255 static char message[100];
256 const char *m = message;
258 strncpy(message, status_message, sizeof(message) - 1);
259 gtk_progress_bar_set_text(
260 GTK_PROGRESS_BAR(ui.thread_status_pb), m);
261 gtk_progress_bar_set_fraction(
262 GTK_PROGRESS_BAR(ui.thread_status_pb), perc / 100.0);
264 gtk_widget_queue_draw(ui.window);
268 struct client_ops gfio_client_ops = {
269 .text_op = gfio_text_op,
270 .disk_util = gfio_disk_util_op,
271 .thread_status = gfio_thread_status_op,
272 .group_stats = gfio_group_stats_op,
274 .probe = gfio_probe_op,
277 static void quit_clicked(__attribute__((unused)) GtkWidget *widget,
278 __attribute__((unused)) gpointer data)
283 static void *job_thread(void *arg)
285 struct gui *ui = arg;
287 fio_handle_clients(&gfio_client_ops);
288 gtk_widget_set_sensitive(ui->button[START_JOB_BUTTON], 1);
292 static int send_job_files(struct gui *ui)
296 for (i = 0; i < ui->nr_job_files; i++) {
297 ret = fio_clients_send_ini(ui->job_files[i]);
301 free(ui->job_files[i]);
302 ui->job_files[i] = NULL;
304 while (i < ui->nr_job_files) {
305 free(ui->job_files[i]);
306 ui->job_files[i] = NULL;
313 static void start_job_thread(pthread_t *t, struct gui *ui)
315 if (send_job_files(ui)) {
316 printf("Yeah, I didn't really like those options too much.\n");
317 gtk_widget_set_sensitive(ui->button[START_JOB_BUTTON], 1);
321 pthread_create(t, NULL, job_thread, ui);
324 static void start_job_clicked(__attribute__((unused)) GtkWidget *widget,
327 struct gui *ui = data;
329 gtk_widget_set_sensitive(ui->button[START_JOB_BUTTON], 0);
330 start_job_thread(&ui->t, ui);
333 static void connect_clicked(__attribute__((unused)) GtkWidget *widget,
336 fio_clients_connect();
337 gtk_widget_set_sensitive(ui.button[START_JOB_BUTTON], 1);
340 static void add_button(struct gui *ui, int i, GtkWidget *buttonbox,
341 struct button_spec *buttonspec)
343 ui->button[i] = gtk_button_new_with_label(buttonspec->buttontext);
344 g_signal_connect(ui->button[i], "clicked", G_CALLBACK (buttonspec->f), ui);
345 gtk_box_pack_start(GTK_BOX (ui->buttonbox), ui->button[i], TRUE, TRUE, 0);
346 gtk_widget_set_tooltip_text(ui->button[i], buttonspeclist[i].tooltiptext);
347 gtk_widget_set_sensitive(ui->button[i], !buttonspec->start_insensitive);
350 static void add_buttons(struct gui *ui,
351 struct button_spec *buttonlist,
356 for (i = 0; i < nbuttons; i++)
357 add_button(ui, i, ui->buttonbox, &buttonlist[i]);
360 static void on_info_bar_response(GtkWidget *widget, gint response,
363 if (response == GTK_RESPONSE_OK) {
364 gtk_widget_destroy(widget);
365 ui.error_info_bar = NULL;
369 void report_error(GError* error)
371 if (ui.error_info_bar == NULL) {
372 ui.error_info_bar = gtk_info_bar_new_with_buttons(GTK_STOCK_OK,
375 g_signal_connect(ui.error_info_bar, "response", G_CALLBACK(on_info_bar_response), NULL);
376 gtk_info_bar_set_message_type(GTK_INFO_BAR(ui.error_info_bar),
379 ui.error_label = gtk_label_new(error->message);
380 GtkWidget *container = gtk_info_bar_get_content_area(GTK_INFO_BAR(ui.error_info_bar));
381 gtk_container_add(GTK_CONTAINER(container), ui.error_label);
383 gtk_box_pack_start(GTK_BOX(ui.vbox), ui.error_info_bar, FALSE, FALSE, 0);
384 gtk_widget_show_all(ui.vbox);
387 snprintf(buffer, sizeof(buffer), "Failed to open file.");
388 gtk_label_set(GTK_LABEL(ui.error_label), buffer);
392 static void file_open(GtkWidget *w, gpointer data)
395 GSList *filenames, *fn_glist;
396 GtkFileFilter *filter;
398 dialog = gtk_file_chooser_dialog_new("Open File",
399 GTK_WINDOW(ui.window),
400 GTK_FILE_CHOOSER_ACTION_OPEN,
401 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
402 GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
404 gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE);
406 filter = gtk_file_filter_new();
407 gtk_file_filter_add_pattern(filter, "*.fio");
408 gtk_file_filter_add_pattern(filter, "*.job");
409 gtk_file_filter_add_mime_type(filter, "text/fio");
410 gtk_file_filter_set_name(filter, "Fio job file");
411 gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter);
413 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_ACCEPT) {
414 gtk_widget_destroy(dialog);
418 fn_glist = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog));
419 filenames = fn_glist;
420 while (filenames != NULL) {
421 const char *hostname;
423 ui.job_files = realloc(ui.job_files, (ui.nr_job_files + 1) * sizeof(char *));
424 ui.job_files[ui.nr_job_files] = strdup(filenames->data);
427 hostname = gtk_entry_get_text(GTK_ENTRY(ui.hostname_entry));
428 fio_client_add(hostname, &ui.cookie);
437 g_free(filenames->data);
438 filenames = g_slist_next(filenames);
440 g_slist_free(fn_glist);
441 gtk_widget_destroy(dialog);
444 static void file_save(GtkWidget *w, gpointer data)
448 dialog = gtk_file_chooser_dialog_new("Save File",
449 GTK_WINDOW(ui.window),
450 GTK_FILE_CHOOSER_ACTION_SAVE,
451 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
452 GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
455 gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE);
456 gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), "Untitled document");
458 if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
461 filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
462 // save_job_file(filename);
465 gtk_widget_destroy(dialog);
468 static void about_dialog(GtkWidget *w, gpointer data)
470 gtk_show_about_dialog(NULL,
471 "program-name", "gfio",
472 "comments", "Gtk2 UI for fio",
474 "version", fio_version_string,
475 "copyright", "Jens Axboe <axboe@kernel.dk> 2012",
476 "logo-icon-name", "fio",
482 static GtkActionEntry menu_items[] = {
483 { "FileMenuAction", GTK_STOCK_FILE, "File", NULL, NULL, NULL},
484 { "HelpMenuAction", GTK_STOCK_HELP, "Help", NULL, NULL, NULL},
485 { "OpenFile", GTK_STOCK_OPEN, NULL, "<Control>O", NULL, G_CALLBACK(file_open) },
486 { "SaveFile", GTK_STOCK_SAVE, NULL, "<Control>S", NULL, G_CALLBACK(file_save) },
487 { "Quit", GTK_STOCK_QUIT, NULL, "<Control>Q", NULL, G_CALLBACK(quit_clicked) },
488 { "About", GTK_STOCK_ABOUT, NULL, NULL, NULL, G_CALLBACK(about_dialog) },
490 static gint nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]);
492 static const gchar *ui_string = " \
494 <menubar name=\"MainMenu\"> \
495 <menu name=\"FileMenu\" action=\"FileMenuAction\"> \
496 <menuitem name=\"Open\" action=\"OpenFile\" /> \
497 <menuitem name=\"Save\" action=\"SaveFile\" /> \
498 <separator name=\"Separator\"/> \
499 <menuitem name=\"Quit\" action=\"Quit\" /> \
501 <menu name=\"Help\" action=\"HelpMenuAction\"> \
502 <menuitem name=\"About\" action=\"About\" /> \
508 static GtkWidget *get_menubar_menu(GtkWidget *window, GtkUIManager *ui_manager)
510 GtkActionGroup *action_group = gtk_action_group_new("Menu");
513 action_group = gtk_action_group_new("Menu");
514 gtk_action_group_add_actions(action_group, menu_items, nmenu_items, 0);
516 gtk_ui_manager_insert_action_group(ui_manager, action_group, 0);
517 gtk_ui_manager_add_ui_from_string(GTK_UI_MANAGER(ui_manager), ui_string, -1, &error);
519 gtk_window_add_accel_group(GTK_WINDOW(window), gtk_ui_manager_get_accel_group(ui_manager));
520 return gtk_ui_manager_get_widget(ui_manager, "/MainMenu");
523 void gfio_ui_setup(GtkSettings *settings, GtkWidget *menubar,
524 GtkWidget *vbox, GtkUIManager *ui_manager)
526 gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0);
529 static GtkWidget *new_info_label_in_frame(GtkWidget *box, const char *label)
531 GtkWidget *label_widget;
534 frame = gtk_frame_new(label);
535 label_widget = gtk_label_new(NULL);
536 gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 3);
537 gtk_container_add(GTK_CONTAINER(frame), label_widget);
542 static void init_ui(int *argc, char **argv[], struct gui *ui)
544 GList *hostname_type_list = NULL;
546 GtkSettings *settings;
547 GtkUIManager *uimanager;
548 GtkWidget *menu, *probe, *probe_frame, *probe_box;
550 memset(ui, 0, sizeof(*ui));
552 /* Magical g*thread incantation, you just need this thread stuff.
553 * Without it, the update that happens in gfio_update_thread_status
554 * doesn't really happen in a timely fashion, you need expose events
556 if (!g_thread_supported ())
560 gtk_init(argc, argv);
561 settings = gtk_settings_get_default();
562 gtk_settings_set_long_property(settings, "gtk_tooltip_timeout", 10, "gfio setting");
565 ui->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
566 gtk_window_set_title(GTK_WINDOW(ui->window), "fio");
567 gtk_window_set_default_size(GTK_WINDOW(ui->window), 700, 500);
569 g_signal_connect(ui->window, "delete-event", G_CALLBACK(quit_clicked), NULL);
570 g_signal_connect(ui->window, "destroy", G_CALLBACK(quit_clicked), NULL);
572 ui->vbox = gtk_vbox_new(FALSE, 0);
573 gtk_container_add(GTK_CONTAINER (ui->window), ui->vbox);
575 uimanager = gtk_ui_manager_new();
576 menu = get_menubar_menu(ui->window, uimanager);
577 gfio_ui_setup(settings, menu, ui->vbox, uimanager);
580 * Set up alignments for widgets at the top of ui,
581 * align top left, expand horizontally but not vertically
583 ui->topalign = gtk_alignment_new(0, 0, 1, 0);
584 ui->topvbox = gtk_vbox_new(FALSE, 0);
585 gtk_container_add(GTK_CONTAINER(ui->topalign), ui->topvbox);
586 gtk_box_pack_start(GTK_BOX(ui->vbox), ui->topalign, FALSE, FALSE, 0);
589 * Set up hostname label + entry, port label + entry,
591 ui->hostname_hbox = gtk_hbox_new(FALSE, 0);
592 ui->hostname_label = gtk_label_new("Host:");
593 ui->hostname_entry = gtk_entry_new();
594 gtk_entry_set_text(GTK_ENTRY(ui->hostname_entry), "localhost");
595 ui->port_label = gtk_label_new("Port:");
596 ui->port_entry = gtk_entry_new();
597 snprintf(portnum, sizeof(portnum) - 1, "%d", FIO_NET_PORT);
598 gtk_entry_set_text(GTK_ENTRY(ui->port_entry), (gchar *) portnum);
601 * Set up combo box for address type
603 ui->hostname_combo_box = gtk_combo_new();
604 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(ui->hostname_combo_box)->entry), "IPv4");
605 hostname_type_list = g_list_append(hostname_type_list, (gpointer) "IPv4");
606 hostname_type_list = g_list_append(hostname_type_list, (gpointer) "local socket");
607 hostname_type_list = g_list_append(hostname_type_list, (gpointer) "IPv6");
608 gtk_combo_set_popdown_strings(GTK_COMBO(ui->hostname_combo_box), hostname_type_list);
609 g_list_free(hostname_type_list);
611 gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->hostname_label);
612 gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->hostname_entry);
613 gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->port_label);
614 gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->port_entry);
615 gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->hostname_combo_box);
616 gtk_container_add(GTK_CONTAINER (ui->topvbox), ui->hostname_hbox);
618 probe = gtk_frame_new("Job");
619 gtk_box_pack_start(GTK_BOX(ui->topvbox), probe, TRUE, FALSE, 3);
620 probe_frame = gtk_vbox_new(FALSE, 3);
621 gtk_container_add(GTK_CONTAINER(probe), probe_frame);
623 probe_box = gtk_hbox_new(FALSE, 3);
624 gtk_box_pack_start(GTK_BOX(probe_frame), probe_box, TRUE, FALSE, 3);
625 ui->probe.hostname = new_info_label_in_frame(probe_box, "Host");
626 ui->probe.os = new_info_label_in_frame(probe_box, "OS");
627 ui->probe.arch = new_info_label_in_frame(probe_box, "Architecture");
628 ui->probe.fio_ver = new_info_label_in_frame(probe_box, "Fio version");
630 probe_box = gtk_hbox_new(FALSE, 3);
631 gtk_box_pack_start(GTK_BOX(probe_frame), probe_box, TRUE, FALSE, 3);
632 ui->eta.jobs = new_info_label_in_frame(probe_box, "Jobs");
633 ui->eta.files = new_info_label_in_frame(probe_box, "Open files");
635 probe_box = gtk_hbox_new(FALSE, 3);
636 gtk_box_pack_start(GTK_BOX(probe_frame), probe_box, TRUE, FALSE, 3);
637 ui->eta.read_bw = new_info_label_in_frame(probe_box, "Read BW");
638 ui->eta.read_iops = new_info_label_in_frame(probe_box, "IOPS");
639 ui->eta.cr_bw = new_info_label_in_frame(probe_box, "Commit BW");
640 ui->eta.cr_iops = new_info_label_in_frame(probe_box, "Commit IOPS");
642 probe_box = gtk_hbox_new(FALSE, 3);
643 gtk_box_pack_start(GTK_BOX(probe_frame), probe_box, TRUE, FALSE, 3);
644 ui->eta.write_bw = new_info_label_in_frame(probe_box, "Write BW");
645 ui->eta.write_iops = new_info_label_in_frame(probe_box, "IOPS");
646 ui->eta.cw_bw = new_info_label_in_frame(probe_box, "Commit BW");
647 ui->eta.cw_iops = new_info_label_in_frame(probe_box, "Commit IOPS");
650 * Set up thread status progress bar
652 ui->thread_status_pb = gtk_progress_bar_new();
653 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ui->thread_status_pb), 0.0);
654 gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ui->thread_status_pb), "No jobs running");
655 gtk_container_add(GTK_CONTAINER(ui->topvbox), ui->thread_status_pb);
658 * Add a text box for text op messages
660 ui->textview = gtk_text_view_new();
661 ui->text = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ui->textview));
662 gtk_text_buffer_set_text(ui->text, "", -1);
663 gtk_text_view_set_editable(GTK_TEXT_VIEW(ui->textview), FALSE);
664 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(ui->textview), FALSE);
665 ui->scrolled_window = gtk_scrolled_window_new(NULL, NULL);
666 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(ui->scrolled_window),
667 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
668 gtk_container_add(GTK_CONTAINER(ui->scrolled_window), ui->textview);
669 gtk_box_pack_start(GTK_BOX(ui->vbox), ui->scrolled_window,
673 * Set up alignments for widgets at the bottom of ui,
674 * align bottom left, expand horizontally but not vertically
676 ui->bottomalign = gtk_alignment_new(0, 1, 1, 0);
677 ui->buttonbox = gtk_hbox_new(FALSE, 0);
678 gtk_container_add(GTK_CONTAINER(ui->bottomalign), ui->buttonbox);
679 gtk_box_pack_start(GTK_BOX(ui->vbox), ui->bottomalign,
682 add_buttons(ui, buttonspeclist, ARRAYSIZE(buttonspeclist));
683 gtk_widget_show_all(ui->window);
686 int main(int argc, char *argv[], char *envp[])
688 if (initialize_fio(envp))
690 if (fio_init_options())
693 init_ui(&argc, &argv, &ui);