diff --git a/main/gui_config.c b/main/gui_config.c index a01d8e2..535e2cb 100644 --- a/main/gui_config.c +++ b/main/gui_config.c @@ -44,7 +44,6 @@ GUIItem *label2 = NULL; void gui_config_show () { if (wcfg.screen == NULL) gui_window_new (&wcfg, 220, 240, _("Config")); - wcfg.callback_close = (void*)gui_config_close; wcfg.screen_changed = 1; wcfg.style = WGUI_S_VCENTER | WGUI_S_HCENTER; gui_show (&wcfg); @@ -61,14 +60,18 @@ void gui_config_show () { if (label2 == NULL) label2 = gui_label_new (_("gps device:"), 5, 66); gui_window_item_add (&wcfg, label2); - if (gps_device == NULL) gps_device = gui_entry_new (cfg.gps_device, 10, 76, 150, 20); + if (gps_device == NULL) gps_device = gui_entry_new (cfg.gps_device, 10, 82, 150, 20); gui_window_item_add (&wcfg, gps_device); - if (gps_list == NULL) gps_list = gui_list_new (10, 106, 150, 60); + if (gps_list == NULL) gps_list = gui_list_new (10, 112, 150, 60); gui_window_item_add (&wcfg, gps_list); - if (gps_file == NULL) gps_file = gui_button_new (_("File"), 170, 106, 40, 20); + if (gps_file == NULL) gps_file = gui_button_new (_("File"), 170, 112, 40, 20); GUI_BUTTON_T (gps_file)->callback_clicked = gui_config_gpsfile; gui_window_item_add (&wcfg, gps_file); + + if (wcfg_close == NULL) wcfg_close = gui_button_new (_("Close"), 5, wcfg.h-25, wcfg.w-10, 20); + GUI_BUTTON_T (wcfg_close)->callback_clicked = gui_config_close; + gui_window_item_add (&wcfg, wcfg_close); };