if (!sEnableUI) return -1;
ShowProgressUI(){  // Only show the Progress UI if the process is taking significant time.  // Here we measure significant time as taking more than one second.  usleep(500000);  if (sQuit || sProgressVal > 50.0f)    return 0;  char path[PATH_MAX];  snprintf(path, sizeof(path), "%s.ini", sProgramPath);  StringTable strings;  if (ReadStrings(path, &strings) != OK)    return -1;    sWin = gtk_window_new(GTK_WINDOW_TOPLEVEL);  if (!sWin)    return -1;  // GTK 2.2 seems unable to prevent our dialog from being closed when  // the user hits the close button on the dialog.  This problem only  // occurs when either one of the following methods are called:  //   gtk_window_set_position  //   gtk_window_set_type_hint  // For this reason, we disable window decorations.   g_signal_connect(G_OBJECT(sWin), "delete_event",                   G_CALLBACK(OnDeleteEvent), NULL);  gtk_window_set_title(GTK_WINDOW(sWin), strings.title);  gtk_window_set_type_hint(GTK_WINDOW(sWin), GDK_WINDOW_TYPE_HINT_DIALOG);  gtk_window_set_position(GTK_WINDOW(sWin), GTK_WIN_POS_CENTER_ALWAYS);  gtk_window_set_resizable(GTK_WINDOW(sWin), FALSE);  gtk_window_set_decorated(GTK_WINDOW(sWin), FALSE);  GtkWidget *vbox = gtk_vbox_new(TRUE, 6);  sLabel = gtk_label_new(strings.info);  gtk_misc_set_alignment(GTK_MISC(sLabel), 0.0f, 0.0f);  sProgressBar = gtk_progress_bar_new();  gtk_box_pack_start(GTK_BOX(vbox), sLabel, FALSE, FALSE, 0);  gtk_box_pack_start(GTK_BOX(vbox), sProgressBar, TRUE, TRUE, 0);  sTimerID = g_timeout_add(TIMER_INTERVAL, UpdateDialog, NULL);  gtk_container_set_border_width(GTK_CONTAINER(sWin), 10);  gtk_container_add(GTK_CONTAINER(sWin), vbox);  gtk_widget_show_all(sWin);  gtk_main();  return 0;}