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]);
298 free(ui->job_files[i]);
299 ui->job_files[i] = NULL;
307 static void start_job_thread(pthread_t *t, struct gui *ui)
309 if (send_job_files(ui)) {
310 printf("Yeah, I didn't really like those options too much.\n");
311 gtk_widget_set_sensitive(ui->button[START_JOB_BUTTON], 1);
315 pthread_create(t, NULL, job_thread, ui);
318 static void start_job_clicked(__attribute__((unused)) GtkWidget *widget,
321 struct gui *ui = data;
323 gtk_widget_set_sensitive(ui->button[START_JOB_BUTTON], 0);
324 start_job_thread(&ui->t, ui);
327 static void connect_clicked(__attribute__((unused)) GtkWidget *widget,
330 fio_clients_connect();
331 gtk_widget_set_sensitive(ui.button[START_JOB_BUTTON], 1);
334 static void add_button(struct gui *ui, int i, GtkWidget *buttonbox,
335 struct button_spec *buttonspec)
337 ui->button[i] = gtk_button_new_with_label(buttonspec->buttontext);
338 g_signal_connect(ui->button[i], "clicked", G_CALLBACK (buttonspec->f), ui);
339 gtk_box_pack_start(GTK_BOX (ui->buttonbox), ui->button[i], TRUE, TRUE, 0);
340 gtk_widget_set_tooltip_text(ui->button[i], buttonspeclist[i].tooltiptext);
341 gtk_widget_set_sensitive(ui->button[i], !buttonspec->start_insensitive);
344 static void add_buttons(struct gui *ui,
345 struct button_spec *buttonlist,
350 for (i = 0; i < nbuttons; i++)
351 add_button(ui, i, ui->buttonbox, &buttonlist[i]);
354 static void on_info_bar_response(GtkWidget *widget, gint response,
357 if (response == GTK_RESPONSE_OK) {
358 gtk_widget_destroy(widget);
359 ui.error_info_bar = NULL;
363 void report_error(GError* error)
365 if (ui.error_info_bar == NULL) {
366 ui.error_info_bar = gtk_info_bar_new_with_buttons(GTK_STOCK_OK,
369 g_signal_connect(ui.error_info_bar, "response", G_CALLBACK(on_info_bar_response), NULL);
370 gtk_info_bar_set_message_type(GTK_INFO_BAR(ui.error_info_bar),
373 ui.error_label = gtk_label_new(error->message);
374 GtkWidget *container = gtk_info_bar_get_content_area(GTK_INFO_BAR(ui.error_info_bar));
375 gtk_container_add(GTK_CONTAINER(container), ui.error_label);
377 gtk_box_pack_start(GTK_BOX(ui.vbox), ui.error_info_bar, FALSE, FALSE, 0);
378 gtk_widget_show_all(ui.vbox);
381 snprintf(buffer, sizeof(buffer), "Failed to open file.");
382 gtk_label_set(GTK_LABEL(ui.error_label), buffer);
386 static void file_open(GtkWidget *w, gpointer data)
389 GSList *filenames, *fn_glist;
390 GtkFileFilter *filter;
392 dialog = gtk_file_chooser_dialog_new("Open File",
393 GTK_WINDOW(ui.window),
394 GTK_FILE_CHOOSER_ACTION_OPEN,
395 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
396 GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
398 gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE);
400 filter = gtk_file_filter_new();
401 gtk_file_filter_add_pattern(filter, "*.fio");
402 gtk_file_filter_add_pattern(filter, "*.job");
403 gtk_file_filter_add_mime_type(filter, "text/fio");
404 gtk_file_filter_set_name(filter, "Fio job file");
405 gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter);
407 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_ACCEPT) {
408 gtk_widget_destroy(dialog);
412 fn_glist = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog));
413 filenames = fn_glist;
414 while (filenames != NULL) {
415 const char *hostname;
417 ui.job_files = realloc(ui.job_files, (ui.nr_job_files + 1) * sizeof(char *));
418 ui.job_files[ui.nr_job_files] = strdup(filenames->data);
421 hostname = gtk_entry_get_text(GTK_ENTRY(ui.hostname_entry));
422 fio_client_add(hostname, &ui.cookie);
431 g_free(filenames->data);
432 filenames = g_slist_next(filenames);
434 g_slist_free(fn_glist);
435 gtk_widget_destroy(dialog);
438 static void file_save(GtkWidget *w, gpointer data)
442 dialog = gtk_file_chooser_dialog_new("Save File",
443 GTK_WINDOW(ui.window),
444 GTK_FILE_CHOOSER_ACTION_SAVE,
445 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
446 GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
449 gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE);
450 gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), "Untitled document");
452 if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
455 filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
456 // save_job_file(filename);
459 gtk_widget_destroy(dialog);
462 static void about_dialog(GtkWidget *w, gpointer data)
464 gtk_show_about_dialog(NULL,
465 "program-name", "gfio",
466 "comments", "Gtk2 UI for fio",
468 "version", fio_version_string,
469 "copyright", "Jens Axboe <axboe@kernel.dk> 2012",
470 "logo-icon-name", "fio",
476 static GtkActionEntry menu_items[] = {
477 { "FileMenuAction", GTK_STOCK_FILE, "File", NULL, NULL, NULL},
478 { "HelpMenuAction", GTK_STOCK_HELP, "Help", NULL, NULL, NULL},
479 { "OpenFile", GTK_STOCK_OPEN, NULL, "<Control>O", NULL, G_CALLBACK(file_open) },
480 { "SaveFile", GTK_STOCK_SAVE, NULL, "<Control>S", NULL, G_CALLBACK(file_save) },
481 { "Quit", GTK_STOCK_QUIT, NULL, "<Control>Q", NULL, G_CALLBACK(quit_clicked) },
482 { "About", GTK_STOCK_ABOUT, NULL, NULL, NULL, G_CALLBACK(about_dialog) },
484 static gint nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]);
486 static const gchar *ui_string = " \
488 <menubar name=\"MainMenu\"> \
489 <menu name=\"FileMenu\" action=\"FileMenuAction\"> \
490 <menuitem name=\"Open\" action=\"OpenFile\" /> \
491 <menuitem name=\"Save\" action=\"SaveFile\" /> \
492 <separator name=\"Separator\"/> \
493 <menuitem name=\"Quit\" action=\"Quit\" /> \
495 <menu name=\"Help\" action=\"HelpMenuAction\"> \
496 <menuitem name=\"About\" action=\"About\" /> \
502 static GtkWidget *get_menubar_menu(GtkWidget *window, GtkUIManager *ui_manager)
504 GtkActionGroup *action_group = gtk_action_group_new("Menu");
507 action_group = gtk_action_group_new("Menu");
508 gtk_action_group_add_actions(action_group, menu_items, nmenu_items, 0);
510 gtk_ui_manager_insert_action_group(ui_manager, action_group, 0);
511 gtk_ui_manager_add_ui_from_string(GTK_UI_MANAGER(ui_manager), ui_string, -1, &error);
513 gtk_window_add_accel_group(GTK_WINDOW(window), gtk_ui_manager_get_accel_group(ui_manager));
514 return gtk_ui_manager_get_widget(ui_manager, "/MainMenu");
517 void gfio_ui_setup(GtkSettings *settings, GtkWidget *menubar,
518 GtkWidget *vbox, GtkUIManager *ui_manager)
520 gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0);
523 static GtkWidget *new_info_label_in_frame(GtkWidget *box, const char *label)
525 GtkWidget *label_widget;
528 frame = gtk_frame_new(label);
529 label_widget = gtk_label_new(NULL);
530 gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 3);
531 gtk_container_add(GTK_CONTAINER(frame), label_widget);
536 static void init_ui(int *argc, char **argv[], struct gui *ui)
538 GList *hostname_type_list = NULL;
540 GtkSettings *settings;
541 GtkUIManager *uimanager;
542 GtkWidget *menu, *probe, *probe_frame, *probe_box;
544 memset(ui, 0, sizeof(*ui));
546 /* Magical g*thread incantation, you just need this thread stuff.
547 * Without it, the update that happens in gfio_update_thread_status
548 * doesn't really happen in a timely fashion, you need expose events
550 if (!g_thread_supported ())
554 gtk_init(argc, argv);
555 settings = gtk_settings_get_default();
556 gtk_settings_set_long_property(settings, "gtk_tooltip_timeout", 10, "gfio setting");
559 ui->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
560 gtk_window_set_title(GTK_WINDOW(ui->window), "fio");
561 gtk_window_set_default_size(GTK_WINDOW(ui->window), 700, 500);
563 g_signal_connect(ui->window, "delete-event", G_CALLBACK(quit_clicked), NULL);
564 g_signal_connect(ui->window, "destroy", G_CALLBACK(quit_clicked), NULL);
566 ui->vbox = gtk_vbox_new(FALSE, 0);
567 gtk_container_add(GTK_CONTAINER (ui->window), ui->vbox);
569 uimanager = gtk_ui_manager_new();
570 menu = get_menubar_menu(ui->window, uimanager);
571 gfio_ui_setup(settings, menu, ui->vbox, uimanager);
574 * Set up alignments for widgets at the top of ui,
575 * align top left, expand horizontally but not vertically
577 ui->topalign = gtk_alignment_new(0, 0, 1, 0);
578 ui->topvbox = gtk_vbox_new(FALSE, 0);
579 gtk_container_add(GTK_CONTAINER(ui->topalign), ui->topvbox);
580 gtk_box_pack_start(GTK_BOX(ui->vbox), ui->topalign, FALSE, FALSE, 0);
583 * Set up hostname label + entry, port label + entry,
585 ui->hostname_hbox = gtk_hbox_new(FALSE, 0);
586 ui->hostname_label = gtk_label_new("Host:");
587 ui->hostname_entry = gtk_entry_new();
588 gtk_entry_set_text(GTK_ENTRY(ui->hostname_entry), "localhost");
589 ui->port_label = gtk_label_new("Port:");
590 ui->port_entry = gtk_entry_new();
591 snprintf(portnum, sizeof(portnum) - 1, "%d", FIO_NET_PORT);
592 gtk_entry_set_text(GTK_ENTRY(ui->port_entry), (gchar *) portnum);
595 * Set up combo box for address type
597 ui->hostname_combo_box = gtk_combo_new();
598 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(ui->hostname_combo_box)->entry), "IPv4");
599 hostname_type_list = g_list_append(hostname_type_list, (gpointer) "IPv4");
600 hostname_type_list = g_list_append(hostname_type_list, (gpointer) "local socket");
601 hostname_type_list = g_list_append(hostname_type_list, (gpointer) "IPv6");
602 gtk_combo_set_popdown_strings(GTK_COMBO(ui->hostname_combo_box), hostname_type_list);
603 g_list_free(hostname_type_list);
605 gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->hostname_label);
606 gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->hostname_entry);
607 gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->port_label);
608 gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->port_entry);
609 gtk_container_add(GTK_CONTAINER (ui->hostname_hbox), ui->hostname_combo_box);
610 gtk_container_add(GTK_CONTAINER (ui->topvbox), ui->hostname_hbox);
612 probe = gtk_frame_new("Job");
613 gtk_box_pack_start(GTK_BOX(ui->topvbox), probe, TRUE, FALSE, 3);
614 probe_frame = gtk_vbox_new(FALSE, 3);
615 gtk_container_add(GTK_CONTAINER(probe), probe_frame);
617 probe_box = gtk_hbox_new(FALSE, 3);
618 gtk_box_pack_start(GTK_BOX(probe_frame), probe_box, TRUE, FALSE, 3);
619 ui->probe.hostname = new_info_label_in_frame(probe_box, "Host");
620 ui->probe.os = new_info_label_in_frame(probe_box, "OS");
621 ui->probe.arch = new_info_label_in_frame(probe_box, "Architecture");
622 ui->probe.fio_ver = new_info_label_in_frame(probe_box, "Fio version");
624 probe_box = gtk_hbox_new(FALSE, 3);
625 gtk_box_pack_start(GTK_BOX(probe_frame), probe_box, TRUE, FALSE, 3);
626 ui->eta.jobs = new_info_label_in_frame(probe_box, "Jobs");
627 ui->eta.files = new_info_label_in_frame(probe_box, "Open files");
629 probe_box = gtk_hbox_new(FALSE, 3);
630 gtk_box_pack_start(GTK_BOX(probe_frame), probe_box, TRUE, FALSE, 3);
631 ui->eta.read_bw = new_info_label_in_frame(probe_box, "Read BW");
632 ui->eta.read_iops = new_info_label_in_frame(probe_box, "IOPS");
633 ui->eta.cr_bw = new_info_label_in_frame(probe_box, "Commit BW");
634 ui->eta.cr_iops = new_info_label_in_frame(probe_box, "Commit IOPS");
636 probe_box = gtk_hbox_new(FALSE, 3);
637 gtk_box_pack_start(GTK_BOX(probe_frame), probe_box, TRUE, FALSE, 3);
638 ui->eta.write_bw = new_info_label_in_frame(probe_box, "Write BW");
639 ui->eta.write_iops = new_info_label_in_frame(probe_box, "IOPS");
640 ui->eta.cw_bw = new_info_label_in_frame(probe_box, "Commit BW");
641 ui->eta.cw_iops = new_info_label_in_frame(probe_box, "Commit IOPS");
644 * Set up thread status progress bar
646 ui->thread_status_pb = gtk_progress_bar_new();
647 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ui->thread_status_pb), 0.0);
648 gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ui->thread_status_pb), "No jobs running");
649 gtk_container_add(GTK_CONTAINER(ui->topvbox), ui->thread_status_pb);
652 * Add a text box for text op messages
654 ui->textview = gtk_text_view_new();
655 ui->text = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ui->textview));
656 gtk_text_buffer_set_text(ui->text, "", -1);
657 gtk_text_view_set_editable(GTK_TEXT_VIEW(ui->textview), FALSE);
658 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(ui->textview), FALSE);
659 ui->scrolled_window = gtk_scrolled_window_new(NULL, NULL);
660 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(ui->scrolled_window),
661 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
662 gtk_container_add(GTK_CONTAINER(ui->scrolled_window), ui->textview);
663 gtk_box_pack_start(GTK_BOX(ui->vbox), ui->scrolled_window,
667 * Set up alignments for widgets at the bottom of ui,
668 * align bottom left, expand horizontally but not vertically
670 ui->bottomalign = gtk_alignment_new(0, 1, 1, 0);
671 ui->buttonbox = gtk_hbox_new(FALSE, 0);
672 gtk_container_add(GTK_CONTAINER(ui->bottomalign), ui->buttonbox);
673 gtk_box_pack_start(GTK_BOX(ui->vbox), ui->bottomalign,
676 add_buttons(ui, buttonspeclist, ARRAYSIZE(buttonspeclist));
677 gtk_widget_show_all(ui->window);
680 int main(int argc, char *argv[], char *envp[])
682 if (initialize_fio(envp))
684 if (fio_init_options())
687 init_ui(&argc, &argv, &ui);