You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(92) |
Dec
(141) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(126) |
Feb
(72) |
Mar
(31) |
Apr
(200) |
May
(81) |
Jun
(130) |
Jul
(112) |
Aug
(134) |
Sep
(76) |
Oct
(89) |
Nov
(153) |
Dec
(9) |
2007 |
Jan
(59) |
Feb
(82) |
Mar
(50) |
Apr
(20) |
May
(9) |
Jun
(81) |
Jul
(41) |
Aug
(109) |
Sep
(91) |
Oct
(87) |
Nov
(33) |
Dec
(60) |
2008 |
Jan
(21) |
Feb
(15) |
Mar
(38) |
Apr
(75) |
May
(59) |
Jun
(46) |
Jul
(30) |
Aug
(20) |
Sep
(35) |
Oct
(32) |
Nov
(34) |
Dec
(19) |
2009 |
Jan
(29) |
Feb
(71) |
Mar
(54) |
Apr
(17) |
May
(4) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(58) |
Sep
(7) |
Oct
(7) |
Nov
(12) |
Dec
(18) |
2011 |
Jan
(17) |
Feb
(29) |
Mar
(11) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(11) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(87) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(44) |
Jun
(79) |
Jul
(16) |
Aug
(31) |
Sep
|
Oct
(51) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Ehud S. <esh...@us...> - 2006-11-21 09:23:15
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5287 Modified Files: roadmap_factory.c roadmap_factory.h Log Message: Use action names also for the bitmap names. Index: roadmap_factory.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_factory.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap_factory.h 17 Nov 2006 16:53:58 -0000 1.3 --- roadmap_factory.h 21 Nov 2006 09:23:06 -0000 1.4 *************** *** 70,75 **** const char **roadmap_factory_user_config (const char *name, const char *category, ! const RoadMapAction *actions, ! const char **icons); #endif /* INCLUDE__ROADMAP_FACTORY__H */ --- 70,75 ---- const char **roadmap_factory_user_config (const char *name, const char *category, ! const RoadMapAction *actions); ! #endif /* INCLUDE__ROADMAP_FACTORY__H */ Index: roadmap_factory.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_factory.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_factory.c 17 Nov 2006 16:53:58 -0000 1.5 --- roadmap_factory.c 21 Nov 2006 09:23:04 -0000 1.6 *************** *** 122,127 **** static const char **roadmap_factory_load_config (const char *file_name, const RoadMapAction *actions, ! const char *path, ! const char **icons) { static const char *loaded[256]; --- 122,126 ---- static const char **roadmap_factory_load_config (const char *file_name, const RoadMapAction *actions, ! const char *path) { static const char *loaded[256]; *************** *** 154,175 **** if (*p == '|' || *p == '-') { loaded[count] = RoadMapFactorySeparator; - if (icons) icons[count] = NULL; count++; } else { const RoadMapAction *this_action; - char *p2; - - p2 = strchr (p, '|'); - - if (p2) { - char *icon = p2; - for (icon = p2 + 1; isspace(*icon); ++icon); - - if (icons) icons[count] = strdup(icon); - *p2 = '\0'; - } else if (icons) { - - icons[count] = NULL; - } this_action = roadmap_factory_find_action (actions, p); --- 153,159 ---- *************** *** 191,196 **** const char **roadmap_factory_user_config (const char *name, const char *category, ! const RoadMapAction *actions, ! const char **icons) { const char **loaded; --- 175,179 ---- const char **roadmap_factory_user_config (const char *name, const char *category, ! const RoadMapAction *actions) { const char **loaded; *************** *** 202,206 **** loaded = roadmap_factory_load_config ! (file_name, actions, roadmap_path_user(), icons); if (loaded == NULL) { --- 185,189 ---- loaded = roadmap_factory_load_config ! (file_name, actions, roadmap_path_user()); if (loaded == NULL) { *************** *** 212,216 **** path = roadmap_path_next("config", path)) { ! loaded = roadmap_factory_load_config (file_name, actions, path, icons); if (loaded != NULL) break; } --- 195,199 ---- path = roadmap_path_next("config", path)) { ! loaded = roadmap_factory_load_config (file_name, actions, path); if (loaded != NULL) break; } *************** *** 269,273 **** const char **usertoolbar = ! roadmap_factory_user_config (name, "toolbar", actions, NULL); if (usertoolbar == NULL) usertoolbar = toolbar; --- 252,256 ---- const char **usertoolbar = ! roadmap_factory_user_config (name, "toolbar", actions); if (usertoolbar == NULL) usertoolbar = toolbar; *************** *** 417,421 **** RoadMapMenu menu = NULL; const char **menu_items = ! roadmap_factory_user_config (name, "menu", actions, NULL); menu = roadmap_main_new_menu (); --- 400,404 ---- RoadMapMenu menu = NULL; const char **menu_items = ! roadmap_factory_user_config (name, "menu", actions); menu = roadmap_main_new_menu (); |
From: Ehud S. <esh...@us...> - 2006-11-21 09:22:11
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4945 Modified Files: roadmap_config.c roadmap_config.h roadmap_display.c roadmap_screen.c Log Message: Skin management. Index: roadmap_config.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_config.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_config.c 27 Jul 2006 14:18:46 -0000 1.5 --- roadmap_config.c 21 Nov 2006 09:22:08 -0000 1.6 *************** *** 76,79 **** --- 76,80 ---- char *name; + char *set; int required; int state; /* CLEAN, SHARED or DIRTY. */ *************** *** 84,94 **** static RoadMapConfig RoadMapConfigFiles[] = { ! {"session", 0, ROADMAP_CONFIG_CLEAN, NULL, NULL}, ! {"preferences", 0, ROADMAP_CONFIG_CLEAN, NULL, NULL}, ! {"schema", 1, ROADMAP_CONFIG_CLEAN, NULL, NULL}, ! {NULL, 0, 0, NULL, NULL} }; ! static RoadMapConfig *roadmap_config_search_file (const char *name) { --- 85,95 ---- static RoadMapConfig RoadMapConfigFiles[] = { ! {"session", "config", 0, ROADMAP_CONFIG_CLEAN, NULL, NULL}, ! {"preferences", "config", 0, ROADMAP_CONFIG_CLEAN, NULL, NULL}, ! {"schema", "skin", 1, ROADMAP_CONFIG_CLEAN, NULL, NULL}, ! {NULL, "", 0, 0, NULL, NULL} }; ! static int RoadMapConfigAge = 1; static RoadMapConfig *roadmap_config_search_file (const char *name) { *************** *** 138,142 **** } ! if (descriptor->reference == NULL) { for (file = RoadMapConfigFiles; file->name != NULL; ++file) { --- 139,147 ---- } ! if ((descriptor->age != RoadMapConfigAge) || ! (descriptor->reference == NULL)) { ! ! descriptor->reference = NULL; ! descriptor->age = RoadMapConfigAge; for (file = RoadMapConfigFiles; file->name != NULL; ++file) { *************** *** 215,218 **** --- 220,224 ---- } + descriptor->age = RoadMapConfigAge; descriptor->reference = new_item; *************** *** 334,337 **** --- 340,344 ---- descriptor->name = file->first_item->name; descriptor->reference = file->first_item; + descriptor->age = RoadMapConfigAge; return 1; *************** *** 356,359 **** --- 363,367 ---- descriptor->category = descriptor->reference->category; descriptor->name = descriptor->reference->name; + descriptor->age = RoadMapConfigAge; return 1; *************** *** 576,600 **** ! void roadmap_config_initialize (void) { ! const char *p; ! RoadMapConfig *file; for (file = RoadMapConfigFiles; file->name != NULL; ++file) { int loaded = 0; ! for (p = roadmap_path_last("config"); p != NULL; ! p = roadmap_path_previous("config", p)) { ! loaded |= ! roadmap_config_load (p, file, ROADMAP_CONFIG_SHARED); } - loaded |= - roadmap_config_load (roadmap_path_user(), file, ROADMAP_CONFIG_CLEAN); - if (file->required && (!loaded)) { roadmap_log --- 584,618 ---- ! int roadmap_config_reload (const char *name) { ! const char *p; ! RoadMapConfig *file; + RoadMapConfigAge++; for (file = RoadMapConfigFiles; file->name != NULL; ++file) { + if (!strcmp (file->name, name)) break; + } + + if (file->name == NULL) { + roadmap_log + (ROADMAP_ERROR, + "config_reload found no '%s' config file", name); + + return -1; + + } else { int loaded = 0; ! for (p = roadmap_path_first(file->set); p != NULL; ! p = roadmap_path_next(file->set, p)) { ! loaded = roadmap_config_load (p, file, ROADMAP_CONFIG_SHARED); ! ! if (loaded) break; } if (file->required && (!loaded)) { roadmap_log *************** *** 602,606 **** --- 620,639 ---- "found no '%s' config file, check RoadMap installation", file->name); + return -1; } + + return 0; + } + } + + + void roadmap_config_initialize (void) { + + RoadMapConfig *file; + + + for (file = RoadMapConfigFiles; file->name != NULL; ++file) { + + roadmap_config_reload (file->name); } } Index: roadmap_config.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_config.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_config.h 27 Jul 2006 14:18:46 -0000 1.4 --- roadmap_config.h 21 Nov 2006 09:22:08 -0000 1.5 *************** *** 43,46 **** --- 43,47 ---- const char *category; const char *name; + int age; RoadMapConfigItem *reference; *************** *** 49,55 **** ! #define ROADMAP_CONFIG_ITEM_EMPTY {NULL, NULL, NULL} ! #define ROADMAP_CONFIG_ITEM(c,n) {c, n, NULL} ! #define ROADMAP_CONFIG_LOCATION(n) {"Locations", n, NULL} --- 50,56 ---- ! #define ROADMAP_CONFIG_ITEM_EMPTY {NULL, NULL, 0, NULL} ! #define ROADMAP_CONFIG_ITEM(c,n) {c, n, 0, NULL} ! #define ROADMAP_CONFIG_LOCATION(n) {"Locations", n, 0, NULL} *************** *** 112,114 **** --- 113,117 ---- (RoadMapConfigDescriptor *descriptor, const RoadMapPosition *position); + int roadmap_config_reload (const char *name); + #endif // _ROADMAP_CONFIG__H_ Index: roadmap_display.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_display.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** roadmap_display.c 17 Jul 2006 06:29:37 -0000 1.10 --- roadmap_display.c 21 Nov 2006 09:22:08 -0000 1.11 *************** *** 43,46 **** --- 43,47 ---- #include "roadmap_sprite.h" #include "roadmap_voice.h" + #include "roadmap_skin.h" #include "roadmap_plugin.h" *************** *** 114,120 **** {p, n, NULL, NULL, 0, 0, 0, 0, {0, 0},{{0,0}, {0,0}}, NULL, NULL, \ PLUGIN_LINE_NULL, \ ! {n, "Text", NULL}, \ ! {n, "Background", NULL}, \ ! {n, "Foreground", NULL}, \ w, t, b, f, PLUGIN_STREET_NULL} --- 115,121 ---- {p, n, NULL, NULL, 0, 0, 0, 0, {0, 0},{{0,0}, {0,0}}, NULL, NULL, \ PLUGIN_LINE_NULL, \ ! {n, "Text", 0, NULL}, \ ! {n, "Background", 0, NULL}, \ ! {n, "Foreground", 0, NULL}, \ w, t, b, f, PLUGIN_STREET_NULL} *************** *** 729,735 **** roadmap_config_declare ! ("preferences", &RoadMapConfigConsoleBackground, "yellow"); roadmap_config_declare ! ("preferences", &RoadMapConfigConsoleForeground, "black"); for (sign = RoadMapStreetSign; sign->title != NULL; ++sign) { --- 730,736 ---- roadmap_config_declare ! ("schema", &RoadMapConfigConsoleBackground, "yellow"); roadmap_config_declare ! ("schema", &RoadMapConfigConsoleForeground, "black"); for (sign = RoadMapStreetSign; sign->title != NULL; ++sign) { *************** *** 749,751 **** --- 750,754 ---- &sign->foreground_descriptor, sign->default_foreground); } + + roadmap_skin_register (roadmap_display_create_pens); } Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_screen.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** roadmap_screen.c 17 Nov 2006 16:54:24 -0000 1.22 --- roadmap_screen.c 21 Nov 2006 09:22:08 -0000 1.23 *************** *** 58,61 **** --- 58,62 ---- #include "roadmap_label.h" #include "roadmap_plugin.h" + #include "roadmap_skin.h" #include "roadmap_screen.h" *************** *** 1218,1222 **** ! static void roadmap_screen_short_click (RoadMapGuiPoint *point) { PluginLine line; --- 1219,1223 ---- ! static int roadmap_screen_short_click (RoadMapGuiPoint *point) { PluginLine line; *************** *** 1224,1228 **** RoadMapPosition position; - roadmap_math_to_position (point, &position, 1); --- 1225,1228 ---- *************** *** 1240,1243 **** --- 1240,1245 ---- roadmap_screen_repaint (); } + + return 1; } *************** *** 1266,1277 **** ! static void roadmap_screen_drag_start (RoadMapGuiPoint *point) { RoadMapScreenDragging = 1; RoadMapScreenPointerLocation = *point; roadmap_screen_hold (); /* We don't want to move with the GPS position. */ } ! static void roadmap_screen_drag_end (RoadMapGuiPoint *point) { roadmap_screen_record_move --- 1268,1282 ---- ! static int roadmap_screen_drag_start (RoadMapGuiPoint *point) { RoadMapScreenDragging = 1; RoadMapScreenPointerLocation = *point; roadmap_screen_hold (); /* We don't want to move with the GPS position. */ + roadmap_screen_refresh (); + + return 1; } ! static int roadmap_screen_drag_end (RoadMapGuiPoint *point) { roadmap_screen_record_move *************** *** 1282,1288 **** RoadMapScreenPointerLocation = *point; roadmap_screen_repaint (); } ! static void roadmap_screen_drag_motion (RoadMapGuiPoint *point) { if (RoadMapScreenViewMode == VIEW_MODE_3D) { --- 1287,1295 ---- RoadMapScreenPointerLocation = *point; roadmap_screen_repaint (); + + return 1; } ! static int roadmap_screen_drag_motion (RoadMapGuiPoint *point) { if (RoadMapScreenViewMode == VIEW_MODE_3D) { *************** *** 1305,1308 **** --- 1312,1317 ---- roadmap_screen_repaint (); RoadMapScreenPointerLocation = *point; + + return 1; } *************** *** 1317,1320 **** --- 1326,1336 ---- } + static void roadmap_screen_reset_pens (void) { + + RoadMapBackground = roadmap_canvas_create_pen ("Map.Background"); + roadmap_canvas_set_foreground + (roadmap_config_get (&RoadMapConfigMapBackground)); + } + void roadmap_screen_refresh (void) { *************** *** 1546,1550 **** roadmap_config_declare ! ("preferences", &RoadMapConfigMapBackground, "LightYellow"); roadmap_config_declare_enumeration --- 1562,1566 ---- roadmap_config_declare ! ("schema", &RoadMapConfigMapBackground, "LightYellow"); roadmap_config_declare_enumeration *************** *** 1584,1587 **** --- 1600,1605 ---- roadmap_state_add ("orientation_mode", &roadmap_screen_get_orientation_mode); + roadmap_skin_register (roadmap_screen_reset_pens); + roadmap_state_monitor (&roadmap_screen_repaint); } |
From: Ehud S. <esh...@us...> - 2006-11-21 09:18:13
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3586 Modified Files: Makefile Log Message: Update Makefile Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/Makefile,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Makefile 17 Nov 2006 16:51:04 -0000 1.23 --- Makefile 21 Nov 2006 09:18:10 -0000 1.24 *************** *** 150,153 **** --- 150,154 ---- roadmap_screen_obj.c \ roadmap_trip.c \ + roadmap_skin.c \ roadmap_layer.c \ roadmap_fuzzy.c \ *************** *** 283,286 **** --- 284,288 ---- ssd/ssd_menu.c \ ssd/ssd_messagebox.c \ + ssd/ssd_choice.c \ SSD_WIDGETS_OBJS=$(SSD_WIDGETS_SRCS:.c=.o) |
From: Ehud S. <esh...@us...> - 2006-11-21 09:17:44
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3246 Added Files: roadmap_address_ssd.c Log Message: Address dialogs for SSD. --- NEW FILE: roadmap_address_ssd.c --- /* roadmap_address_ssd.c - manage the roadmap address dialogs for small * screen devices. * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap 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 2 of the License, or * (at your option) any later version. * * RoadMap 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 RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * SYNOPSYS: * * See roadmap_address.h */ #include <string.h> #include <stdlib.h> #include "roadmap.h" #include "roadmap_types.h" #include "roadmap_history.h" #include "roadmap_locator.h" #include "roadmap_street.h" #include "roadmap_lang.h" #include "roadmap_messagebox.h" #include "roadmap_geocode.h" #include "roadmap_trip.h" #include "roadmap_county.h" #include "roadmap_display.h" #include "ssd/ssd_keyboard.h" #include "ssd/ssd_list.h" #include "roadmap_address.h" #define MAX_LIST_RESULTS 10 #define MAX_NAMES 100 static int RoadMapAddressSearchCount; static char *RoadMapAddressSearchNames[MAX_NAMES]; static RoadMapAddressNav RoadMapAddressNavigate; typedef struct { const char *title; int use_zip; int navigate; RoadMapGeocode *selections; void *history; char *city_name; char *street_name; int range; } RoadMapAddressDialog; typedef struct { RoadMapAddressSearchCB callback; void *data; const char *city; } RoadMapAddressSearch; static void roadmap_address_done (RoadMapGeocode *selected, RoadMapAddressDialog *context) { PluginStreet street; PluginLine line; roadmap_locator_activate (selected->fips); roadmap_log (ROADMAP_DEBUG, "selected address at %d.%06d %c, %d.%06d %c", abs(selected->position.longitude)/1000000, abs(selected->position.longitude)%1000000, selected->position.longitude >= 0 ? 'E' : 'W', abs(selected->position.latitude)/1000000, abs(selected->position.latitude)%1000000, selected->position.latitude >= 0 ? 'N' : 'S'); roadmap_plugin_set_line (&line, ROADMAP_PLUGIN_ID, selected->line, -1, selected->fips); roadmap_trip_set_point ("Selection", &selected->position); roadmap_trip_set_point ("Address", &selected->position); if (!context->navigate || !RoadMapAddressNavigate) { roadmap_trip_set_focus ("Address"); roadmap_display_activate ("Selected Street", &line, &selected->position, &street); roadmap_screen_refresh (); } else { if ((*RoadMapAddressNavigate) (&selected->position, &line, 0) != -1) { } } } static void roadmap_address_show (const char *city, const char *street_name, const char *street_number_image, RoadMapAddressDialog *context) { int i; int count; RoadMapGeocode *selections; char *state; const char *argv[4]; state = "IL"; if (context->use_zip) { return; /* TBD: how to select by ZIP ? Need one more table in usdir. */ } count = roadmap_geocode_address (&selections, street_number_image, street_name, city, state); if (count <= 0) { roadmap_messagebox (roadmap_lang_get ("Warning"), roadmap_geocode_last_error()); free (selections); return; } argv[0] = street_number_image; argv[1] = street_name; argv[2] = city; argv[3] = state; //roadmap_history_add ('A', argv); roadmap_address_done (selections, context); for (i = 0; i < count; ++i) { free (selections[i].name); selections[i].name = NULL; } free (selections); } /*** city / street search ***/ static int roadmap_address_populate_list (RoadMapString index, const char *string, void *context) { if (RoadMapAddressSearchCount == MAX_NAMES) return 0; RoadMapAddressSearchNames[RoadMapAddressSearchCount++] = (char *)string; return 1; } static void roadmap_address_search_populate (const char *str, RoadMapAddressSearch *search, int force) { RoadMapAddressSearchCount = 0; if (force || strlen(str)) { if (search->city) { roadmap_street_search (search->city, str, roadmap_address_populate_list, NULL); } else { roadmap_locator_search_city (str, roadmap_address_populate_list, NULL); } } } static int list_callback (int type, const char *new_value, void *context) { RoadMapAddressSearch *search = (RoadMapAddressSearch *)context; ssd_keyboard_hide (SSD_KEYBOARD_LETTERS); ssd_list_hide (); search->callback (new_value, search->data); free (search); return 1; } static int keyboard_callback (int type, const char *new_value, void *context) { RoadMapAddressSearch *search = (RoadMapAddressSearch *)context; const char *title; if (!search->city) { title = roadmap_lang_get ("City"); } else { title = roadmap_lang_get ("Street"); } roadmap_address_search_populate (new_value, search, type == SSD_KEYBOARD_OK); if (*new_value && !RoadMapAddressSearchCount) return 0; if (!RoadMapAddressSearchCount) return 1; if ((RoadMapAddressSearchCount <= MAX_LIST_RESULTS) || (type == SSD_KEYBOARD_OK)) { ssd_list_show (title, RoadMapAddressSearchCount, (const char **)RoadMapAddressSearchNames, NULL, list_callback, search); } return 1; } static void roadmap_address_street_result (const char *result, void *data) { RoadMapAddressDialog *context = (RoadMapAddressDialog *)data; char name[255]; char *tmp; if ((result == NULL) || !strlen (result)) return; strncpy (name, result, sizeof(name)); name [sizeof(name) - 1] = 0; tmp = strrchr (name, ','); if (!tmp) return; *tmp = 0; tmp += 2; roadmap_address_show (tmp, name, "", context); } static void roadmap_address_city_result (const char *result, void *data) { RoadMapAddressDialog *context = (RoadMapAddressDialog *)data; context->city_name = strdup(result); roadmap_address_search_dialog (context->city_name, roadmap_address_street_result, context); } static void roadmap_address_dialog (RoadMapAddressDialog *context) { roadmap_address_search_dialog (NULL, roadmap_address_city_result, context); } void roadmap_address_search_dialog (const char *city, RoadMapAddressSearchCB callback, void *data) { const char *title; RoadMapAddressSearch *context = (RoadMapAddressSearch *) malloc (sizeof(*context)); context->callback = callback; context->data = data; context->city = city; if (!context->city) { title = roadmap_lang_get ("City"); } else { title = roadmap_lang_get ("Street"); } ssd_keyboard_show (SSD_KEYBOARD_LETTERS, title, "", keyboard_callback, context); #if 0 if (roadmap_dialog_activate ("Search Address", context)) { roadmap_dialog_new_entry (".search", "Name", roadmap_address_search_populate); roadmap_dialog_new_label (".search", "found"); roadmap_dialog_new_list (".search", ".results"); roadmap_dialog_add_button ("Cancel", roadmap_address_search_cancel); roadmap_dialog_add_button ("Done", roadmap_address_search_done); roadmap_dialog_complete (roadmap_preferences_use_keyboard()); /* No need for a keyboard. */ } roadmap_dialog_set_data (".search", "Name", ""); roadmap_dialog_set_data (".search", "found", ""); roadmap_dialog_set_focus (".search", "Name"); roadmap_address_search_populate ("Search Address", context); #endif } void roadmap_address_location_by_city (void) { static RoadMapAddressDialog context = {"Location", 0, 0, NULL, NULL, NULL, NULL, 0}; roadmap_address_dialog (&context); } void roadmap_address_location_by_zip (void) { static RoadMapAddressDialog context = {"Location by ZIP", 1, 0, NULL, NULL, NULL, NULL, 0}; roadmap_address_dialog (&context); } void roadmap_address_register_nav (RoadMapAddressNav navigate) { RoadMapAddressNavigate = navigate; } |
From: Ehud S. <esh...@us...> - 2006-11-21 09:17:22
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3231 Added Files: roadmap_skin.c roadmap_skin.h Log Message: Skin management. --- NEW FILE: roadmap_skin.h --- /* roadmap_skin.h - manage skins. * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap 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 2 of the License, or * (at your option) any later version. * * RoadMap 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 RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef INCLUDE__ROADMAP_SKIN__H #define INCLUDE__ROADMAP_SKIN__H #include "roadmap.h" void roadmap_skin_register (RoadMapCallback listener); void roadmap_skin_set_subskin (const char *sub_skin); void roadmap_skin_toggle (void); #endif // INCLUDE__ROADMAP_SKIN__H --- NEW FILE: roadmap_skin.c --- /* roadmap_skin.c - manage skins * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap 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 2 of the License, or * (at your option) any later version. * * RoadMap 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 RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * DESCRIPTION: * */ #include <stdio.h> #include <string.h> #include "roadmap.h" #include "roadmap_path.h" #include "roadmap_config.h" #include "roadmap_screen.h" #include "roadmap_skin.h" #define MAX_LISTENERS 16 static RoadMapCallback RoadMapSkinListeners[MAX_LISTENERS] = {NULL}; static const char *CurrentSkin = "default"; static const char *CurrentSubSkin = "day"; static void notify_listeners (void) { int i; for (i = 0; i < MAX_LISTENERS; ++i) { if (RoadMapSkinListeners[i] == NULL) break; (RoadMapSkinListeners[i]) (); } } void roadmap_skin_register (RoadMapCallback listener) { int i; for (i = 0; i < MAX_LISTENERS; ++i) { if (RoadMapSkinListeners[i] == NULL) { RoadMapSkinListeners[i] = listener; break; } } } void roadmap_skin_set_subskin (const char *sub_skin) { const char *base_path = roadmap_path_preferred ("skin"); char path[255]; char *skin_path; char *subskin_path; CurrentSubSkin = sub_skin; skin_path = roadmap_path_join (base_path, CurrentSkin); subskin_path = roadmap_path_join (skin_path, CurrentSubSkin); snprintf (path, sizeof(path), "%s,%s", subskin_path, skin_path); roadmap_path_set ("skin", path); roadmap_path_free (subskin_path); roadmap_path_free (skin_path); roadmap_config_reload ("schema"); notify_listeners (); roadmap_screen_redraw (); } void roadmap_skin_toggle (void) { if (!strcmp (CurrentSubSkin, "day")) { roadmap_skin_set_subskin ("night"); } else { roadmap_skin_set_subskin ("day"); } } |
From: Ehud S. <esh...@us...> - 2006-11-21 09:14:45
|
Update of /cvsroot/roadmap/roadmap_editor/src/libpng In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2026/libpng Log Message: Directory /cvsroot/roadmap/roadmap_editor/src/libpng added to the repository |
From: Paul F. <pg...@us...> - 2006-11-20 01:57:09
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7397 Modified Files: roadmap_trip.c sprites Log Message: make selection point visible. undo parts of roadmap_trip.c:1.75, because not calling refresh causes problems later on. instead, suppress screen jumps by not resetting focus on waypoint creation, unless new waypoint is off-screen. (which can happen if you choose the location, pan away, and then create.) Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** roadmap_trip.c 19 Nov 2006 22:28:49 -0000 1.80 --- roadmap_trip.c 20 Nov 2006 01:57:06 -0000 1.81 *************** *** 192,196 **** ROADMAP_TRIP_ITEM ("WayPoint", NULL, 0, 1, 0), ROADMAP_TRIP_ITEM ("Address", NULL, 0, 1, 0), ! ROADMAP_TRIP_ITEM ("Selection", NULL, 0, 1, 0), ROADMAP_TRIP_ITEM ("Departure", "Departure", 0, 0, 1), ROADMAP_TRIP_ITEM ("Hold", NULL, 1, 0, 0), --- 192,196 ---- ROADMAP_TRIP_ITEM ("WayPoint", NULL, 0, 1, 0), ROADMAP_TRIP_ITEM ("Address", NULL, 0, 1, 0), ! ROADMAP_TRIP_ITEM ("Selection", "Selection", 0, 0, 0), ROADMAP_TRIP_ITEM ("Departure", "Departure", 0, 0, 1), ROADMAP_TRIP_ITEM ("Hold", NULL, 1, 0, 0), *************** *** 757,761 **** (RoadMapListItem *)roadmap_landmark_remove(waypointp)); RoadMapTripRefresh = 1; ! roadmap_screen_redraw (); return; } else if (which == TRIP_WAYPOINTS) { --- 757,761 ---- (RoadMapListItem *)roadmap_landmark_remove(waypointp)); RoadMapTripRefresh = 1; ! roadmap_screen_refresh (); return; } else if (which == TRIP_WAYPOINTS) { *************** *** 778,782 **** roadmap_trip_set_modified(1); RoadMapTripRefresh = 1; ! roadmap_screen_redraw (); return; } --- 778,782 ---- roadmap_trip_set_modified(1); RoadMapTripRefresh = 1; ! roadmap_screen_refresh (); return; } *************** *** 801,805 **** roadmap_trip_set_modified(1); ! roadmap_screen_redraw (); } --- 801,805 ---- roadmap_trip_set_modified(1); ! roadmap_screen_refresh (); } *************** *** 1327,1330 **** --- 1327,1332 ---- focal->has_value = 1; RoadMapTripLastSetPoint = focal; + + if (focal->sprite != NULL) RoadMapTripRefresh = 1; } *************** *** 1547,1558 **** case PLACE_TRIP_MARK: waypt_add(&RoadMapTripWaypointHead, waypointp); - roadmap_trip_set_focus_waypoint (waypointp); break; case PLACE_PERSONAL_MARK: - /* this call forces any updating that's necessary, so we can return */ roadmap_landmark_add(waypointp); ! roadmap_trip_set_focus_waypoint (waypointp); ! return; case PLACE_NEW_ROUTE: --- 1549,1557 ---- case PLACE_TRIP_MARK: waypt_add(&RoadMapTripWaypointHead, waypointp); break; case PLACE_PERSONAL_MARK: roadmap_landmark_add(waypointp); ! break; case PLACE_NEW_ROUTE: *************** *** 1563,1573 **** if (where >= NUM_PLACEMENTS) { roadmap_trip_set_route_focii (); ! roadmap_trip_set_focus_waypoint (waypointp); } RoadMapTripRefresh = 1; - roadmap_trip_set_modified(1); ! roadmap_screen_redraw (); } --- 1562,1581 ---- if (where >= NUM_PLACEMENTS) { roadmap_trip_set_route_focii (); ! } ! ! if (!roadmap_math_point_is_visible (&waypointp->pos)) { ! /* Only set focus if the point we just added is off-screen. This ! * will take us there. ! */ ! roadmap_trip_set_focus_waypoint (waypointp); } RoadMapTripRefresh = 1; ! if (where != PLACE_PERSONAL_MARK) { ! roadmap_trip_set_modified(1); ! } ! ! roadmap_screen_refresh (); } *************** *** 2243,2247 **** roadmap_trip_set_modified(0); ! roadmap_screen_refresh (); roadmap_main_title(""); --- 2251,2255 ---- roadmap_trip_set_modified(0); ! roadmap_screen_redraw (); roadmap_main_title(""); *************** *** 3058,3062 **** roadmap_display_hide("Moving"); ! roadmap_screen_redraw (); } --- 3066,3070 ---- roadmap_display_hide("Moving"); ! roadmap_screen_refresh (); } *************** *** 3109,3113 **** w->description ? w->description : ""); ! roadmap_screen_redraw (); RoadMapTripPlaceMoving = 1; --- 3117,3121 ---- w->description ? w->description : ""); ! roadmap_screen_refresh (); RoadMapTripPlaceMoving = 1; Index: sprites =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/sprites,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** sprites 27 Sep 2006 08:44:06 -0000 1.10 --- sprites 20 Nov 2006 01:57:06 -0000 1.11 *************** *** 23,27 **** A GreenTriangle ! S Position A CrossHair --- 23,27 ---- A GreenTriangle ! S Selection A CrossHair |
From: Paul F. <pg...@us...> - 2006-11-20 01:26:29
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27679 Modified Files: roadmap_screen.c Log Message: make selection point visible. do a final reset of Hold, and a refresh, at the end of a screen drag, to force the focus update. otherwise the next refresh will undo the drag. Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.c,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** roadmap_screen.c 19 Nov 2006 21:24:19 -0000 1.81 --- roadmap_screen.c 20 Nov 2006 01:26:24 -0000 1.82 *************** *** 1143,1146 **** --- 1143,1147 ---- roadmap_trip_set_point ("Selection", &position); + roadmap_screen_refresh (); } *************** *** 1205,1209 **** RoadMapScreenDragging = 0; RoadMapScreenPointerLocation = *point; ! roadmap_screen_repaint (); } --- 1206,1211 ---- RoadMapScreenDragging = 0; RoadMapScreenPointerLocation = *point; ! roadmap_screen_hold (); ! roadmap_screen_refresh (); } |
From: Paul F. <pg...@us...> - 2006-11-19 22:28:52
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23497 Modified Files: roadmap_trip.c Log Message: allow adding trip and personal landmarks based on selection, even if current route is null Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** roadmap_trip.c 16 Nov 2006 16:50:46 -0000 1.79 --- roadmap_trip.c 19 Nov 2006 22:28:49 -0000 1.80 *************** *** 1452,1457 **** const char *name; ! if (RoadMapCurrentRoute == NULL || ! RoadMapTripLastSetPoint == NULL || !RoadMapTripLastSetPoint->has_value) { return; --- 1452,1456 ---- const char *name; ! if (RoadMapTripLastSetPoint == NULL || !RoadMapTripLastSetPoint->has_value) { return; *************** *** 1499,1503 **** if (where >= NUM_PLACEMENTS && RoadMapCurrentRoute == NULL) { ! return; /* shouldn't happen */ } --- 1498,1502 ---- if (where >= NUM_PLACEMENTS && RoadMapCurrentRoute == NULL) { ! return; } |
From: Paul F. <pg...@us...> - 2006-11-19 21:25:06
|
Update of /cvsroot/roadmap/roadmap In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv31052 Modified Files: README Log Message: whitespace change only -- eliminated tabs. Index: README =================================================================== RCS file: /cvsroot/roadmap/roadmap/README,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** README 19 Nov 2006 21:24:19 -0000 1.108 --- README 19 Nov 2006 21:25:03 -0000 1.109 *************** *** 2037,2041 **** zoomout zoom1 ! ->Help... ---- The last item in the toolbar file example will invoke the "Help..." menu. --- 2037,2041 ---- zoomout zoom1 ! ->Help... ---- The last item in the toolbar file example will invoke the "Help..." menu. *************** *** 2219,2226 **** [Display.Font Size] The size of the text used for labeling. ! <<Format:>> integer (pixels) ! <<Comment:>> Currently only honored if the internal "linefont" ! is being used. [Help.Browser] The browser program used to show the help text. --- 2219,2226 ---- [Display.Font Size] The size of the text used for labeling. ! <<Format:>> integer (pixels) ! <<Comment:>> Currently only honored if the internal "linefont" ! is being used. [Help.Browser] The browser program used to show the help text. *************** *** 2276,2281 **** <<Comment:>> chooses whether the map will initially show north, ! or the direction of travel, towards the top of the ! screen. Can be toggled by command as well. [Map.GPS map offset latitude] --- 2276,2281 ---- <<Comment:>> chooses whether the map will initially show north, ! or the direction of travel, towards the top of the ! screen. Can be toggled by command as well. [Map.GPS map offset latitude] *************** *** 2315,2323 **** <<Default:>> labels ! <<Comment:>> The internal line font (if available) may be preferable ! to the system font since it can draw at angles, and since ! its size can be easily scaled. It is not very pretty, ! however. ! [Labels.MinFeatureSize] The shortest street which may be labeled. --- 2315,2323 ---- <<Default:>> labels ! <<Comment:>> The internal line font (if available) may be preferable ! to the system font since it can draw at angles, and since ! its size can be easily scaled. It is not very pretty, ! however. ! [Labels.MinFeatureSize] The shortest street which may be labeled. *************** *** 2335,2342 **** [Labels.Font Size] The size of the text used for labeling. ! <<Format:>> integer (pixels) ! <<Comment:>> Currently only honored if the internal "linefont" ! is being used. [Landmarks.Name] The filename used for storing personal landmarks --- 2335,2342 ---- [Labels.Font Size] The size of the text used for labeling. ! <<Format:>> integer (pixels) ! <<Comment:>> Currently only honored if the internal "linefont" ! is being used. [Landmarks.Name] The filename used for storing personal landmarks *************** *** 2354,2361 **** [Landmarks.Font Size] The size of the text used for labeling. ! <<Format:>> integer (pixels) ! <<Comment:>> Currently only honored if the internal "linefont" ! is being used. [Track.Name] The filename used for storing current "breadcrumb" track --- 2354,2361 ---- [Landmarks.Font Size] The size of the text used for labeling. ! <<Format:>> integer (pixels) ! <<Comment:>> Currently only honored if the internal "linefont" ! is being used. [Track.Name] The filename used for storing current "breadcrumb" track *************** *** 2365,2369 **** <<Default:>> currenttrack.gpx, in the '&' (~/.roadmap) directory. ! <<Comment:>> The file is in stored in GPX format. [Track.Initial Display] Determines whether the track is displayed when --- 2365,2369 ---- <<Default:>> currenttrack.gpx, in the '&' (~/.roadmap) directory. ! <<Comment:>> The file is in stored in GPX format. [Track.Initial Display] Determines whether the track is displayed when *************** *** 2374,2378 **** <<Default:>> on ! <<Comment:>> The display can still be toggled by command. [Track.Policy] The algorithm used to decide when to store a new trackpoint --- 2374,2378 ---- <<Default:>> on ! <<Comment:>> The display can still be toggled by command. [Track.Policy] The algorithm used to decide when to store a new trackpoint *************** *** 2382,2394 **** <<Default:>> off ! <<Comment:>> When "off", no track is recorded. When set to "Time", ! a new trackpoint is stored after "Track.Time Delta" time ! has passed since the last point was recorded. Shen set to ! "Distance Delta", a new point is stored when the user has ! moved Track.Distance from the last point. "Deviation" is ! the optimal setting: call the most recent three points A, ! B, and C. Point B is dropped if the distance from A to B ! and then to C is approximately equal to the distance ! directly from A to C. [Track.Time Delta] Time interval used when Track.Policy is "Time". --- 2382,2394 ---- <<Default:>> off ! <<Comment:>> When "off", no track is recorded. When set to "Time", ! a new trackpoint is stored after "Track.Time Delta" time ! has passed since the last point was recorded. Shen set to ! "Distance Delta", a new point is stored when the user has ! moved Track.Distance from the last point. "Deviation" is ! the optimal setting: call the most recent three points A, ! B, and C. Point B is dropped if the distance from A to B ! and then to C is approximately equal to the distance ! directly from A to C. [Track.Time Delta] Time interval used when Track.Policy is "Time". *************** *** 2405,2409 **** [Track.Autosave minutes] Number of minutes between automatic saves of ! the current track. <<Format:>> integer --- 2405,2409 ---- [Track.Autosave minutes] Number of minutes between automatic saves of ! the current track. <<Format:>> integer *************** *** 2412,2416 **** [Track.Saved Track Points] Approximate number of track points saved in ! memory, or in a single file. <<Format:>> integer --- 2412,2416 ---- [Track.Saved Track Points] Approximate number of track points saved in ! memory, or in a single file. <<Format:>> integer *************** *** 2418,2425 **** <<Default:>> 1000 ! <<Comment:>> After "Track.Autosave minutes", if there are 25% ! more points in the current track than this number, then ! 75% are saved to an archive file, and the remainder ! are still kept in memory and displayed on the map. [Trip.Name] The filename holding the current trip. --- 2418,2425 ---- <<Default:>> 1000 ! <<Comment:>> After "Track.Autosave minutes", if there are 25% ! more points in the current track than this number, then ! 75% are saved to an archive file, and the remainder ! are still kept in memory and displayed on the map. [Trip.Name] The filename holding the current trip. *************** *** 2428,2434 **** <<Default:>> SavedTrip.gpx, in the '&/trips' (~/.roadmap) directory, ! but usually chosen by the user. ! <<Comment:>> The file is in stored in GPX format. [Trip.Show Inactive Routes] Should waypoints in unselected routes be shown. --- 2428,2434 ---- <<Default:>> SavedTrip.gpx, in the '&/trips' (~/.roadmap) directory, ! but usually chosen by the user. ! <<Comment:>> The file is in stored in GPX format. [Trip.Show Inactive Routes] Should waypoints in unselected routes be shown. *************** *** 2438,2445 **** <<Default:>> yes ! <<Comment:>> Can still be toggled by command. [Trip.Connect Route Points] Should route waypoints be connected with ! straight lines? <<Format:>> boolean --- 2438,2445 ---- <<Default:>> yes ! <<Comment:>> Can still be toggled by command. [Trip.Connect Route Points] Should route waypoints be connected with ! straight lines? <<Format:>> boolean *************** *** 2447,2451 **** <<Default:>> yes ! <<Comment:>> Can still be toggled by command. [Trip.Route Connect Color] The color used to connect route waypoints. --- 2447,2451 ---- <<Default:>> yes ! <<Comment:>> Can still be toggled by command. [Trip.Route Connect Color] The color used to connect route waypoints. *************** *** 2456,2460 **** [Trip.Waypoint Radius] How close does the GPS need to be to a waypoint ! to be "on" the waypoint. <<Format:>> integer (distance, with units) --- 2456,2460 ---- [Trip.Waypoint Radius] How close does the GPS need to be to a waypoint ! to be "on" the waypoint. <<Format:>> integer (distance, with units) *************** *** 2465,2481 **** <<Format:>> A comma-separated list of filenames, each accompanied ! by their semi-colon-separated list of display parameters: ! filename;spritename;labelcolor;declutterlevel,filename;spritename... <<Default:>> <empty> <<Comment:>> The filename may include & and ~ as path shorthands, ! the spritename else should appear in the sprites file, the ! labelcolor will be used when writing the feature's name, and the ! declutter level is an integer, representing the zoom level above ! which the label will not be drawn. The spritename or the ! labelcolor may be the string "NONE", which will suppress the ! sprite or the label, respectively. The declutter value may be ! omitted. [Files.Make Backups] Enable/disable the creation of backup files. --- 2465,2481 ---- <<Format:>> A comma-separated list of filenames, each accompanied ! by their semi-colon-separated list of display parameters: ! filename;spritename;labelcolor;declutterlevel,filename;spritename... <<Default:>> <empty> <<Comment:>> The filename may include & and ~ as path shorthands, ! the spritename else should appear in the sprites file, the ! labelcolor will be used when writing the feature's name, and the ! declutter level is an integer, representing the zoom level above ! which the label will not be drawn. The spritename or the ! labelcolor may be the string "NONE", which will suppress the ! sprite or the label, respectively. The declutter value may be ! omitted. [Files.Make Backups] Enable/disable the creation of backup files. *************** *** 2486,2490 **** <<Comment:>> On UNIX, backup files will have a '~' character ! appended. Under Windows, a ".bak" suffix will be used. [GPS.Background] The background color for the RoadGps screen. --- 2486,2490 ---- <<Comment:>> On UNIX, backup files will have a '~' character ! appended. Under Windows, a ".bak" suffix will be used. [GPS.Background] The background color for the RoadGps screen. *************** *** 2528,2538 **** available, one can use a GPS source connected directly to a serial port. (tty://<device-path>[:baudrate]) An example ! would be "tty://dev/ttyS0", or "COM1:" under Windows. 4800 ! baud is the NMEA standard, but a different speed can be ! given: "tty://dev/ttyS0:19200". (Note that using direct ! tty access prevents one from running both RoadMap and ! RoadGps at the same time, since there is no mechanism in ! place to allow sharing the serial port. Using gpsd is ! recommended.) [GPS.Baud] The baud rate to use if GPS.Source is a serial port --- 2528,2538 ---- available, one can use a GPS source connected directly to a serial port. (tty://<device-path>[:baudrate]) An example ! would be "tty://dev/ttyS0", or "COM1:" under Windows. 4800 ! baud is the NMEA standard, but a different speed can be ! given: "tty://dev/ttyS0:19200". (Note that using direct ! tty access prevents one from running both RoadMap and ! RoadGps at the same time, since there is no mechanism in ! place to allow sharing the serial port. Using gpsd is ! recommended.) [GPS.Baud] The baud rate to use if GPS.Source is a serial port *************** *** 2652,2657 **** <<Default:>> 30m ! <<Comment:>> This default accuracy can be adjusted to the actual GPS ! estimate if a Garmin GPS receiver is used. [Accuracy.GPS Speed] GPS's speed accuracy. --- 2652,2657 ---- <<Default:>> 30m ! <<Comment:>> This default accuracy can be adjusted to the actual GPS ! estimate if a Garmin GPS receiver is used. [Accuracy.GPS Speed] GPS's speed accuracy. *************** *** 3121,3142 **** in the file are ignored. ! The "Current Track" file contains waypoints representing ! where you've been -- a "breadcrumb trail", if you will. ! This file (called "currenttrack.gpx" by default) will ! only contain a single track when written. When read (on ! startup, to restore previous state), only the first track ! in the file will be read. All other routes or tracks and ! waypoints will be ignored (and likely lost, when the ! current track is saved at the end of the session). Along ! with the currenttrack.gpx, you may see "recenttrack.csv", ! and one or more "savetrack-*.gpx" files (which will ! include a date in their names). The "savetrack" files are ! archival -- if the in-memory list gets too big, or if the ! user "clears" the current track, then excess historical ! trackpoints will be written to a "savetrack" file. The ! "recenttrack.csv" file is a temporary file, used to keep ! RoadMap from losing any track points in the event that it ! dies (crashes) unexpectedly. The goal is to never lose a ! track point. (These files are not stored in the same directory as the other --- 3121,3142 ---- in the file are ignored. ! The "Current Track" file contains waypoints representing ! where you've been -- a "breadcrumb trail", if you will. ! This file (called "currenttrack.gpx" by default) will ! only contain a single track when written. When read (on ! startup, to restore previous state), only the first track ! in the file will be read. All other routes or tracks and ! waypoints will be ignored (and likely lost, when the ! current track is saved at the end of the session). Along ! with the currenttrack.gpx, you may see "recenttrack.csv", ! and one or more "savetrack-*.gpx" files (which will ! include a date in their names). The "savetrack" files are ! archival -- if the in-memory list gets too big, or if the ! user "clears" the current track, then excess historical ! trackpoints will be written to a "savetrack" file. The ! "recenttrack.csv" file is a temporary file, used to keep ! RoadMap from losing any track points in the event that it ! dies (crashes) unexpectedly. The goal is to never lose a ! track point. (These files are not stored in the same directory as the other |
From: Paul F. <pg...@us...> - 2006-11-19 21:24:27
|
Update of /cvsroot/roadmap/roadmap/src/gtk2 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30639/src/gtk2 Modified Files: roadmap_canvas.c Log Message: clean up font handling, so that offsets and start and center positions passed around in the draw_string/_angle() api's are more uniform. adjusted the centerline calculations to be more correct (center is half of ascent plus descent). linefont is now selectable at runtime to be used for labels or signs or both. new string drawing routines in roadmap_screen.c aid this. this eliminates two sets of ifdefs. if internal linefont is in use, font size for street, landmark, and display sign labels is now run-time configurable. Index: roadmap_canvas.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gtk2/roadmap_canvas.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** roadmap_canvas.c 12 Aug 2006 01:48:48 -0000 1.14 --- roadmap_canvas.c 19 Nov 2006 21:24:19 -0000 1.15 *************** *** 202,230 **** const char *text) { - int x; - int y; int text_width; int text_ascent; int text_descent; ! int text_height; roadmap_canvas_get_text_extents (text, -1, &text_width, &text_ascent, &text_descent, NULL); ! text_height = text_ascent + text_descent; ! ! x = position->x; ! y = position->y; if (corner & ROADMAP_CANVAS_RIGHT) ! x -= text_width; else if (corner & ROADMAP_CANVAS_CENTER_X) ! x -= text_width / 2; if (corner & ROADMAP_CANVAS_BOTTOM) ! y -= text_height; else if (corner & ROADMAP_CANVAS_CENTER_Y) ! y -= (text_height / 2); ! gdk_draw_layout (RoadMapDrawingBuffer, RoadMapGc, x, y, RoadMapLayout); } --- 202,228 ---- const char *text) { int text_width; int text_ascent; int text_descent; ! RoadMapGuiPoint start[1]; roadmap_canvas_get_text_extents (text, -1, &text_width, &text_ascent, &text_descent, NULL); ! start->x = position->x; ! start->y = position->y; if (corner & ROADMAP_CANVAS_RIGHT) ! start->x -= text_width; else if (corner & ROADMAP_CANVAS_CENTER_X) ! start->x -= text_width / 2; if (corner & ROADMAP_CANVAS_BOTTOM) ! start->y -= text_descent; else if (corner & ROADMAP_CANVAS_CENTER_Y) ! start->y = start->y - text_descent + ((text_descent + text_ascent) / 2); ! else /* TOP */ ! start->y += text_ascent; ! roadmap_canvas_draw_string_angle (start, position, 0, text); } *************** *** 233,240 **** int angle, const char *text) { ! /* no angle possible, currently. at least try and center the text */ ! roadmap_canvas_draw_string (center, ROADMAP_CANVAS_CENTER, text); } void roadmap_canvas_draw_multiple_points (int count, RoadMapGuiPoint *points) { --- 231,240 ---- int angle, const char *text) { ! /* no angle possible */ ! gdk_draw_layout ! (RoadMapDrawingBuffer, RoadMapGc, position->x, position->y, RoadMapLayout); } + void roadmap_canvas_draw_multiple_points (int count, RoadMapGuiPoint *points) { *************** *** 251,255 **** } - void roadmap_canvas_draw_multiple_lines (int count, int *lines, RoadMapGuiPoint *points, int fast_draw) { --- 251,254 ---- |
From: Paul F. <pg...@us...> - 2006-11-19 21:24:24
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30639/src Modified Files: roadmap_display.c roadmap_label.c roadmap_label.h roadmap_landmark.c roadmap_linefont.c roadmap_linefont.h roadmap_screen.c roadmap_screen.h Log Message: clean up font handling, so that offsets and start and center positions passed around in the draw_string/_angle() api's are more uniform. adjusted the centerline calculations to be more correct (center is half of ascent plus descent). linefont is now selectable at runtime to be used for labels or signs or both. new string drawing routines in roadmap_screen.c aid this. this eliminates two sets of ifdefs. if internal linefont is in use, font size for street, landmark, and display sign labels is now run-time configurable. Index: roadmap_landmark.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_landmark.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** roadmap_landmark.c 15 Nov 2006 23:39:50 -0000 1.14 --- roadmap_landmark.c 19 Nov 2006 21:24:19 -0000 1.15 *************** *** 47,54 **** static RoadMapConfigDescriptor RoadMapConfigLandmarksColor = ! ROADMAP_CONFIG_ITEM("Landmarks", "Color"); static RoadMapConfigDescriptor RoadMapConfigBackupFiles = ! ROADMAP_CONFIG_ITEM("Files", "Make Backups"); --- 47,57 ---- static RoadMapConfigDescriptor RoadMapConfigLandmarksColor = ! ROADMAP_CONFIG_ITEM ("Landmarks", "Color"); ! ! static RoadMapConfigDescriptor RoadMapConfigLandmarkSize = ! ROADMAP_CONFIG_ITEM ("Landmarks", "Font Size"); static RoadMapConfigDescriptor RoadMapConfigBackupFiles = ! ROADMAP_CONFIG_ITEM ("Files", "Make Backups"); *************** *** 58,62 **** ! #define ROADMAP_LANDMARK_LABEL_SIZE 18 void roadmap_landmark_draw_waypoint --- 61,65 ---- ! static int RoadMapLandmarkFontSize; void roadmap_landmark_draw_waypoint *************** *** 98,102 **** */ roadmap_label_draw_text(waypointp->shortname, ! &guipoint, &guipoint, 0, 0, ROADMAP_LANDMARK_LABEL_SIZE); } } --- 101,105 ---- */ roadmap_label_draw_text(waypointp->shortname, ! &guipoint, &guipoint, 0, 0, RoadMapLandmarkFontSize); } } *************** *** 133,137 **** */ roadmap_label_draw_text(weepointp->name, ! &guipoint, &guipoint, 0, 0, ROADMAP_LANDMARK_LABEL_SIZE); } } --- 136,140 ---- */ roadmap_label_draw_text(weepointp->name, ! &guipoint, &guipoint, 0, 0, RoadMapLandmarkFontSize); } } *************** *** 144,147 **** --- 147,153 ---- void roadmap_landmark_display (void) { + RoadMapLandmarkFontSize = + roadmap_config_get_integer (&RoadMapConfigLandmarkSize); + waypt_iterator (&RoadMapLandmarkHead, roadmap_landmark_draw); *************** *** 329,332 **** --- 335,341 ---- ("preferences", &RoadMapConfigLandmarksColor, "darkred"); + roadmap_config_declare + ("preferences", &RoadMapConfigLandmarkSize, "18"); + ROADMAP_LIST_INIT(&RoadMapLandmarkHead); Index: roadmap_display.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_display.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** roadmap_display.c 2 Nov 2006 01:41:59 -0000 1.29 --- roadmap_display.c 19 Nov 2006 21:24:19 -0000 1.30 *************** *** 39,43 **** #include "roadmap_street.h" #include "roadmap_config.h" ! #include "roadmap_linefont.h" #include "roadmap_canvas.h" #include "roadmap_message.h" --- 39,43 ---- #include "roadmap_street.h" #include "roadmap_config.h" ! #include "roadmap_screen.h" #include "roadmap_canvas.h" #include "roadmap_message.h" *************** *** 48,52 **** #include "roadmap_display.h" - #define ROADMAP_DISPLAY_SIGN_SIZE 20 static char *RoadMapDisplayPage = NULL; --- 48,51 ---- *************** *** 73,76 **** --- 72,78 ---- ROADMAP_CONFIG_ITEM("Console", "Foreground"); + static RoadMapConfigDescriptor RoadMapConfigDisplayFontSize = + ROADMAP_CONFIG_ITEM("Display", "Font Size"); + static RoadMapPen RoadMapMessageContour; *************** *** 78,81 **** --- 80,85 ---- static RoadMapPen RoadMapConsoleForeground; + static int RoadMapDisplayFontSize; + #define SIGN_BOTTOM 0 *************** *** 183,189 **** RoadMapMessageContour = roadmap_canvas_create_pen ("message.contour"); roadmap_canvas_set_foreground ("black"); ! #ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS ! roadmap_canvas_set_thickness (2); ! #endif RoadMapConsoleBackground = --- 187,193 ---- RoadMapMessageContour = roadmap_canvas_create_pen ("message.contour"); roadmap_canvas_set_foreground ("black"); ! //#ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS ! // roadmap_canvas_set_thickness (2); ! //#endif RoadMapConsoleBackground = *************** *** 240,251 **** *p1 = 0; ! #ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS ! roadmap_linefont_text ! (text_line, ROADMAP_CANVAS_LEFT|ROADMAP_CANVAS_TOP, ! position, ROADMAP_DISPLAY_SIGN_SIZE, 0); ! #else ! roadmap_canvas_draw_string ! (position, ROADMAP_CANVAS_LEFT|ROADMAP_CANVAS_TOP, text_line); ! #endif *p1 = saved; --- 244,250 ---- *p1 = 0; ! roadmap_screen_text (ROADMAP_TEXT_SIGNS, position, ! ROADMAP_CANVAS_LEFT|ROADMAP_CANVAS_TOP, ! RoadMapDisplayFontSize, text_line); *p1 = saved; *************** *** 256,267 **** } ! #ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS ! roadmap_linefont_text ! (text_line, ROADMAP_CANVAS_LEFT|ROADMAP_CANVAS_TOP, ! position, ROADMAP_DISPLAY_SIGN_SIZE, 0); ! #else ! roadmap_canvas_draw_string ! (position, ROADMAP_CANVAS_LEFT|ROADMAP_CANVAS_TOP, text_line); ! #endif } --- 255,261 ---- } ! roadmap_screen_text (ROADMAP_TEXT_SIGNS, position, ! ROADMAP_CANVAS_LEFT|ROADMAP_CANVAS_TOP, ! RoadMapDisplayFontSize, text_line); } *************** *** 301,314 **** int lines; - roadmap_log_push ("roadmap_display_sign"); ! #ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS ! roadmap_linefont_extents ! (sign->content, ROADMAP_DISPLAY_SIGN_SIZE, &width, &ascent, &descent); ! #else ! roadmap_canvas_get_text_extents ! (sign->content, -1, &width, &ascent, &descent, NULL); ! #endif width += 8; /* Keep some room around the text. */ --- 295,303 ---- int lines; roadmap_log_push ("roadmap_display_sign"); ! roadmap_screen_text_extents ! (ROADMAP_TEXT_SIGNS, sign->content, RoadMapDisplayFontSize, ! &width, &ascent, &descent, NULL); width += 8; /* Keep some room around the text. */ *************** *** 612,621 **** } ! #ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS ! roadmap_linefont_extents (text, ROADMAP_DISPLAY_SIGN_SIZE, ! &width, &ascent, &descent); ! #else ! roadmap_canvas_get_text_extents (text, -1, &width, &ascent, &descent, NULL); ! #endif if (corner & ROADMAP_CANVAS_RIGHT) { --- 601,607 ---- } ! roadmap_screen_text_extents ! (ROADMAP_TEXT_SIGNS, text, RoadMapDisplayFontSize, ! &width, &ascent, &descent, NULL); if (corner & ROADMAP_CANVAS_RIGHT) { *************** *** 653,665 **** frame[0].y = frame[3].y + 3; ! #ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS ! roadmap_linefont_text ! (text, ROADMAP_CANVAS_RIGHT|ROADMAP_CANVAS_TOP, ! frame, ROADMAP_DISPLAY_SIGN_SIZE, 0); ! #else ! roadmap_canvas_draw_string (frame, ! ROADMAP_CANVAS_RIGHT|ROADMAP_CANVAS_TOP, ! text); ! #endif } --- 639,645 ---- frame[0].y = frame[3].y + 3; ! roadmap_screen_text(ROADMAP_TEXT_SIGNS, frame, ! ROADMAP_CANVAS_RIGHT|ROADMAP_CANVAS_TOP, ! RoadMapDisplayFontSize, text); } *************** *** 691,694 **** --- 671,676 ---- RoadMapSign *sign; + RoadMapDisplayFontSize = + roadmap_config_get_integer (&RoadMapConfigDisplayFontSize); roadmap_display_create_pens (); *************** *** 770,772 **** --- 752,757 ---- &sign->foreground_descriptor, sign->default_foreground); } + + roadmap_config_declare + ("preferences", &RoadMapConfigDisplayFontSize, "20"); } Index: roadmap_linefont.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_linefont.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** roadmap_linefont.c 28 Sep 2006 11:03:57 -0000 1.7 --- roadmap_linefont.c 19 Nov 2006 21:24:19 -0000 1.8 *************** *** 86,90 **** #include "roadmap_linefont.h" ! #ifdef ROADMAP_USE_LINEFONT #define MAXCHARS 100 --- 86,109 ---- #include "roadmap_linefont.h" ! #ifndef ROADMAP_USE_LINEFONT ! ! void roadmap_linefont_extents ! (const char *text, int size, ! int *width, int *ascent, int *descent, int *can_tilt) { ! /* null */ ! } ! ! void roadmap_linefont_text ! ( RoadMapGuiPoint *center, int where, int size, const char *text) { ! /* null */ ! } ! ! void roadmap_linefont_text_angle ! ( RoadMapGuiPoint *start, RoadMapGuiPoint *center, ! int theta, int size, const char *text) { ! /* null */ ! } ! ! #else #define MAXCHARS 100 *************** *** 233,237 **** void roadmap_linefont_extents ! (const char *text, int size, int *width, int *ascent, int *descent) { int len, scale; --- 252,257 ---- void roadmap_linefont_extents ! (const char *text, int size, ! int *width, int *ascent, int *descent, int *can_tilt) { int len, scale; *************** *** 259,311 **** *descent = 0; /* hershey gives no info re: "baseline" */ } /* render a string to the screen ... */ ! void roadmap_linefont_text (const char *text, int where, ! RoadMapGuiPoint *center, int size, int theta) ! { RoadMapGuiPoint *p, points[MAXPOINTS]; ! int i, len, height, xp, yp, count; long scale; const char *t; unsigned int k; if (fontp == 0) { roadmap_load_hershey_font(); } /* scale factor ... */ scale = 1024 * size / (hf->maxy - hf->miny); ! /* find the length of the string in pixels ... */ ! len = 0; ! ! for (t = text; *t; t++) { ! ! k = isoconv(*t) - ' '; ! if (k < hf->nchars) { ! len += hf->hc[k].maxx - hf->hc[k].minx; ! } ! } ! ! /* alignment stuff ... */ ! ! xp = center->x + 1; ! yp = center->y; ! ! len = scale * len / 1024; ! height = scale * (hf->maxy - hf->miny) / 1024; ! ! if (where & ROADMAP_LINEFONT_RIGHT) ! xp -= len; ! else if (where & ROADMAP_LINEFONT_CENTER_X) ! xp -= len / 2; ! ! if (where & ROADMAP_LINEFONT_BOTTOM) ! yp -= height; ! else if (where & ROADMAP_LINEFONT_CENTER_Y) ! yp -= (height / 2); ! p = points; --- 279,313 ---- *descent = 0; /* hershey gives no info re: "baseline" */ + if (can_tilt) *can_tilt = 1; + } + /* render a string to the screen ... */ ! void roadmap_linefont_text_angle_worker ! ( RoadMapGuiPoint *start, RoadMapGuiPoint *center, ! int theta, int size, const char *text) { RoadMapGuiPoint *p, points[MAXPOINTS]; ! int i, xp, yp, count; long scale; const char *t; unsigned int k; + roadmap_canvas_set_thickness (2); + if (fontp == 0) { roadmap_load_hershey_font(); } + // debugging aids: + // roadmap_sprite_draw ("SmallRedDot" , start, 0); + // roadmap_sprite_draw ("PurpleCross" , center, 0); + /* scale factor ... */ scale = 1024 * size / (hf->maxy - hf->miny); ! xp = start->x; ! yp = start->y; p = points; *************** *** 348,358 **** /* advance the starting coordinate ... */ ! xp += scale * (hf->hc[k].maxx - hf->hc[k].minx) / 1024; } } /* This string is simply an in-line version of the file "romans", ! * the Roman-Simplex font distributed on Usenet with with Alan * Richardson's Xrotfont package. To inline another such font, * simply quote each line, escape all '\' characters, and join --- 350,405 ---- /* advance the starting coordinate ... */ ! xp += ((scale * (hf->hc[k].maxx - hf->hc[k].minx)) + 511) / 1024; } } + void roadmap_linefont_text_angle + ( RoadMapGuiPoint *start, RoadMapGuiPoint *center, + int theta, int size, const char *text) { + int text_width; + int text_ascent; + int text_descent; + + roadmap_linefont_extents + (text, size, &text_width, &text_ascent, &text_descent, NULL); + + start->x = center->x - text_width/2; + start->y = center->y - (text_ascent + text_descent); + + roadmap_linefont_text_angle_worker (start, center, theta, size, text); + } + + void roadmap_linefont_text + ( RoadMapGuiPoint *position, int where, int size, const char *text) { + int text_width; + int text_ascent; + int text_descent; + int text_height; + RoadMapGuiPoint start[1]; + + roadmap_linefont_extents + (text, size, &text_width, &text_ascent, &text_descent, NULL); + + text_height = text_ascent + text_descent; + + start->x = position->x + 1; + start->y = position->y; + if (where & ROADMAP_CANVAS_RIGHT) + start->x -= text_width; + else if (where & ROADMAP_CANVAS_CENTER_X) + start->x -= text_width / 2; + + if (where & ROADMAP_CANVAS_BOTTOM) + start->y -= text_height; + else if (where & ROADMAP_CANVAS_CENTER_Y) + start->y -= (text_height / 2); + + roadmap_linefont_text_angle_worker (start, position, 0, size, text); + } + + /* This string is simply an in-line version of the file "romans", ! * the Roman-Simplex font distributed on Usenet with Alan * Richardson's Xrotfont package. To inline another such font, * simply quote each line, escape all '\' characters, and join Index: roadmap_screen.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** roadmap_screen.h 15 Aug 2006 01:34:13 -0000 1.11 --- roadmap_screen.h 19 Nov 2006 21:24:19 -0000 1.12 *************** *** 81,83 **** --- 81,94 ---- int roadmap_screen_is_dragging (void); + #define ROADMAP_TEXT_SIGNS 0x01 + #define ROADMAP_TEXT_LABELS 0x02 + void roadmap_screen_text + (int id, RoadMapGuiPoint *center, int where, int size, const char *text); + void roadmap_screen_text_angle + (int id, RoadMapGuiPoint *start, RoadMapGuiPoint *center, + int theta, int size, const char *text); + void roadmap_screen_text_extents + (int id, const char *text, int size, + int *width, int *ascent, int *descent, int *can_tilt); + #endif // INCLUDE__ROADMAP_SCREEN__H Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.c,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** roadmap_screen.c 15 Nov 2006 23:42:38 -0000 1.80 --- roadmap_screen.c 19 Nov 2006 21:24:19 -0000 1.81 *************** *** 58,61 **** --- 58,62 ---- #include "roadmap_display.h" #include "roadmap_label.h" + #include "roadmap_linefont.h" #include "roadmap_plugin.h" #include "roadmap_factory.h" *************** *** 105,108 **** --- 106,112 ---- ROADMAP_CONFIG_ITEM("Map", "DynamicOrientation"); + static RoadMapConfigDescriptor RoadMapConfigLinefontSelector = + ROADMAP_CONFIG_ITEM("Map", "Use Linefont"); + static int RoadMapScreenInitialized = 0; static int RoadMapScreenFrozen = 0; *************** *** 120,123 **** --- 124,129 ---- static int RoadMapScreenHeight; + static int RoadMapLineFontSelect; + static int RoadMapScreenDeltaX; static int RoadMapScreenDeltaY; *************** *** 1057,1060 **** --- 1063,1071 ---- roadmap_trip_format_messages (); + roadmap_landmark_display (); + roadmap_features_display (); + roadmap_trip_display (); + roadmap_track_display (); + if (roadmap_config_match (&RoadMapConfigMapSigns, "yes")) { *************** *** 1064,1071 **** } - roadmap_landmark_display (); - roadmap_features_display (); - roadmap_trip_display (); - roadmap_track_display (); } --- 1075,1078 ---- *************** *** 1081,1084 **** --- 1088,1093 ---- static void roadmap_screen_configure (void) { + const char *p; + RoadMapScreenWidth = roadmap_canvas_width(); RoadMapScreenHeight = roadmap_canvas_height(); *************** *** 1093,1096 **** --- 1102,1117 ---- roadmap_screen_repaint (); } + + p = roadmap_config_get(&RoadMapConfigLinefontSelector); + if (p == NULL) { + RoadMapLineFontSelect |= ROADMAP_TEXT_LABELS; + } else { + if (strstr(p, "labels") != NULL) + RoadMapLineFontSelect |= ROADMAP_TEXT_LABELS; + if (strstr(p, "signs") != NULL) + RoadMapLineFontSelect |= ROADMAP_TEXT_SIGNS; + if (strstr(p, "all") != NULL) + RoadMapLineFontSelect |= ROADMAP_TEXT_SIGNS|ROADMAP_TEXT_LABELS; + } } *************** *** 1451,1454 **** --- 1472,1505 ---- + void roadmap_screen_text + (int id, RoadMapGuiPoint *center, int where, int size, const char *text) { + if (ROADMAP_USE_LINEFONT && (RoadMapLineFontSelect & id) != 0) { + roadmap_linefont_text ( center, where, size, text); + } else { + roadmap_canvas_draw_string ( center, where, text); + } + } + void roadmap_screen_text_angle + (int id, RoadMapGuiPoint *start, RoadMapGuiPoint *center, + int theta, int size, const char *text) { + if (ROADMAP_USE_LINEFONT && (RoadMapLineFontSelect & id) != 0) { + roadmap_linefont_text_angle ( start, center, theta, size, text); + } else { + roadmap_canvas_draw_string_angle ( start, center, theta, text); + } + } + void roadmap_screen_text_extents + (int id, const char *text, int size, + int *width, int *ascent, int *descent, int *can_tilt) { + if (ROADMAP_USE_LINEFONT && (RoadMapLineFontSelect & id) != 0) { + roadmap_linefont_extents + (text, size, width, ascent, descent, can_tilt); + } else { + roadmap_canvas_get_text_extents + (text, -1, width, ascent, descent, can_tilt); + } + } + + void roadmap_screen_initialize (void) { *************** *** 1487,1490 **** --- 1538,1544 ---- ("preferences", &RoadMapConfigMapDynamicOrientation, "on", "off", NULL); + roadmap_config_declare_enumeration + ("preferences", &RoadMapConfigLinefontSelector, "labels", "signs", "all", "off", NULL); + Index: roadmap_linefont.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_linefont.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_linefont.h 13 Aug 2006 15:24:17 -0000 1.2 --- roadmap_linefont.h 19 Nov 2006 21:24:19 -0000 1.3 *************** *** 22,35 **** */ ! #ifndef ROADMAP_NO_LINEFONT ! ! #define ROADMAP_USE_LINEFONT 1 void roadmap_linefont_extents ! (const char *text, int size, int *width, int *ascent, int *descent); void roadmap_linefont_text ! (const char *text, int allign, RoadMapGuiPoint *center, ! int size, int theta); /* reuse roadmap canvas values, so callers won't care which text functions --- 22,42 ---- */ ! #ifdef ROADMAP_NO_LINEFONT ! # undef ROADMAP_USE_LINEFONT ! # define ROADMAP_USE_LINEFONT 0 ! #else ! # define ROADMAP_USE_LINEFONT 1 ! #endif void roadmap_linefont_extents ! (const char *text, int size, ! int *width, int *ascent, int *descent, int *can_tilt); void roadmap_linefont_text ! ( RoadMapGuiPoint *center, int where, int size, const char *text); ! ! void roadmap_linefont_text_angle ! ( RoadMapGuiPoint *start, RoadMapGuiPoint *center, ! int theta, int size, const char *text); /* reuse roadmap canvas values, so callers won't care which text functions *************** *** 47,49 **** (ROADMAP_LINEFONT_CENTER_X | ROADMAP_LINEFONT_BOTTOM) - #endif --- 54,55 ---- Index: roadmap_label.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_label.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_label.h 13 Aug 2006 15:24:17 -0000 1.5 --- roadmap_label.h 19 Nov 2006 21:24:19 -0000 1.6 *************** *** 42,49 **** void roadmap_label_start (void); - void roadmap_label_text_extents(const char *text, int size, - int *width, int *ascent, int *descent, - int *can_tilt, int *easy_reading); - void roadmap_label_draw_text(const char *text, RoadMapGuiPoint *start, RoadMapGuiPoint *center, --- 42,45 ---- Index: roadmap_label.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_label.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** roadmap_label.c 13 Nov 2006 21:51:12 -0000 1.20 --- roadmap_label.c 19 Nov 2006 21:24:19 -0000 1.21 *************** *** 54,58 **** #include "roadmap_canvas.h" ! #include "roadmap_linefont.h" #include "roadmap_list.h" --- 54,58 ---- #include "roadmap_canvas.h" ! #include "roadmap_screen.h" #include "roadmap_list.h" *************** *** 71,77 **** ROADMAP_CONFIG_ITEM("Labels", "Color"); /* this is fairly arbitrary */ #define MAX_LABELS 2048 - #define ROADMAP_LABEL_STREETLABEL_SIZE 16 typedef struct { --- 71,79 ---- ROADMAP_CONFIG_ITEM("Labels", "Color"); + static RoadMapConfigDescriptor RoadMapConfigLabelSize = + ROADMAP_CONFIG_ITEM("Labels", "Font Size"); + /* this is fairly arbitrary */ #define MAX_LABELS 2048 typedef struct { *************** *** 115,118 **** --- 117,122 ---- static int RoadMapLabelMinFeatSizeSq; + static int RoadMapLabelFontSize; + static int rect_overlap (RoadMapGuiRect *a, RoadMapGuiRect *b) { *************** *** 174,179 **** ! static RoadMapGuiPoint get_metrics(roadmap_label *c, ! RoadMapGuiRect *rect, int centered_y) { RoadMapGuiPoint q; int x1=0, y1=0; --- 178,182 ---- ! static RoadMapGuiPoint get_metrics(roadmap_label *c, RoadMapGuiRect *rect) { RoadMapGuiPoint q; int x1=0, y1=0; *************** *** 189,194 **** /* position CC */ x1 = -(w/2); ! ! y1 = centered_y ? (h/2) : 0; q.x = x1 - rect->minx; --- 192,196 ---- /* position CC */ x1 = -(w/2); ! y1 = 0; q.x = x1 - rect->minx; *************** *** 231,259 **** } - void roadmap_label_text_extents(const char *text, int size, - int *width, int *ascent, int *descent, - int *can_tilt, int *easy_reading) - { - #ifdef ROADMAP_USE_LINEFONT - - roadmap_linefont_extents - (text, ROADMAP_LABEL_STREETLABEL_SIZE, width, ascent, descent); - - /* The linefont font isn't pretty. Reading it is hard with - * a road running through it, so we don't center labels on - * the road. - */ - *easy_reading = 0; - if (can_tilt) *can_tilt = 1; - - #else - - roadmap_canvas_get_text_extents - (text, -1, width, ascent, descent, can_tilt); - - *easy_reading = 1; - - #endif - } void roadmap_label_draw_text(const char *text, --- 233,236 ---- *************** *** 262,279 **** { - #ifdef ROADMAP_USE_LINEFONT - roadmap_linefont_text - (text, doing_angles ? ROADMAP_CANVAS_CENTER_BOTTOM : - ROADMAP_CANVAS_CENTER, center, size, angle); - #else if (doing_angles) { ! roadmap_canvas_draw_string_angle (start, center, angle, text); } else { ! roadmap_canvas_draw_string (center, ROADMAP_CANVAS_CENTER, text); } - #endif } ! /* called when a screen repaint is complete. keeping track of * label "generations" involves keeping track of full refreshes, * not individual calls to roadmap_label_draw_cache(). --- 239,253 ---- { if (doing_angles) { ! roadmap_screen_text_angle ! (ROADMAP_TEXT_LABELS, start, center, angle, size, text); } else { ! roadmap_screen_text ! (ROADMAP_TEXT_LABELS, center, ROADMAP_CANVAS_CENTER, size, text); } } ! ! /* called when a screen repaint commences. keeping track of * label "generations" involves keeping track of full refreshes, * not individual calls to roadmap_label_draw_cache(). *************** *** 293,296 **** --- 267,272 ---- roadmap_math_get_context (&last_center, &RoadMapLabelCurrentZoom, NULL); + RoadMapLabelFontSize = roadmap_config_get_integer (&RoadMapConfigLabelSize); + } *************** *** 366,371 **** #define OLDLIST 0 #define NEWLIST 1 - int label_center_y; int cannot_label; ROADMAP_LIST_INIT(&undrawn_labels); --- 342,347 ---- #define OLDLIST 0 #define NEWLIST 1 int cannot_label; + static int can_tilt; ROADMAP_LIST_INIT(&undrawn_labels); *************** *** 496,503 **** if (cPtr->bbox.minx > cPtr->bbox.maxx) { ! int can_tilt; ! roadmap_label_text_extents ! (cPtr->text, ROADMAP_LABEL_STREETLABEL_SIZE , ! &width, &ascent, &descent, &can_tilt, &label_center_y); angles = angles && can_tilt; --- 472,479 ---- if (cPtr->bbox.minx > cPtr->bbox.maxx) { ! roadmap_screen_text_extents ! (ROADMAP_TEXT_LABELS, cPtr->text, ! RoadMapLabelFontSize , ! &width, &ascent, &descent, &can_tilt); angles = angles && can_tilt; *************** *** 522,526 **** if (angles) { ! cPtr->text_point = get_metrics (cPtr, &r, label_center_y); } else { --- 498,502 ---- if (angles) { ! cPtr->text_point = get_metrics (cPtr, &r); } else { *************** *** 539,546 **** --- 515,533 ---- } } + angles = angles && can_tilt; #if POLY_OUTLINE { int lines = 4; + if (!angles) { + cPtr->poly[0].x = cPtr->bbox.minx; + cPtr->poly[0].y = cPtr->bbox.miny; + cPtr->poly[1].x = cPtr->bbox.minx; + cPtr->poly[1].y = cPtr->bbox.maxy; + cPtr->poly[2].x = cPtr->bbox.maxx; + cPtr->poly[2].y = cPtr->bbox.maxy; + cPtr->poly[3].x = cPtr->bbox.maxx; + cPtr->poly[3].y = cPtr->bbox.miny; + } roadmap_canvas_draw_multiple_lines(1, &lines, cPtr->poly, 1); } *************** *** 638,642 **** (cPtr->text, &cPtr->text_point, &cPtr->center_point, angles, angles ? cPtr->angle : 0, ! ROADMAP_LABEL_STREETLABEL_SIZE ); if (whichlist == NEWLIST) { --- 625,629 ---- (cPtr->text, &cPtr->text_point, &cPtr->center_point, angles, angles ? cPtr->angle : 0, ! RoadMapLabelFontSize ); if (whichlist == NEWLIST) { *************** *** 678,681 **** --- 665,671 ---- ("preferences", &RoadMapConfigLabelsColor, "#000000"); + roadmap_config_declare + ("preferences", &RoadMapConfigLabelSize, "16"); + ROADMAP_LIST_INIT(&RoadMapLabelCache); |
From: Paul F. <pg...@us...> - 2006-11-19 21:24:24
|
Update of /cvsroot/roadmap/roadmap/src/qt In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30639/src/qt Modified Files: qt_canvas.cc Log Message: clean up font handling, so that offsets and start and center positions passed around in the draw_string/_angle() api's are more uniform. adjusted the centerline calculations to be more correct (center is half of ascent plus descent). linefont is now selectable at runtime to be used for labels or signs or both. new string drawing routines in roadmap_screen.c aid this. this eliminates two sets of ifdefs. if internal linefont is in use, font size for street, landmark, and display sign labels is now run-time configurable. Index: qt_canvas.cc =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/qt/qt_canvas.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** qt_canvas.cc 3 Nov 2006 14:42:15 -0000 1.14 --- qt_canvas.cc 19 Nov 2006 21:24:19 -0000 1.15 *************** *** 150,154 **** y -= text_descent; else if (corner & ROADMAP_CANVAS_CENTER_Y) ! y += (text_ascent / 2); else /* TOP */ y += text_ascent; --- 150,154 ---- y -= text_descent; else if (corner & ROADMAP_CANVAS_CENTER_Y) ! y = y - text_descent + ((text_descent + text_ascent) / 2); else /* TOP */ y += text_ascent; *************** *** 171,178 **** QFont f("Arial Bold",12); p.setFont(f); p.translate(position->x,position->y); p.rotate((double)angle); ! p.drawText(0, 0, QString::fromUtf8(text)); #endif } --- 171,183 ---- QFont f("Arial Bold",12); + int text_width; + int text_ascent; + int text_descent; + getTextExtents(text, &text_width, &text_ascent, &text_descent, NULL); + p.setFont(f); p.translate(position->x,position->y); p.rotate((double)angle); ! p.drawText(0, -text_descent, QString::fromUtf8(text)); #endif } |
From: Paul F. <pg...@us...> - 2006-11-19 21:24:24
|
Update of /cvsroot/roadmap/roadmap In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30639 Modified Files: README Log Message: clean up font handling, so that offsets and start and center positions passed around in the draw_string/_angle() api's are more uniform. adjusted the centerline calculations to be more correct (center is half of ascent plus descent). linefont is now selectable at runtime to be used for labels or signs or both. new string drawing routines in roadmap_screen.c aid this. this eliminates two sets of ifdefs. if internal linefont is in use, font size for street, landmark, and display sign labels is now run-time configurable. Index: README =================================================================== RCS file: /cvsroot/roadmap/roadmap/README,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** README 15 Nov 2006 23:38:29 -0000 1.107 --- README 19 Nov 2006 21:24:19 -0000 1.108 *************** *** 2217,2220 **** --- 2217,2227 ---- <<Default:>> 200 + [Display.Font Size] The size of the text used for labeling. + + <<Format:>> integer (pixels) + + <<Comment:>> Currently only honored if the internal "linefont" + is being used. + [Help.Browser] The browser program used to show the help text. *************** *** 2302,2305 **** --- 2309,2324 ---- <<Default:>> normal + [Map.Use Linefont] Enables use of the internal linefont. + + <<Format:>> enumeration (off / labels / signs / all) + + <<Default:>> labels + + <<Comment:>> The internal line font (if available) may be preferable + to the system font since it can draw at angles, and since + its size can be easily scaled. It is not very pretty, + however. + + [Labels.MinFeatureSize] The shortest street which may be labeled. *************** *** 2314,2317 **** --- 2333,2343 ---- <<Default:>> Black + [Labels.Font Size] The size of the text used for labeling. + + <<Format:>> integer (pixels) + + <<Comment:>> Currently only honored if the internal "linefont" + is being used. + [Landmarks.Name] The filename used for storing personal landmarks *************** *** 2326,2329 **** --- 2352,2362 ---- <<Default:>> dark red + [Landmarks.Font Size] The size of the text used for labeling. + + <<Format:>> integer (pixels) + + <<Comment:>> Currently only honored if the internal "linefont" + is being used. + [Track.Name] The filename used for storing current "breadcrumb" track |
From: Paul F. <pg...@us...> - 2006-11-19 21:24:24
|
Update of /cvsroot/roadmap/roadmap/src/gtk In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30639/src/gtk Modified Files: roadmap_canvas.c Log Message: clean up font handling, so that offsets and start and center positions passed around in the draw_string/_angle() api's are more uniform. adjusted the centerline calculations to be more correct (center is half of ascent plus descent). linefont is now selectable at runtime to be used for labels or signs or both. new string drawing routines in roadmap_screen.c aid this. this eliminates two sets of ifdefs. if internal linefont is in use, font size for street, landmark, and display sign labels is now run-time configurable. Index: roadmap_canvas.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gtk/roadmap_canvas.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** roadmap_canvas.c 12 Aug 2006 01:48:48 -0000 1.11 --- roadmap_canvas.c 19 Nov 2006 21:24:19 -0000 1.12 *************** *** 198,229 **** void roadmap_canvas_draw_string (RoadMapGuiPoint *position, ! int corner, ! const char *text) { - int x; - int y; int text_width; int text_ascent; int text_descent; roadmap_canvas_get_text_extents (text, -1, &text_width, &text_ascent, &text_descent, NULL); ! x = position->x; ! y = position->y; if (corner & ROADMAP_CANVAS_RIGHT) ! x -= text_width; else if (corner & ROADMAP_CANVAS_CENTER_X) ! x -= text_width / 2; if (corner & ROADMAP_CANVAS_BOTTOM) ! y -= text_descent; else if (corner & ROADMAP_CANVAS_CENTER_Y) ! y += (text_ascent / 2); else /* TOP */ ! y += text_ascent; ! gdk_draw_string (RoadMapDrawingBuffer, ! RoadMapDrawingArea->style->font, RoadMapGc, x, y, text); } --- 198,226 ---- void roadmap_canvas_draw_string (RoadMapGuiPoint *position, ! int corner, const char *text) { int text_width; int text_ascent; int text_descent; + RoadMapGuiPoint start[1]; roadmap_canvas_get_text_extents (text, -1, &text_width, &text_ascent, &text_descent, NULL); ! start->x = position->x; ! start->y = position->y; if (corner & ROADMAP_CANVAS_RIGHT) ! start->x -= text_width; else if (corner & ROADMAP_CANVAS_CENTER_X) ! start->x -= text_width / 2; if (corner & ROADMAP_CANVAS_BOTTOM) ! start->y -= text_descent; else if (corner & ROADMAP_CANVAS_CENTER_Y) ! start->y = start->y - text_descent + ((text_descent + text_ascent) / 2); else /* TOP */ ! start->y += text_ascent; ! roadmap_canvas_draw_string_angle (start, position, 0, text); } *************** *** 232,237 **** int angle, const char *text) { ! /* no angle possible, currently. at least try and center the text */ ! roadmap_canvas_draw_string (center, ROADMAP_CANVAS_CENTER, text); } --- 229,236 ---- int angle, const char *text) { ! /* no angle possible */ ! gdk_draw_string (RoadMapDrawingBuffer, ! RoadMapDrawingArea->style->font, ! RoadMapGc, position->x, position->y, text); } |
From: Ehud S. <esh...@us...> - 2006-11-17 18:38:11
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/track In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17484 Modified Files: editor_track_filter.c editor_track_filter.h editor_track_main.c Log Message: Change filter settings. Index: editor_track_filter.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_filter.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** editor_track_filter.c 11 Jun 2006 11:20:46 -0000 1.6 --- editor_track_filter.c 17 Nov 2006 18:38:08 -0000 1.7 *************** *** 46,50 **** int max_distance; ! time_t max_time; int point_distance; --- 46,51 ---- int max_distance; ! time_t max_stand_time; ! time_t timeout; int point_distance; *************** *** 52,55 **** --- 53,57 ---- RoadMapGpsPosition last_gps_point; time_t last_gps_time; + time_t last_gps_move_time; int last_azymuth; *************** *** 66,70 **** GPSFilter *editor_track_filter_new (int max_distance, ! int max_time, int point_distance) { --- 68,73 ---- GPSFilter *editor_track_filter_new (int max_distance, ! int max_stand_time, ! int timeout, int point_distance) { *************** *** 72,76 **** filter->max_distance = max_distance; ! filter->max_time = max_time; filter->point_distance = point_distance; --- 75,80 ---- filter->max_distance = max_distance; ! filter->max_stand_time = max_stand_time; ! filter->timeout = timeout; filter->point_distance = point_distance; *************** *** 93,96 **** --- 97,101 ---- filter->last_azymuth = gps_position->steering; filter->last_gps_point = *gps_position; + filter->last_gps_move_time = gps_time; filter->last_gps_time = gps_time; filter->normalized_gps_point = *gps_position; *************** *** 98,101 **** --- 103,115 ---- } + if ((gps_time - filter->last_gps_time) > filter->timeout) { + editor_track_filter_reset (filter); + editor_track_filter_add (filter, gps_time, dilution, gps_position); + + return ED_TRACK_END; + } + + filter->last_gps_time = gps_time; + if (gps_position->speed == 0) return 0; *************** *** 112,118 **** (RoadMapPosition*) gps_position) >= filter->max_distance) || ! (gps_time < filter->last_gps_time) || ! ! ((gps_time - filter->last_gps_time) > filter->max_time)) { editor_track_filter_reset (filter); --- 126,131 ---- (RoadMapPosition*) gps_position) >= filter->max_distance) || ! (gps_time < filter->last_gps_move_time) || ! ((gps_time - filter->last_gps_move_time) > filter->max_stand_time)) { editor_track_filter_reset (filter); *************** *** 122,126 **** } ! filter->last_gps_time = gps_time; filter->normalized_gps_point.longitude = --- 135,139 ---- } ! filter->last_gps_move_time = gps_time; filter->normalized_gps_point.longitude = Index: editor_track_filter.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_filter.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** editor_track_filter.h 1 Dec 2005 16:48:54 -0000 1.2 --- editor_track_filter.h 17 Nov 2006 18:38:08 -0000 1.3 *************** *** 32,37 **** struct GPSFilter *editor_track_filter_new (int max_distance, ! int max_time, ! int point_distance); int editor_track_filter_add (struct GPSFilter *filter, --- 32,38 ---- struct GPSFilter *editor_track_filter_new (int max_distance, ! int max_stand_time, ! int timeout, ! int point_distance); int editor_track_filter_add (struct GPSFilter *filter, Index: editor_track_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_main.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** editor_track_main.c 3 Sep 2006 18:13:48 -0000 1.15 --- editor_track_main.c 17 Nov 2006 18:38:08 -0000 1.16 *************** *** 606,609 **** --- 606,610 ---- filter = editor_track_filter_new (roadmap_math_distance_convert ("1000m", NULL), + 600, /* 10 minutes */ 60, /* 1 minute */ roadmap_math_distance_convert ("10m", NULL)); |
From: Ehud S. <esh...@us...> - 2006-11-17 16:55:34
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8282 Modified Files: roadmap_download.c Log Message: New lines. Index: roadmap_download.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_download.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** roadmap_download.c 3 Sep 2006 18:03:58 -0000 1.11 --- roadmap_download.c 17 Nov 2006 16:55:31 -0000 1.12 *************** *** 507,513 **** } } else { ! error = 1; ! ! /* empty queue */ RoadMapDownloadQueueConsumer = RoadMapDownloadQueueProducer - 1; } --- 507,513 ---- } } else { ! error = 1; ! ! /* empty queue */ RoadMapDownloadQueueConsumer = RoadMapDownloadQueueProducer - 1; } |
From: Ehud S. <esh...@us...> - 2006-11-17 16:55:21
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8221 Modified Files: roadmap_trip.c Log Message: Show selection point on screen. Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_trip.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** roadmap_trip.c 18 Aug 2006 17:31:32 -0000 1.10 --- roadmap_trip.c 17 Nov 2006 16:55:14 -0000 1.11 *************** *** 113,117 **** ROADMAP_TRIP_ITEM("Destination", "Destination", 0, 1, 0), ROADMAP_TRIP_ITEM("Address", NULL, 0, 0, 1), ! ROADMAP_TRIP_ITEM("Selection", NULL, 0, 0, 1), ROADMAP_TRIP_ITEM("Hold", NULL, 1, 0, 0), ROADMAP_TRIP_ITEM(NULL, NULL, 0, 0, 0) --- 113,117 ---- ROADMAP_TRIP_ITEM("Destination", "Destination", 0, 1, 0), ROADMAP_TRIP_ITEM("Address", NULL, 0, 0, 1), ! ROADMAP_TRIP_ITEM("Selection", "Selection", 0, 0, 1), ROADMAP_TRIP_ITEM("Hold", NULL, 1, 0, 0), ROADMAP_TRIP_ITEM(NULL, NULL, 0, 0, 0) |
From: Ehud S. <esh...@us...> - 2006-11-17 16:54:45
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7857 Modified Files: roadmap_math.c Log Message: Show selection point on screen. Index: roadmap_math.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_math.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** roadmap_math.c 11 Aug 2006 18:14:13 -0000 1.10 --- roadmap_math.c 17 Nov 2006 16:54:42 -0000 1.11 *************** *** 817,820 **** --- 817,825 ---- int max_intersections = 0; + if (!point0 && (from_visible || to_visible)) { + /* This is only a visibility test */ + return 1; + } + if (!from_visible || !to_visible) { *************** *** 846,849 **** --- 851,856 ---- } + if (!point0) return 1; + if (max_intersections == 2) { /* Make sure we didn't swap the from/to points */ |
From: Ehud S. <esh...@us...> - 2006-11-17 16:54:33
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7821 Modified Files: roadmap_screen.c roadmap_street.c Log Message: Show selection point on screen. Index: roadmap_street.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_street.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** roadmap_street.c 17 Jul 2006 06:29:37 -0000 1.10 --- roadmap_street.c 17 Nov 2006 16:54:24 -0000 1.11 *************** *** 854,858 **** roadmap_shape_get_position (i, ¤t.to); ! if (roadmap_math_line_is_visible (¤t.from, ¤t.to)) { current.distance = --- 854,860 ---- roadmap_shape_get_position (i, ¤t.to); ! if (roadmap_math_line_is_visible (¤t.from, ¤t.to) && ! roadmap_math_get_visible_coordinates (¤t.from, ¤t.to, ! NULL, NULL)) { current.distance = *************** *** 872,876 **** roadmap_line_to (line, ¤t.to); ! if (roadmap_math_line_is_visible (¤t.to, ¤t.from)) { current.distance = --- 874,880 ---- roadmap_line_to (line, ¤t.to); ! if (roadmap_math_line_is_visible (¤t.from, ¤t.to) && ! roadmap_math_get_visible_coordinates (¤t.from, ¤t.to, ! NULL, NULL)) { current.distance = *************** *** 895,899 **** roadmap_line_to (line, &neighbour->to); ! if (roadmap_math_line_is_visible (&neighbour->from, &neighbour->to)) { neighbour->distance = --- 899,905 ---- roadmap_line_to (line, &neighbour->to); ! if (roadmap_math_line_is_visible (&neighbour->from, &neighbour->to) && ! roadmap_math_get_visible_coordinates (&neighbour->from, &neighbour->to, ! NULL, NULL)) { neighbour->distance = Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_screen.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** roadmap_screen.c 18 Aug 2006 17:32:44 -0000 1.21 --- roadmap_screen.c 17 Nov 2006 16:54:24 -0000 1.22 *************** *** 61,64 **** --- 61,65 ---- #include "roadmap_screen.h" + #include "ssd/ssd_dialog.h" static RoadMapConfigDescriptor RoadMapConfigAccuracyMouse = *************** *** 1084,1091 **** int count; int max_pen = roadmap_layer_max_pen(); int use_only_main_pen = 0; ! if (!RoadMapScreenInitialized || RoadMapScreenFrozen) return; dbg_time_start(DBG_TIME_FULL); --- 1085,1097 ---- int count; int max_pen = roadmap_layer_max_pen(); + static int nomap; int use_only_main_pen = 0; ! if (!RoadMapScreenInitialized) return; ! if (RoadMapScreenFrozen) { ! ssd_dialog_draw (); ! return; ! } dbg_time_start(DBG_TIME_FULL); *************** *** 1117,1120 **** --- 1123,1130 ---- if (count == 0) { roadmap_display_text("Info", roadmap_lang_get ("No map available")); + nomap = 1; + } else if (nomap) { + roadmap_display_hide("Info"); + nomap = 0; } *************** *** 1184,1187 **** --- 1194,1199 ---- roadmap_display_signs (); + + ssd_dialog_draw (); roadmap_canvas_refresh (); |
From: Ehud S. <esh...@us...> - 2006-11-17 16:54:04
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7442 Modified Files: roadmap_factory.c roadmap_factory.h Log Message: SSD menu. Index: roadmap_factory.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_factory.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_factory.h 9 Aug 2006 07:07:49 -0000 1.2 --- roadmap_factory.h 17 Nov 2006 16:53:58 -0000 1.3 *************** *** 68,71 **** --- 68,75 ---- const RoadMapAction *actions); + const char **roadmap_factory_user_config (const char *name, + const char *category, + const RoadMapAction *actions, + const char **icons); #endif /* INCLUDE__ROADMAP_FACTORY__H */ Index: roadmap_factory.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_factory.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_factory.c 3 Sep 2006 18:03:01 -0000 1.4 --- roadmap_factory.c 17 Nov 2006 16:53:58 -0000 1.5 *************** *** 122,126 **** static const char **roadmap_factory_load_config (const char *file_name, const RoadMapAction *actions, ! const char *path) { static const char *loaded[256]; --- 122,127 ---- static const char **roadmap_factory_load_config (const char *file_name, const RoadMapAction *actions, ! const char *path, ! const char **icons) { static const char *loaded[256]; *************** *** 152,158 **** if (*p == '|' || *p == '-') { ! loaded[count++] = RoadMapFactorySeparator; } else { const RoadMapAction *this_action; this_action = roadmap_factory_find_action (actions, p); --- 153,175 ---- if (*p == '|' || *p == '-') { ! loaded[count] = RoadMapFactorySeparator; ! if (icons) icons[count] = NULL; ! count++; } else { const RoadMapAction *this_action; + char *p2; + + p2 = strchr (p, '|'); + + if (p2) { + char *icon = p2; + for (icon = p2 + 1; isspace(*icon); ++icon); + + if (icons) icons[count] = strdup(icon); + *p2 = '\0'; + } else if (icons) { + + icons[count] = NULL; + } this_action = roadmap_factory_find_action (actions, p); *************** *** 172,179 **** } ! static const char **roadmap_factory_user_config ! (const char *name, ! const char *category, ! const RoadMapAction *actions) { const char **loaded; --- 189,196 ---- } ! const char **roadmap_factory_user_config (const char *name, ! const char *category, ! const RoadMapAction *actions, ! const char **icons) { const char **loaded; *************** *** 185,189 **** loaded = roadmap_factory_load_config ! (file_name, actions, roadmap_path_user()); if (loaded == NULL) { --- 202,206 ---- loaded = roadmap_factory_load_config ! (file_name, actions, roadmap_path_user(), icons); if (loaded == NULL) { *************** *** 195,199 **** path = roadmap_path_next("config", path)) { ! loaded = roadmap_factory_load_config (file_name, actions, path); if (loaded != NULL) break; } --- 212,216 ---- path = roadmap_path_next("config", path)) { ! loaded = roadmap_factory_load_config (file_name, actions, path, icons); if (loaded != NULL) break; } *************** *** 252,256 **** const char **usertoolbar = ! roadmap_factory_user_config (name, "toolbar", actions); if (usertoolbar == NULL) usertoolbar = toolbar; --- 269,273 ---- const char **usertoolbar = ! roadmap_factory_user_config (name, "toolbar", actions, NULL); if (usertoolbar == NULL) usertoolbar = toolbar; *************** *** 400,404 **** RoadMapMenu menu = NULL; const char **menu_items = ! roadmap_factory_user_config (name, "menu", actions); menu = roadmap_main_new_menu (); --- 417,421 ---- RoadMapMenu menu = NULL; const char **menu_items = ! roadmap_factory_user_config (name, "menu", actions, NULL); menu = roadmap_main_new_menu (); |
From: Ehud S. <esh...@us...> - 2006-11-17 16:53:43
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7428 Modified Files: buildmap_line.c Log Message: Increase long lines limit to 1000. Index: buildmap_line.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_line.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** buildmap_line.c 14 Jun 2006 12:16:05 -0000 1.4 --- buildmap_line.c 17 Nov 2006 16:53:39 -0000 1.5 *************** *** 78,82 **** static int *SortedLine2 = NULL; ! #define MAX_LONG_LINES 500 static RoadMapLongLine LongLines[MAX_LONG_LINES]; static int LongLinesCount; --- 78,82 ---- static int *SortedLine2 = NULL; ! #define MAX_LONG_LINES 1000 static RoadMapLongLine LongLines[MAX_LONG_LINES]; static int LongLinesCount; |
From: Ehud S. <esh...@us...> - 2006-11-17 16:53:20
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7385 Modified Files: roadmap_start.c roadmap_start.h Log Message: Add roadmap_start events. Index: roadmap_start.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_start.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_start.h 17 Sep 2006 18:16:09 -0000 1.5 --- roadmap_start.h 17 Nov 2006 16:53:18 -0000 1.6 *************** *** 27,30 **** --- 27,35 ---- #include "roadmap_factory.h" + #define ROADMAP_START_INIT 1 + #define ROADMAP_START_SHUTDOWN 2 + + typedef void (*RoadMapStartSubscriber) (int event); + /* The two following functions are used to freeze all RoadMap function * in cases when the context does not allow for RoadMap to function in *************** *** 49,52 **** --- 54,60 ---- void roadmap_start_set_title (const char *title); + RoadMapStartSubscriber roadmap_start_subscribe + (RoadMapStartSubscriber handler); + #endif /* INCLUDE__ROADMAP_START__H */ Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_start.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** roadmap_start.c 17 Sep 2006 18:16:09 -0000 1.30 --- roadmap_start.c 17 Nov 2006 16:53:18 -0000 1.31 *************** *** 76,79 **** --- 76,83 ---- #include "roadmap_start.h" + #ifdef SSD + #include "ssd/ssd_menu.h" + #endif + #include "navigate/navigate_main.h" #include "editor/editor_main.h" *************** *** 106,111 **** --- 110,118 ---- static RoadMapMenu LongClickMenu; + #ifndef SSD static RoadMapMenu QuickMenu; + #endif + static RoadMapStartSubscriber RoadMapStartSubscribers = NULL; static RoadMapScreenSubscriber roadmap_start_prev_after_refresh = NULL; *************** *** 317,328 **** ! static void roadmap_start_quick_menu (void) { ! ! if (QuickMenu != NULL) { ! const RoadMapGuiPoint *point = roadmap_pointer_position (); ! roadmap_main_popup_menu (QuickMenu, point->x, point->y); ! } ! } ! /* The RoadMap menu and toolbar items: ----------------------------------- */ --- 324,328 ---- ! static void roadmap_start_quick_menu (void); /* The RoadMap menu and toolbar items: ----------------------------------- */ *************** *** 808,811 **** --- 808,834 ---- + static void roadmap_start_quick_menu (void) { + + #ifdef SSD + ssd_menu_activate ("quick", RoadMapStartQuickMenu, RoadMapStartActions); + //ssd_keyboard_show (); + //ssd_test_list (); + #else + if (QuickMenu == NULL) { + + QuickMenu = roadmap_factory_menu ("quick", + RoadMapStartQuickMenu, + RoadMapStartActions); + } + + if (QuickMenu != NULL) { + const RoadMapGuiPoint *point = roadmap_pointer_position (); + roadmap_main_popup_menu (QuickMenu, point->x, point->y); + } + #endif + } + + + #ifdef UNDER_CE static void roadmap_start_init_key_cfg (void) { *************** *** 886,889 **** --- 909,913 ---- } } + #endif *************** *** 1026,1033 **** RoadMapStartToolbar); - QuickMenu = roadmap_factory_menu ("quick", - RoadMapStartQuickMenu, - RoadMapStartActions); - LongClickMenu = roadmap_factory_menu ("long_click", RoadMapStartLongClickMenu, --- 1050,1053 ---- *************** *** 1207,1210 **** --- 1227,1232 ---- roadmap_screen_subscribe_after_refresh (roadmap_start_after_refresh); + if (RoadMapStartSubscribers) RoadMapStartSubscribers (ROADMAP_START_INIT); + editor_main_initialize (); navigate_main_initialize (); *************** *** 1254,1255 **** --- 1276,1288 ---- } + + RoadMapStartSubscriber roadmap_start_subscribe + (RoadMapStartSubscriber handler) { + + RoadMapStartSubscriber previous = RoadMapStartSubscribers; + + RoadMapStartSubscribers = handler; + + return previous; + } + |
From: Ehud S. <esh...@us...> - 2006-11-17 16:51:09
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6297 Modified Files: Makefile Log Message: Add SSD. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/Makefile,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Makefile 3 Nov 2006 12:37:43 -0000 1.22 --- Makefile 17 Nov 2006 16:51:04 -0000 1.23 *************** *** 158,162 **** roadmap_factory.c \ roadmap_preferences.c \ ! roadmap_address.c \ roadmap_crossing.c \ roadmap_coord.c \ --- 158,162 ---- roadmap_factory.c \ roadmap_preferences.c \ ! roadmap_address_ssd.c \ roadmap_crossing.c \ roadmap_coord.c \ *************** *** 279,284 **** --- 279,286 ---- ssd/ssd_entry.c \ ssd/ssd_button.c \ + ssd/ssd_list.c \ ssd/ssd_keyboard.c \ ssd/ssd_menu.c \ + ssd/ssd_messagebox.c \ SSD_WIDGETS_OBJS=$(SSD_WIDGETS_SRCS:.c=.o) |
From: Ehud S. <esh...@us...> - 2006-11-17 16:50:38
|
Update of /cvsroot/roadmap/roadmap_editor/src/gtk2 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6205 Modified Files: Makefile Log Message: Add SSD. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/gtk2/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile 3 Nov 2006 12:40:32 -0000 1.10 --- Makefile 17 Nov 2006 16:50:32 -0000 1.11 *************** *** 53,57 **** CFLAGS = $(STDCFLAGS) $(GPECFLAGS) $(GUICFLAGS) -I.. -I/usr/local/include -DNDEBUG -w ! LIBS = -L/usr/local/lib $(RDMLIBS) $(GPELDFLAGS) $(GUILDFLAGS) -lm -L ../dglib -ldgl -lagg -lfreetype ifeq ($(BIDI),YES) --- 53,57 ---- CFLAGS = $(STDCFLAGS) $(GPECFLAGS) $(GUICFLAGS) -I.. -I/usr/local/include -DNDEBUG -w ! LIBS = -L/usr/local/lib $(RDMLIBS) $(GPELDFLAGS) $(GUILDFLAGS) -lm -L ../dglib -ldgl -lagg -lfreetype -lpng ifeq ($(BIDI),YES) *************** *** 71,79 **** RMLIBSRCS=roadmap_keyboard.c \ - roadmap_messagebox.c \ roadmap_dialog.c \ ! roadmap_fileselection.c ! RMLIBOBJS=$(RMLIBSRCS:.c=.o) roadmap_canvas_agg.o ../agg/roadmap_canvas.o ../agg/font_freetype/agg_font_freetype.o --- 71,79 ---- RMLIBSRCS=roadmap_keyboard.c \ roadmap_dialog.c \ ! roadmap_fileselection.c \ ! # roadmap_messagebox.c \ ! RMLIBOBJS=$(RMLIBSRCS:.c=.o) roadmap_canvas_agg.o ../agg/roadmap_canvas.o ../agg/font_freetype/agg_font_freetype.o ../roadmap_libpng.o |