You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spOSMroute/main/gui_config.c

66 lines
1.9 KiB

/* %Id: Exp $ */
/***************************************************************************
* gui_config.c
*
* Copyright (C) 2013 Steffen Pohle
* steffen@gulpe.de
****************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* main.c is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "osmroute.h"
#include "draw.h"
#include "gui.h"
#include "system.h"
void gui_config_close ();
void gui_config_seldir ();
GUIWindow wcfg = {0};
GUIItem *map_path = NULL;
GUIItem *map_seldir = NULL;
GUIItem *gps_device = NULL;
GUIItem *gps_list = NULL;
GUIItem *gps_file = NULL;
GUIItem *wcfg_close = 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);
if (map_path == NULL) map_path = gui_entry_new (cfg.mappath, 5, 30, 155, 20);
gui_window_item_add (&wcfg, map_path);
if (map_seldir == NULL) map_seldir = gui_button_new (_("Browse"), 170, 30, 40, 20);
GUI_BUTTON_T (map_seldir)->callback_clicked = gui_config_seldir;
gui_window_item_add (&wcfg, map_seldir);
};
void gui_config_close () {
gui_close ();
};
void gui_config_seldir () {
d_printf ("select dir...");
};