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: Paul F. <pg...@us...> - 2006-11-14 13:55:18
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21173 Modified Files: roadmap_screen.c roadmap_trip.c Log Message: much cleaner way of handling waypoint moves -- simply take over the click handlers for the duration of the move. eliminates the awkward calls in the base click handlers. Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** roadmap_trip.c 13 Nov 2006 22:44:58 -0000 1.76 --- roadmap_trip.c 14 Nov 2006 13:55:11 -0000 1.77 *************** *** 44,47 **** --- 44,48 ---- #include "roadmap_sprite.h" #include "roadmap_screen.h" + #include "roadmap_pointer.h" #include "roadmap_message.h" #include "roadmap_messagebox.h" *************** *** 145,148 **** --- 146,150 ---- static void roadmap_trip_set_selected_place(void *which, waypoint *w); static void roadmap_trip_clear_selection_list(void); + static void roadmap_trip_move_last_cancel (RoadMapGuiPoint *point); /* route display altering flags */ *************** *** 2857,2860 **** --- 2859,2863 ---- roadmap_screen_redraw (); + roadmap_trip_move_last_cancel (NULL); RoadMapTripSelectedPlace = pp; } *************** *** 2890,2893 **** --- 2893,2897 ---- roadmap_list_insert(&RoadMapTripAreaPlaces, &pp->link); + roadmap_trip_move_last_cancel (NULL); RoadMapTripSelectedPlace = pp; *************** *** 2941,2984 **** } - /* intended to be called from popup menu -- uses popup location as move dest */ - void roadmap_trip_move_last_place(void) - { - waypoint *w; - roadmap_place_pointer *pp; ! if (RoadMapTripSelectedPlace == NULL) ! return; ! pp = RoadMapTripSelectedPlace; ! w = pp->wpt; ! roadmap_display_hide("Place"); ! roadmap_display_text ! ("Moving", "Moving %s%s%s%s%s (Long or Right Click to Cancel)", ! pp->list ? pp->list : "", ! pp->list ? " / " : "", ! w->shortname, ! w->description ? " - " : "", ! w->description ? w->description : ""); ! roadmap_screen_redraw (); ! RoadMapTripPlaceMoving = 1; ! } ! int roadmap_trip_move_last_place_callback ! (int action, const RoadMapGuiPoint *point) { ! int ret; ! ! if (!RoadMapTripPlaceMoving) ! return 0; ! if (action) { ! waypoint *w; ! roadmap_place_pointer *pp; ! if (RoadMapTripSelectedPlace == NULL) ! return 0; pp = RoadMapTripSelectedPlace; --- 2945,2983 ---- } ! /* When moving a place, we replace the mouse click handlers with ! * our own. A short click executes the move, the other two clicks ! * simply cancel it. ! */ ! RoadMapPointerHandler RoadMapTripOldShortClickHandler; ! RoadMapPointerHandler RoadMapTripOldLongClickHandler; ! RoadMapPointerHandler RoadMapTripOldRightClickHandler; ! static void roadmap_trip_move_last_cancel (RoadMapGuiPoint *point) { ! if (RoadMapTripOldShortClickHandler != NULL) ! roadmap_pointer_register_short_click (RoadMapTripOldShortClickHandler); ! if (RoadMapTripOldLongClickHandler != NULL) ! roadmap_pointer_register_long_click (RoadMapTripOldLongClickHandler); ! if (RoadMapTripOldRightClickHandler != NULL) ! roadmap_pointer_register_right_click (RoadMapTripOldRightClickHandler); ! RoadMapTripOldShortClickHandler = NULL; ! RoadMapTripOldLongClickHandler = NULL; ! RoadMapTripOldRightClickHandler = NULL; ! RoadMapTripPlaceMoving = 0; ! roadmap_display_hide("Moving"); ! roadmap_screen_redraw (); ! } ! static void roadmap_trip_move_last_handler (RoadMapGuiPoint *point) { ! waypoint *w; ! roadmap_place_pointer *pp; ! ! if (RoadMapTripSelectedPlace != NULL) { pp = RoadMapTripSelectedPlace; *************** *** 2992,3007 **** RoadMapTripRefresh = 1; } ! ret = 1; ! } else { ! ret = RoadMapTripPlaceMoving; } ! RoadMapTripPlaceMoving = 0; - roadmap_display_hide("Moving"); roadmap_screen_redraw (); ! return ret; } --- 2991,3035 ---- RoadMapTripRefresh = 1; } + } ! roadmap_trip_move_last_cancel (point); ! } ! ! void roadmap_trip_move_last_place(void) ! { ! waypoint *w; ! roadmap_place_pointer *pp; ! ! if (RoadMapTripPlaceMoving) { ! /* Possible if "Move" selected from a button or keyboard. */ ! roadmap_trip_move_last_cancel (NULL); ! return; } ! if (RoadMapTripSelectedPlace == NULL) ! return; ! ! pp = RoadMapTripSelectedPlace; ! w = pp->wpt; ! ! roadmap_display_hide("Place"); ! roadmap_display_text ! ("Moving", "Moving %s%s%s%s%s (Long or Right Click to Cancel)", ! pp->list ? pp->list : "", ! pp->list ? " / " : "", ! w->shortname, ! w->description ? " - " : "", ! w->description ? w->description : ""); roadmap_screen_redraw (); ! RoadMapTripPlaceMoving = 1; ! ! RoadMapTripOldShortClickHandler = ! roadmap_pointer_register_short_click (&roadmap_trip_move_last_handler); ! RoadMapTripOldLongClickHandler = ! roadmap_pointer_register_long_click (&roadmap_trip_move_last_cancel); ! RoadMapTripOldRightClickHandler = ! roadmap_pointer_register_right_click (&roadmap_trip_move_last_cancel); } Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.c,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** roadmap_screen.c 13 Nov 2006 22:22:45 -0000 1.77 --- roadmap_screen.c 14 Nov 2006 13:55:11 -0000 1.78 *************** *** 1099,1106 **** RoadMapArea area; - if (roadmap_trip_move_last_place_callback(1, point)) { - return; - } - accuracy = roadmap_config_get_integer (&RoadMapConfigAccuracyMouse); --- 1099,1102 ---- *************** *** 1126,1133 **** static void roadmap_screen_right_click (RoadMapGuiPoint *point) { - if (roadmap_trip_move_last_place_callback(0, point)) { - return; - } - roadmap_factory_popup (roadmap_config_get(&RoadMapConfigEventRightClick), point); --- 1122,1125 ---- *************** *** 1136,1143 **** static void roadmap_screen_long_click (RoadMapGuiPoint *point) { - if (roadmap_trip_move_last_place_callback(0, point)) { - return; - } - roadmap_factory_popup (roadmap_config_get(&RoadMapConfigEventLongClick), point); --- 1128,1131 ---- |
From: Paul F. <pg...@us...> - 2006-11-13 22:45:02
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23322 Modified Files: roadmap_landmark.c roadmap_landmark.h roadmap_trip.c roadmap_trip.h roadmap_start.c Log Message: instead of deleting routes and waypoints, move them to "deleted" lists. since we don't have an undo operation, being able to get back an accidentally deleted route or place is important. this also provides a roundabout way of moving a route or place from one trip to another. Index: roadmap_landmark.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_landmark.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** roadmap_landmark.c 7 Nov 2006 03:18:48 -0000 1.12 --- roadmap_landmark.c 13 Nov 2006 22:44:58 -0000 1.13 *************** *** 162,173 **** } ! void roadmap_landmark_remove(waypoint *waypointp) { waypt_del (waypointp); ! waypt_free (waypointp); roadmap_landmark_set_modified(); RoadMapLandmarkRefresh = 1; roadmap_screen_refresh (); } --- 162,175 ---- } ! waypoint *roadmap_landmark_remove(waypoint *waypointp) { waypt_del (waypointp); ! roadmap_landmark_set_modified(); RoadMapLandmarkRefresh = 1; roadmap_screen_refresh (); + return waypointp; + } Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** roadmap_trip.c 10 Nov 2006 22:46:28 -0000 1.75 --- roadmap_trip.c 13 Nov 2006 22:44:58 -0000 1.76 *************** *** 135,142 **** * the dialog box is up-to-date with the actual data structure. */ ! int RoadMapTripWaypointSelectionsNeedRefresh[3]; #define PERSONAL_WAYPOINTS (&RoadMapTripWaypointSelectionsNeedRefresh[0]) #define TRIP_WAYPOINTS (&RoadMapTripWaypointSelectionsNeedRefresh[1]) #define ROUTE_WAYPOINTS (&RoadMapTripWaypointSelectionsNeedRefresh[2]) #define WAYPOINTS_MODIFIED 1 --- 135,143 ---- * the dialog box is up-to-date with the actual data structure. */ ! int RoadMapTripWaypointSelectionsNeedRefresh[4]; #define PERSONAL_WAYPOINTS (&RoadMapTripWaypointSelectionsNeedRefresh[0]) #define TRIP_WAYPOINTS (&RoadMapTripWaypointSelectionsNeedRefresh[1]) #define ROUTE_WAYPOINTS (&RoadMapTripWaypointSelectionsNeedRefresh[2]) + #define LOST_WAYPOINTS (&RoadMapTripWaypointSelectionsNeedRefresh[3]) #define WAYPOINTS_MODIFIED 1 *************** *** 226,229 **** --- 227,233 ---- static RoadMapList RoadMapTripTrackHead; + static RoadMapList RoadMapTripLostRoutesHead; + static RoadMapList RoadMapTripLostPlacesHead; + static route_head RoadMapTripQuickRoute = { {NULL, NULL}, *************** *** 739,742 **** --- 743,749 ---- case WAYPOINT_ACTION_DELETE: + if (which == LOST_WAYPOINTS) + return; + *(int *)which = WAYPOINTS_MODIFIED; *************** *** 744,754 **** if (which == PERSONAL_WAYPOINTS) { ! roadmap_landmark_remove(waypointp); RoadMapTripRefresh = 1; ! roadmap_screen_redraw (); return; } else if (which == TRIP_WAYPOINTS) { ! waypt_del (waypointp); ! waypt_free (waypointp); } else { /* NOTE!!!! this throws off the count in rte_waypt_ct --- 751,764 ---- if (which == PERSONAL_WAYPOINTS) { ! roadmap_list_insert ! (&RoadMapTripLostPlacesHead, ! (RoadMapListItem *)roadmap_landmark_remove(waypointp)); RoadMapTripRefresh = 1; ! roadmap_screen_redraw (); return; } else if (which == TRIP_WAYPOINTS) { ! roadmap_list_insert ! (&RoadMapTripLostPlacesHead, ! roadmap_list_remove(&waypointp->Q)); } else { /* NOTE!!!! this throws off the count in rte_waypt_ct *************** *** 756,761 **** * don't use that count, ever, so that's okay. */ ! waypt_del (waypointp); ! waypt_free (waypointp); /* last waypoint */ if ( ROADMAP_LIST_EMPTY(&RoadMapCurrentRoute->waypoint_list)) { --- 766,772 ---- * don't use that count, ever, so that's okay. */ ! roadmap_list_insert ! (&RoadMapTripLostPlacesHead, ! roadmap_list_remove(&waypointp->Q)); /* last waypoint */ if ( ROADMAP_LIST_EMPTY(&RoadMapCurrentRoute->waypoint_list)) { *************** *** 918,921 **** --- 929,934 ---- } list = &RoadMapCurrentRoute->waypoint_list; + } else if (which == LOST_WAYPOINTS) { + list = &RoadMapTripLostPlacesHead; } *************** *** 969,973 **** --- 982,990 ---- empty = ROADMAP_LIST_EMPTY(&RoadMapCurrentRoute->waypoint_list); name = "Route Points"; + } else if (which == LOST_WAYPOINTS) { + empty = ROADMAP_LIST_EMPTY(roadmap_landmark_list()); + name = "Deleted Places"; } + if (empty) { return; /* Nothing to edit. */ *************** *** 977,982 **** roadmap_dialog_new_list ("Names", ".Waypoints"); ! roadmap_dialog_add_button ! ("Delete", roadmap_trip_waypoint_manage_dialog_delete); if (which == ROUTE_WAYPOINTS) { roadmap_dialog_add_button --- 994,1001 ---- roadmap_dialog_new_list ("Names", ".Waypoints"); ! if (which != LOST_WAYPOINTS) { ! roadmap_dialog_add_button ! ("Delete", roadmap_trip_waypoint_manage_dialog_delete); ! } if (which == ROUTE_WAYPOINTS) { roadmap_dialog_add_button *************** *** 1010,1016 **** --- 1029,1040 ---- } + void roadmap_trip_lost_waypoint_manage_dialog (void) { + roadmap_trip_waypoint_manage_dialog_worker (LOST_WAYPOINTS); + } + /* Route Manage dialog */ static void roadmap_trip_route_manage_dialog_populate (int count); + static void roadmap_trip_lost_route_manage_dialog_populate (int count); static void roadmap_trip_route_manage_dialog_none *************** *** 1027,1037 **** (const char *name, void *data) { ! int count; route_head *route = (route_head *) roadmap_dialog_get_data ("Names", ".Routes"); if (route != NULL) { ! route_del (route); roadmap_trip_set_modified(1); if (route == RoadMapCurrentRoute) { --- 1051,1065 ---- (const char *name, void *data) { ! int count = 0; route_head *route = (route_head *) roadmap_dialog_get_data ("Names", ".Routes"); if (route != NULL) { ! ! roadmap_list_remove( &route->Q ); ! roadmap_list_insert (&RoadMapTripLostRoutesHead, &route->Q); ! roadmap_trip_set_modified(1); + if (route == RoadMapCurrentRoute) { *************** *** 1053,1056 **** --- 1081,1112 ---- } + static void roadmap_trip_route_manage_dialog_restore + (const char *name, void *data) { + + int count = 0; + route_head *route = + (route_head *) roadmap_dialog_get_data ("Names", ".Routes"); + + if (route != NULL) { + + roadmap_list_remove( &route->Q ); + if (route->rte_is_track) { + roadmap_list_insert (&RoadMapTripTrackHead, &route->Q); + } else { + roadmap_list_insert (&RoadMapTripRouteHead, &route->Q); + } + + roadmap_trip_set_modified(1); + + count = roadmap_list_count (&RoadMapTripLostRoutesHead); + if (count > 0) { + roadmap_trip_lost_route_manage_dialog_populate (count); + } else { + roadmap_dialog_hide (name); + } + roadmap_screen_refresh (); + } + } + static void roadmap_trip_route_manage_dialog_edit ( const char *name, void *data) { *************** *** 1124,1127 **** --- 1180,1210 ---- } + static void roadmap_trip_lost_route_manage_dialog_populate (int count) { + + char **names = NULL; + route_head **routes = NULL; + RoadMapListItem *elem, *tmp; + int i; + + names = calloc (count, sizeof (*names)); + roadmap_check_allocated (names); + routes = calloc (count, sizeof (*routes)); + roadmap_check_allocated (routes); + + i = 0; + ROADMAP_LIST_FOR_EACH (&RoadMapTripLostRoutesHead, elem, tmp) { + route_head *rh = (route_head *) elem; + names[i] = (rh->rte_name && rh->rte_name[0]) ? + rh->rte_name : "Unnamed Route"; + routes[i++] = rh; + } + + roadmap_dialog_show_list + ("Names", ".Routes", count, names, (void **) routes, + roadmap_trip_route_manage_dialog_selected); + free (names); + free (routes); + } + void roadmap_trip_route_manage_dialog (void) { *************** *** 1133,1137 **** } ! if (roadmap_dialog_activate ("Manage Routes", NULL)) { roadmap_dialog_new_list ("Names", ".Routes"); --- 1216,1220 ---- } ! if (roadmap_dialog_activate ("Select Routes", NULL)) { roadmap_dialog_new_list ("Names", ".Routes"); *************** *** 1151,1158 **** --- 1234,1266 ---- count = roadmap_list_count (&RoadMapTripRouteHead) + roadmap_list_count (&RoadMapTripTrackHead); + roadmap_trip_route_manage_dialog_populate (count); } + void roadmap_trip_lost_route_manage_dialog (void) { + int count; + + if (ROADMAP_LIST_EMPTY(&RoadMapTripLostRoutesHead)) { + return; /* Nothing to manage. */ + } + + if (roadmap_dialog_activate ("Deleted Routes", NULL)) { + + roadmap_dialog_new_list ("Names", ".Routes"); + + roadmap_dialog_add_button ("Restore", + roadmap_trip_route_manage_dialog_restore); + + roadmap_dialog_add_button ("Okay", roadmap_trip_dialog_cancel); + + roadmap_dialog_complete (0); /* No need for a keyboard. */ + } + + count = roadmap_list_count (&RoadMapTripRouteHead) + + roadmap_list_count (&RoadMapTripTrackHead); + + roadmap_trip_lost_route_manage_dialog_populate (count); + } *************** *** 2945,2948 **** --- 3053,3059 ---- ROADMAP_LIST_INIT(&RoadMapTripTrackHead); + ROADMAP_LIST_INIT(&RoadMapTripLostRoutesHead); + ROADMAP_LIST_INIT(&RoadMapTripLostPlacesHead); + ROADMAP_LIST_INIT(&RoadMapTripAreaPlaces); Index: roadmap_trip.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** roadmap_trip.h 4 Nov 2006 17:30:36 -0000 1.30 --- roadmap_trip.h 13 Nov 2006 22:44:58 -0000 1.31 *************** *** 41,44 **** --- 41,45 ---- void roadmap_trip_copy_focus (const char *name); + void roadmap_trip_lost_waypoint_manage_dialog(void); void roadmap_trip_route_waypoint_manage_dialog(void); void roadmap_trip_trip_waypoint_manage_dialog(void); *************** *** 87,90 **** --- 88,92 ---- void roadmap_trip_route_manage_dialog (void); + void roadmap_trip_lost_route_manage_dialog (void); void roadmap_trip_track_to_route (void); Index: roadmap_landmark.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_landmark.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** roadmap_landmark.h 4 Nov 2006 17:23:43 -0000 1.7 --- roadmap_landmark.h 13 Nov 2006 22:44:58 -0000 1.8 *************** *** 33,37 **** int roadmap_landmark_count(); void roadmap_landmark_add(waypoint *waypointp); ! void roadmap_landmark_remove(waypoint *waypointp); RoadMapList * roadmap_landmark_list(void); int roadmap_landmark_is_refresh_needed (void); --- 33,37 ---- int roadmap_landmark_count(); void roadmap_landmark_add(waypoint *waypointp); ! waypoint *roadmap_landmark_remove(waypoint *waypointp); RoadMapList * roadmap_landmark_list(void); int roadmap_landmark_is_refresh_needed (void); Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_start.c,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -d -r1.111 -r1.112 *** roadmap_start.c 4 Nov 2006 21:59:37 -0000 1.111 --- roadmap_start.c 13 Nov 2006 22:44:58 -0000 1.112 *************** *** 112,118 **** static void roadmap_start_cancel (void) { ! /* for menus, mainly popups, where the mouse can easily cause ! * an unwanted action -- putting this at the top of the menu ! * helps prevent that */; } --- 112,118 ---- static void roadmap_start_cancel (void) { ! /* null action -- for menus, mainly popups, where the mouse ! * can easily cause an unwanted action -- putting this at the ! * top of the menu helps prevent that */ } *************** *** 482,486 **** roadmap_trip_currenttrack_to_route }, ! {"trackroute", "Convert Track to Route", "RouteToTrack", NULL, "Create a new route from the currently selected track", roadmap_trip_track_to_route }, --- 482,486 ---- roadmap_trip_currenttrack_to_route }, ! {"tracktoroute", "Convert Track to Route", "RouteToTrack", NULL, "Create a new route from the currently selected track", roadmap_trip_track_to_route }, *************** *** 520,526 **** roadmap_trip_set_as_destination}, ! {"manageroutes", "Manage Current Routes...", "Manage", NULL, "Select, rename, or delete routes", roadmap_trip_route_manage_dialog}, {"allroutetoggle", "Show/Hide Inactive Routes", "AllRoutes", NULL, "Show or Hide currently inactive routes", --- 520,529 ---- roadmap_trip_set_as_destination}, ! {"manageroutes", "Select Route...", "Select Route", NULL, "Select, rename, or delete routes", roadmap_trip_route_manage_dialog}, + {"listdeletedroutes", "Deleted Routes...", NULL, NULL, + "List and restore deleted routes", roadmap_trip_lost_route_manage_dialog}, + {"allroutetoggle", "Show/Hide Inactive Routes", "AllRoutes", NULL, "Show or Hide currently inactive routes", *************** *** 538,541 **** --- 541,547 ---- "Edit current route's waypoints", roadmap_trip_route_waypoint_manage_dialog }, + {"listdeletedplaces", "Deleted Places...", NULL, NULL, + "List deleted or moved places", roadmap_trip_lost_waypoint_manage_dialog }, + {"addroutepointnear", "Insert Route Waypoint", NULL, NULL, "Insert routepoint into nearest leg of the current route", *************** *** 684,687 **** --- 690,694 ---- "manageroutes", + "listdeletedroutes", "starttrip", "stoptrip", *************** *** 689,693 **** "reverseroute", "simplifyroute", ! "trackroute", "createroute", "setasdestination", --- 696,700 ---- "reverseroute", "simplifyroute", ! "tracktoroute", "createroute", "setasdestination", *************** *** 705,708 **** --- 712,716 ---- "edittriplandmarks", "editpersonallandmarks", + "listdeletedplaces", "mergepersonallandmarks", |
From: Paul F. <pg...@us...> - 2006-11-13 22:23:44
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15295 Modified Files: roadmap.popup Log Message: use submenu prefix (though it's not really necessary) Index: roadmap.popup =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap.popup,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap.popup 2 Nov 2006 01:48:08 -0000 1.3 --- roadmap.popup 13 Nov 2006 22:23:38 -0000 1.4 *************** *** 1,3 **** ! /Right Click Popup setasdestination addaswaypoint --- 1,3 ---- ! //Right Click Popup setasdestination addaswaypoint *************** *** 10,14 **** gps ! /Long Click Popup cancel - --- 10,14 ---- gps ! //Long Click Popup cancel - |
From: Paul F. <pg...@us...> - 2006-11-13 22:23:37
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14832 Modified Files: roadmap_factory.c roadmap_factory.h roadmap_screen.c Log Message: implement submenus by reusing the popup menu mechanism. menus defined with a prefix of "//" (rather than "/"), or which are defined in the config's roadmap.popup file, are submenus. they can be invoked from any menu by prefacing the their name with "->". so to define a new menu: //Zoom Controls zoomin zoomout and to use it: /somemenu this that ->Zoom Controls theother Index: roadmap_factory.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_factory.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** roadmap_factory.h 19 Nov 2005 21:01:33 -0000 1.10 --- roadmap_factory.h 13 Nov 2006 22:22:45 -0000 1.11 *************** *** 43,50 **** ! #define ROADMAP_MENU "/" ! #define ROADMAP_SUBMENU "//" ! #define ROADMAP_MAPPED_TO " = " extern const char RoadMapFactorySeparator[]; --- 43,52 ---- ! /* ROADMAP_MENU must be a substring of ROADMAP_SUBMENU */ ! #define ROADMAP_MENU "/" ! #define ROADMAP_SUBMENU "//" ! #define ROADMAP_INVOKE_SUBMENU "->" ! #define ROADMAP_MAPPED_TO " = " extern const char RoadMapFactorySeparator[]; *************** *** 59,63 **** const char *shortcuts[]); ! void roadmap_factory_popup (RoadMapConfigDescriptor *descriptor, const RoadMapGuiPoint *position); --- 61,65 ---- const char *shortcuts[]); ! void roadmap_factory_popup (const char *title, const RoadMapGuiPoint *position); Index: roadmap_factory.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_factory.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** roadmap_factory.c 2 Nov 2006 01:34:29 -0000 1.24 --- roadmap_factory.c 13 Nov 2006 22:22:45 -0000 1.25 *************** *** 38,41 **** --- 38,42 ---- #include "roadmap_path.h" #include "roadmap_input.h" + #include "roadmap_math.h" #include "roadmap_factory.h" *************** *** 55,58 **** --- 56,130 ---- const char RoadMapFactoryHelpTopics[] = "--help-topics--"; + typedef struct { + + RoadMapCallback action; + const char *title; + + } RoadMapFactoryMenuPopup; + + /* note relationship to number of action functions declared below */ + #define MAX_MENUPOPUPS 20 + int RoadMapFactoryMenuPopupCount; + + void roadmap_factory_menu_popup_n(int n); + + void roadmap_factory_menu_popup_00(void) { roadmap_factory_menu_popup_n(0); }; + void roadmap_factory_menu_popup_01(void) { roadmap_factory_menu_popup_n(1); }; + void roadmap_factory_menu_popup_02(void) { roadmap_factory_menu_popup_n(2); }; + void roadmap_factory_menu_popup_03(void) { roadmap_factory_menu_popup_n(3); }; + void roadmap_factory_menu_popup_04(void) { roadmap_factory_menu_popup_n(4); }; + void roadmap_factory_menu_popup_05(void) { roadmap_factory_menu_popup_n(5); }; + void roadmap_factory_menu_popup_06(void) { roadmap_factory_menu_popup_n(6); }; + void roadmap_factory_menu_popup_07(void) { roadmap_factory_menu_popup_n(7); }; + void roadmap_factory_menu_popup_08(void) { roadmap_factory_menu_popup_n(8); }; + void roadmap_factory_menu_popup_09(void) { roadmap_factory_menu_popup_n(9); }; + void roadmap_factory_menu_popup_10(void) { roadmap_factory_menu_popup_n(10); }; + void roadmap_factory_menu_popup_11(void) { roadmap_factory_menu_popup_n(11); }; + void roadmap_factory_menu_popup_12(void) { roadmap_factory_menu_popup_n(12); }; + void roadmap_factory_menu_popup_13(void) { roadmap_factory_menu_popup_n(13); }; + void roadmap_factory_menu_popup_14(void) { roadmap_factory_menu_popup_n(14); }; + void roadmap_factory_menu_popup_15(void) { roadmap_factory_menu_popup_n(15); }; + void roadmap_factory_menu_popup_16(void) { roadmap_factory_menu_popup_n(16); }; + void roadmap_factory_menu_popup_17(void) { roadmap_factory_menu_popup_n(17); }; + void roadmap_factory_menu_popup_18(void) { roadmap_factory_menu_popup_n(18); }; + void roadmap_factory_menu_popup_19(void) { roadmap_factory_menu_popup_n(19); }; + + RoadMapFactoryMenuPopup RoadMapFactoryMenuPopups[MAX_MENUPOPUPS] = { + { roadmap_factory_menu_popup_00, NULL }, + { roadmap_factory_menu_popup_01, NULL }, + { roadmap_factory_menu_popup_02, NULL }, + { roadmap_factory_menu_popup_03, NULL }, + { roadmap_factory_menu_popup_04, NULL }, + { roadmap_factory_menu_popup_05, NULL }, + { roadmap_factory_menu_popup_06, NULL }, + { roadmap_factory_menu_popup_07, NULL }, + { roadmap_factory_menu_popup_08, NULL }, + { roadmap_factory_menu_popup_09, NULL }, + { roadmap_factory_menu_popup_10, NULL }, + { roadmap_factory_menu_popup_11, NULL }, + { roadmap_factory_menu_popup_12, NULL }, + { roadmap_factory_menu_popup_13, NULL }, + { roadmap_factory_menu_popup_14, NULL }, + { roadmap_factory_menu_popup_15, NULL }, + { roadmap_factory_menu_popup_16, NULL }, + { roadmap_factory_menu_popup_17, NULL }, + { roadmap_factory_menu_popup_18, NULL }, + { roadmap_factory_menu_popup_19, NULL }, + }; + + void roadmap_factory_menu_popup_n(int n) { + + RoadMapGuiPoint point; + + /* We don't really know where the mouse is right now, so + * pretend it's in the center of the screen. The position + * will probably be unused in any case. + */ + roadmap_math_get_context (NULL, NULL, &point); + point.x /= 2; + point.y /= 2; + + roadmap_factory_popup ( RoadMapFactoryMenuPopups[n].title, &point ); + } struct RoadMapFactoryKeyMap { *************** *** 170,174 **** if ((*p == 0) || (*p == '#')) continue; /* Empty line. */ ! if (strncmp (p, ROADMAP_MENU, sizeof(ROADMAP_MENU)-1) == 0) { p = strdup(p); --- 242,248 ---- if ((*p == 0) || (*p == '#')) continue; /* Empty line. */ ! if (strncmp (p, ROADMAP_MENU, sizeof(ROADMAP_MENU)-1) == 0 || ! strncmp (p, ROADMAP_SUBMENU, sizeof(ROADMAP_SUBMENU)-1) == 0 || ! strncmp (p, ROADMAP_INVOKE_SUBMENU, sizeof(ROADMAP_INVOKE_SUBMENU)-1) == 0) { p = strdup(p); *************** *** 374,528 **** } ! void roadmap_factory (const char *name, ! RoadMapAction *actions, ! const char *menu[], ! const char *toolbar[]) { ! ! int i; ! int prefix = strlen(ROADMAP_MENU); ! int use_toolbar = ! roadmap_config_match (&RoadMapConfigGeneralToolbar, "yes"); ! int use_icons = ! roadmap_config_match (&RoadMapConfigGeneralIcons, "yes"); ! const char **userconfig; ! RoadMapMenu gui_menu = NULL; ! roadmap_config_declare_enumeration ("preferences", ! &RoadMapConfigGeneralToolbarOrientation, ! "Top", ! "Bottom", ! "Left", ! "Right", ! NULL); - roadmap_factory_user_action_labels (name, "actionlabels", actions); ! userconfig = roadmap_factory_user_config (name, "menus", actions); ! if (userconfig == NULL) userconfig = menu; ! for (i = 0; userconfig[i] != NULL; ++i) { ! const char *item = userconfig[i]; ! if (item == RoadMapFactorySeparator) { ! if (gui_menu != NULL) { ! roadmap_main_add_separator (gui_menu); } ! } else if (item == RoadMapFactoryHelpTopics) { - if (gui_menu != NULL) { - roadmap_factory_add_help (gui_menu); } ! } else if (strncmp (item, ROADMAP_MENU, prefix) == 0) { ! const char *title = item + prefix; ! gui_menu = roadmap_main_new_menu (title); ! roadmap_main_add_menu (gui_menu, title); } else { const RoadMapAction *this_action; ! this_action = roadmap_factory_find_action (actions, item); ! if (gui_menu != NULL && this_action != NULL) { roadmap_main_add_menu_item (gui_menu, ! this_action->label_long, ! this_action->tip, ! this_action->callback); } else { ! roadmap_log (ROADMAP_ERROR, "invalid action name '%s' in %s menu", ! item, userconfig ? "user" : "built-in"); } } } ! if (use_toolbar) { ! ! userconfig = ! roadmap_factory_user_config (name, "toolbar", actions); ! ! if (userconfig == NULL) userconfig = toolbar; ! roadmap_main_add_toolbar ! (roadmap_config_get (&RoadMapConfigGeneralToolbarOrientation)); ! for (i = 0; userconfig[i] != NULL; ++i) { ! const char *item = userconfig[i]; ! if (item == RoadMapFactorySeparator) { ! roadmap_main_add_tool_space (); ! } else if (strncmp (item, ROADMAP_MENU, prefix) != 0) { ! const RoadMapAction *this_action; ! this_action = roadmap_factory_find_action (actions, item); ! if (this_action != NULL) { ! roadmap_main_add_tool (roadmap_factory_terse(this_action), ! (use_icons) ? this_action->name : NULL, ! this_action->tip, ! this_action->callback); ! } else { ! roadmap_log (ROADMAP_ERROR, "invalid action name '%s' in %s toolbar", ! item, userconfig ? "user" : "built-in"); ! } } } } ! userconfig = roadmap_factory_user_config (name, "popup", actions); ! if (userconfig != NULL) { ! for (i = 0; userconfig[i] != NULL; ++i) { - const char *item = userconfig[i]; ! if (item == RoadMapFactorySeparator) { - if (gui_menu != NULL) { - roadmap_main_add_separator (gui_menu); - } ! } else if (item == RoadMapFactoryHelpTopics) { ! if (gui_menu != NULL) { ! roadmap_factory_add_help (gui_menu); ! } ! } else if (strncmp (item, ROADMAP_MENU, prefix) == 0) { - const char *title = item + prefix; ! gui_menu = roadmap_main_new_menu (title); ! roadmap_factory_add_popup (gui_menu, title); ! } else { ! const RoadMapAction *this_action; ! this_action = roadmap_factory_find_action (actions, item); ! if (gui_menu != NULL && this_action != NULL) { ! roadmap_main_add_menu_item (gui_menu, ! this_action->label_long, ! this_action->tip, ! this_action->callback); ! } else { ! roadmap_log (ROADMAP_ERROR, "invalid action name '%s' in %s popup", ! item, userconfig ? "user" : "built-in"); ! } ! } } } --- 448,632 ---- } + void roadmap_factory_config_menu + (const char **item, RoadMapAction *actions, int doing_popups) { ! RoadMapMenu gui_menu = NULL; ! int menuprefix = strlen(ROADMAP_MENU); ! int submenuprefix = strlen(ROADMAP_SUBMENU); ! int invokemenuprefix = strlen(ROADMAP_INVOKE_SUBMENU); ! const char *title; ! for (; *item != NULL; item++) { ! if (strncmp (*item, ROADMAP_MENU, menuprefix) == 0) { ! int is_popup = 0; + /* If processing a popups file, either menu prefix token + * gives a popup. In a menu file, the difference in + * tokens is significant + */ + if (strncmp (*item, ROADMAP_SUBMENU, submenuprefix) == 0) { + title = *item + submenuprefix; + is_popup = 1; + } else { + title = *item + menuprefix; + } ! gui_menu = roadmap_main_new_menu (title); + if (is_popup || doing_popups) { + roadmap_factory_add_popup (gui_menu, title); + } else { + roadmap_main_add_menu (gui_menu, title); + } ! } else if ( gui_menu == NULL ) { ! continue; ! } else if (strncmp (*item, ROADMAP_INVOKE_SUBMENU, invokemenuprefix) == 0) { ! int i; ! char tip[128]; ! title = *item + invokemenuprefix; ! /* See if we've already allocated an action routine for ! * this popup. ! */ ! for (i = 0; i < RoadMapFactoryMenuPopupCount; i++) { ! if ( strcmp (RoadMapFactoryMenuPopups[i].title, title) == 0 ) ! break; } ! if (i == MAX_MENUPOPUPS) { /* Not found, and no room for more */ ! ! roadmap_log (ROADMAP_ERROR, ! "No more room for menu '%s' (%d submenus max)", ! title, MAX_MENUPOPUPS ); ! continue; } ! if (i == RoadMapFactoryMenuPopupCount) { ! RoadMapFactoryMenuPopups ! [RoadMapFactoryMenuPopupCount++].title = strdup(title); ! } ! snprintf(tip, sizeof(tip), ! "Submenu for %s", RoadMapFactoryMenuPopups[i].title); ! roadmap_main_add_menu_item ! (gui_menu, ! RoadMapFactoryMenuPopups[i].title, ! strdup(tip), RoadMapFactoryMenuPopups[i].action); ! ! ! } else if (*item == RoadMapFactorySeparator) { ! ! roadmap_main_add_separator (gui_menu); ! ! } else if (*item == RoadMapFactoryHelpTopics) { ! ! roadmap_factory_add_help (gui_menu); } else { + const RoadMapAction *this_action; ! this_action = roadmap_factory_find_action (actions, *item); ! if (this_action != NULL) { roadmap_main_add_menu_item (gui_menu, ! this_action->label_long, ! this_action->tip, ! this_action->callback); } else { ! roadmap_log ! (ROADMAP_ERROR, "invalid action name '%s' in menu", *item); } } } + } ! void roadmap_factory_config_toolbar ! (const char **item, RoadMapAction *actions, int use_icons) { ! int prefix = strlen(ROADMAP_MENU); ! roadmap_main_add_toolbar ! (roadmap_config_get (&RoadMapConfigGeneralToolbarOrientation)); ! for (; *item != NULL; item++) { ! if (*item == RoadMapFactorySeparator) { ! roadmap_main_add_tool_space (); ! } else if (strncmp (*item, ROADMAP_MENU, prefix) != 0) { ! const RoadMapAction *this_action; ! this_action = roadmap_factory_find_action (actions, *item); ! if (this_action != NULL) { ! roadmap_main_add_tool (roadmap_factory_terse(this_action), ! (use_icons) ? this_action->name : NULL, ! this_action->tip, ! this_action->callback); ! } else { ! roadmap_log ! (ROADMAP_ERROR, "invalid action name '%s' in toolbar", *item); } } } + } ! void roadmap_factory (const char *name, ! RoadMapAction *actions, ! const char *menu[], ! const char *toolbar[]) { ! int use_toolbar; ! const char **userconfig; ! roadmap_config_declare_enumeration ("preferences", ! &RoadMapConfigGeneralToolbarOrientation, ! "Top", ! "Bottom", ! "Left", ! "Right", ! NULL); ! roadmap_factory_user_action_labels (name, "actionlabels", actions); ! userconfig = roadmap_factory_user_config (name, "menus", actions); ! if (userconfig != NULL) { ! roadmap_factory_config_menu(userconfig, actions, 0); ! } else { ! roadmap_factory_config_menu(menu, actions, 0); ! } ! userconfig = roadmap_factory_user_config (name, "popup", actions); ! if (userconfig != NULL) { ! roadmap_factory_config_menu(userconfig, actions, 1); ! } ! use_toolbar = roadmap_config_match (&RoadMapConfigGeneralToolbar, "yes"); ! if (use_toolbar) { ! int use_icons; ! use_icons = roadmap_config_match (&RoadMapConfigGeneralIcons, "yes"); ! userconfig = roadmap_factory_user_config (name, "toolbar", actions); ! if (userconfig != NULL) { ! roadmap_factory_config_toolbar(userconfig, actions, use_icons); ! } else { ! roadmap_factory_config_toolbar(toolbar, actions, use_icons); } } *************** *** 620,630 **** ! void roadmap_factory_popup (RoadMapConfigDescriptor *descriptor, const RoadMapGuiPoint *position) { struct RoadMapFactoryPopup *popup; - const char *title = roadmap_config_get (descriptor); - if (title == NULL || title[0] == 0) return; /* No menu attached. */ --- 724,732 ---- ! void roadmap_factory_popup (const char *title, const RoadMapGuiPoint *position) { struct RoadMapFactoryPopup *popup; if (title == NULL || title[0] == 0) return; /* No menu attached. */ Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.c,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** roadmap_screen.c 2 Nov 2006 01:48:08 -0000 1.76 --- roadmap_screen.c 13 Nov 2006 22:22:45 -0000 1.77 *************** *** 989,994 **** if (count == 0) { RoadMapPosition pos; ! int zoom; ! roadmap_math_get_context (&pos, &zoom); roadmap_display_text("Info", "No map available: " FLT_FMT ", " FLT_FMT, to_float(pos.longitude), to_float(pos.latitude)); --- 989,993 ---- if (count == 0) { RoadMapPosition pos; ! roadmap_math_get_context (&pos, NULL, NULL); roadmap_display_text("Info", "No map available: " FLT_FMT ", " FLT_FMT, to_float(pos.longitude), to_float(pos.latitude)); *************** *** 1131,1135 **** } ! roadmap_factory_popup (&RoadMapConfigEventRightClick, point); } --- 1130,1135 ---- } ! roadmap_factory_popup ! (roadmap_config_get(&RoadMapConfigEventRightClick), point); } *************** *** 1140,1144 **** } ! roadmap_factory_popup (&RoadMapConfigEventLongClick, point); } --- 1140,1145 ---- } ! roadmap_factory_popup ! (roadmap_config_get(&RoadMapConfigEventLongClick), point); } |
From: Paul F. <pg...@us...> - 2006-11-13 21:52:06
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1854 Modified Files: roadmap_math.c roadmap_math.h roadmap_label.c Log Message: modify roadmap_math_get_context() to optionally return physical screen size. all return values are now optional. Index: roadmap_label.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_label.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** roadmap_label.c 12 Oct 2006 13:01:49 -0000 1.19 --- roadmap_label.c 13 Nov 2006 21:51:12 -0000 1.20 *************** *** 291,295 **** } ! roadmap_math_get_context (&last_center, &RoadMapLabelCurrentZoom); } --- 291,295 ---- } ! roadmap_math_get_context (&last_center, &RoadMapLabelCurrentZoom, NULL); } Index: roadmap_math.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_math.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** roadmap_math.c 2 Nov 2006 01:39:23 -0000 1.39 --- roadmap_math.c 13 Nov 2006 21:51:12 -0000 1.40 *************** *** 1783,1790 **** ! void roadmap_math_get_context (RoadMapPosition *position, int *zoom) { ! *position = RoadMapContext.center; ! *zoom = RoadMapContext.zoom; } --- 1783,1795 ---- ! void roadmap_math_get_context ! (RoadMapPosition *position, int *zoom, RoadMapGuiPoint *lowerright) { ! if (position) *position = RoadMapContext.center; ! if (zoom) *zoom = RoadMapContext.zoom; ! if (lowerright) { ! lowerright->x = RoadMapContext.width; ! lowerright->y = RoadMapContext.height; ! } } Index: roadmap_math.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_math.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** roadmap_math.h 2 Nov 2006 01:39:23 -0000 1.30 --- roadmap_math.h 13 Nov 2006 21:51:12 -0000 1.31 *************** *** 146,150 **** void roadmap_math_set_context (RoadMapPosition *position, int zoom); ! void roadmap_math_get_context (RoadMapPosition *position, int *zoom); #endif // INCLUDED__ROADMAP_MATH__H --- 146,151 ---- void roadmap_math_set_context (RoadMapPosition *position, int zoom); ! void roadmap_math_get_context ! (RoadMapPosition *position, int *zoom, RoadMapGuiPoint *lowerright); #endif // INCLUDED__ROADMAP_MATH__H |
From: Paul F. <pg...@us...> - 2006-11-11 18:35:33
|
Update of /cvsroot/roadmap/roadmap In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10938 Modified Files: README Log Message: updates for long-clicks and popups Index: README =================================================================== RCS file: /cvsroot/roadmap/roadmap/README,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** README 2 Nov 2006 01:53:12 -0000 1.104 --- README 11 Nov 2006 18:35:30 -0000 1.105 *************** *** 964,973 **** This is because RoadMap is designed for a PDA, where pens are used. ! A short mouse click or pen tap on the map screen displays the name of the ! closest street (with the selected street block's range of address), road ! or freeway (if any). This display is shown for a limited amount of time ! (see preference "Highlight.Duration"). ! A long mouse click or pen tap is reserved for future use (popup menu). Dragging the mouse with the button down, or dragging the pen on the --- 964,977 ---- This is because RoadMap is designed for a PDA, where pens are used. ! A short mouse click (or pen tap) on the map screen displays information ! (i.e., name, address range, etc, as appropriate) about the closest ! waypoint, landmark, street, road or freeway. This display is shown for a ! limited amount of time (see preference "Highlight.Duration"). Whether or ! not one of those map features is near enough to be selected, the ! clicked/tapped point will be remembered as the current "Selection", for ! the purposes of adding new waypoints or landmarks. ! A long mouse click or pen tap (with no accompanying motion) will bring up ! a popup menu (see preference item "Events.Long Click"). Dragging the mouse with the button down, or dragging the pen on the *************** *** 1101,1109 **** the options help information when the --help option is used. ! Note for Familiar 0.7.1 GPE users: the GPE environment has defined the ! buttons bindings In a way that makes it impossible for RoadMap to use ! them (the button are mapped to the GPE applications). In this environment ! it is recommended to enable the toolbar to replace the buttons. the joypad ! is still available. --- 1105,1113 ---- the options help information when the --help option is used. ! Note for Familiar 0.7.1 GPE users: the GPE environment has defined the ! button bindings in a way that makes it impossible for RoadMap to use them ! (the buttons are mapped to the GPE applications). In this environment it ! is recommended that the toolbar be enabled to replace the buttons. The ! joypad is still available. *************** *** 1375,1379 **** The last trip created or loaded will be reloaded the next time RoadMap ! starts. A trip is a (usually small, but unlimited) collection of landmarks, --- 1379,1384 ---- The last trip created or loaded will be reloaded the next time RoadMap ! starts. If the name of the trip has been specifically set by the user, it ! will appear in the titlebar of the RoadMap window. A trip is a (usually small, but unlimited) collection of landmarks, *************** *** 1453,1457 **** later and use the "Route Waypoints..." menu item to go back to the list, and select the ones you wish to rename or to which you wish to ! add comments. Waypoint deletion is done here as well. Your route doesn't yet have a name. That's fine -- routes and --- 1458,1471 ---- later and use the "Route Waypoints..." menu item to go back to the list, and select the ones you wish to rename or to which you wish to ! add comments. Waypoint deletion can be done here as well. ! ! It is also possible to delete, edit, or move waypoints and landmarks ! by directly selecting them with the mouse. Use a short click to ! select the place of interest -- its identifying information will be ! shown along the bottom of the screen. Then use the appropriate ! menu command to delete, edit, or move the selection. These commands ! are most readily accessed via the "long click" menu. If doing a ! move, you'll select the place, then choose the "Move place" command, ! then click or tap at the new desired location. Your route doesn't yet have a name. That's fine -- routes and *************** *** 1466,1469 **** --- 1480,1484 ---- This will not confuse RoadMap, though it may confuse the user. + ** Converting a track to a route: |
From: Paul F. <pg...@us...> - 2006-11-10 22:47:17
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2846 Modified Files: roadmap_trip.c Log Message: don't call roadmap_screen_refresh() on simple edits -- it often forces a refocus which disturbs context. simply redraw in those cases. Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** roadmap_trip.c 8 Nov 2006 02:13:47 -0000 1.74 --- roadmap_trip.c 10 Nov 2006 22:46:28 -0000 1.75 *************** *** 746,750 **** roadmap_landmark_remove(waypointp); RoadMapTripRefresh = 1; ! roadmap_screen_refresh (); return; } else if (which == TRIP_WAYPOINTS) { --- 746,750 ---- roadmap_landmark_remove(waypointp); RoadMapTripRefresh = 1; ! roadmap_screen_redraw (); return; } else if (which == TRIP_WAYPOINTS) { *************** *** 765,769 **** roadmap_trip_set_modified(1); RoadMapTripRefresh = 1; ! roadmap_screen_refresh (); return; } --- 765,769 ---- roadmap_trip_set_modified(1); RoadMapTripRefresh = 1; ! roadmap_screen_redraw (); return; } *************** *** 788,792 **** roadmap_trip_set_modified(1); ! roadmap_screen_refresh (); } --- 788,792 ---- roadmap_trip_set_modified(1); ! roadmap_screen_redraw (); } *************** *** 1460,1464 **** roadmap_trip_set_modified(1); ! roadmap_screen_refresh (); } --- 1460,1464 ---- roadmap_trip_set_modified(1); ! roadmap_screen_redraw (); } *************** *** 2885,2890 **** } - roadmap_screen_refresh (); - ret = 1; } else { --- 2885,2888 ---- |
From: Paul F. <pg...@us...> - 2006-11-08 02:22:09
|
Update of /cvsroot/roadmap/roadmap/src/qt In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32070/qt Modified Files: qt_dialog.cc Log Message: whitespace/formatting only Index: qt_dialog.cc =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/qt/qt_dialog.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** qt_dialog.cc 4 Nov 2006 17:22:46 -0000 1.8 --- qt_dialog.cc 8 Nov 2006 02:22:05 -0000 1.9 *************** *** 293,305 **** break; ! case ListEntry: { ! QListBox* lb = new QListBox(parent, name); ! widget = lb; ! // ugly hack ... ! lb->setMinimumHeight(200); ! lb->setMinimumWidth(150); ! connect(widget, SIGNAL(highlighted(int)), this, SLOT(run())); } break; --- 293,306 ---- break; ! case ListEntry: ! { ! QListBox* lb = new QListBox(parent, name); ! widget = lb; ! // ugly hack ... ! lb->setMinimumHeight(200); ! lb->setMinimumWidth(150); ! connect(widget, SIGNAL(highlighted(int)), this, SLOT(run())); } break; *************** *** 330,337 **** switch (type) { ! case TextEntry: { ! QString s = ((QLineEdit*) widget)->text(); ! const char* ss = s.latin1(); ! ret = (void *) ss; } break; --- 331,339 ---- switch (type) { ! case TextEntry: ! { ! QString s = ((QLineEdit*) widget)->text(); ! const char* ss = s.latin1(); ! ret = (void *) ss; } break; |
From: Paul F. <pg...@us...> - 2006-11-08 02:13:51
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28586 Modified Files: roadmap_trip.c Log Message: don't actually try and select if we've done a preventive repopulate when the user clicks in a stale list. (QT catches this.) Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** roadmap_trip.c 7 Nov 2006 03:18:48 -0000 1.73 --- roadmap_trip.c 8 Nov 2006 02:13:47 -0000 1.74 *************** *** 877,881 **** --- 877,883 ---- if (*(int *)which == WAYPOINTS_MODIFIED) { + roadmap_messagebox ("Note", "Trip modified -- repopulating list"); + if (roadmap_trip_waypoint_manage_dialog_populate (which) == 0) { roadmap_dialog_hide(name); *************** *** 883,895 **** } ! } ! waypointp = (waypoint *) roadmap_dialog_get_data ( ! "Names", ".Waypoints"); ! if (waypointp != NULL) { ! roadmap_trip_set_selected_place(which, waypointp); ! roadmap_trip_set_focus_waypoint (waypointp); ! roadmap_screen_refresh (); } } --- 885,898 ---- } ! } else { ! waypointp = (waypoint *) roadmap_dialog_get_data ( ! "Names", ".Waypoints"); ! if (waypointp != NULL) { ! roadmap_trip_set_selected_place(which, waypointp); ! roadmap_trip_set_focus_waypoint (waypointp); ! roadmap_screen_refresh (); ! } } } |
From: Paul F. <pg...@us...> - 2006-11-07 23:42:16
|
Update of /cvsroot/roadmap/roadmap/src/gtk In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv436/gtk Modified Files: roadmap_dialog.c roadmap_messagebox.c Log Message: make gtk and gtk2 dialogs modeless, by removing the gtk_grab_add() and gtk_grab_remove() pairs. (these pairs were mismatched in any case, such that the gtk_grab_add() was only called on first creation. this meant the dialogs were all initially modal, but modeless on subsequent invocations.) make roadmap_message_wait() work in gtk by eliminating gtk_grab_add() and gtk_grab_remove() calls, and rely solely on gtk_window_set_modal(). this works on gtk2 as well, so simplify the gtk2 code to match the gtk code. Index: roadmap_dialog.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gtk/roadmap_dialog.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** roadmap_dialog.c 4 Nov 2006 17:22:45 -0000 1.12 --- roadmap_dialog.c 7 Nov 2006 23:42:13 -0000 1.13 *************** *** 160,164 **** if (dialog->w != NULL) { - gtk_grab_remove (dialog->w); gtk_widget_hide (dialog->w); } --- 160,163 ---- *************** *** 613,617 **** dialog); - gtk_grab_add (dialog->w); gtk_widget_show_all (GTK_WIDGET(dialog->w)); } --- 612,615 ---- Index: roadmap_messagebox.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gtk/roadmap_messagebox.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_messagebox.c 2 Dec 2005 22:49:59 -0000 1.4 --- roadmap_messagebox.c 7 Nov 2006 23:42:13 -0000 1.5 *************** *** 38,42 **** GtkWidget *dialog = (GtkWidget *) data; - gtk_grab_remove (dialog); gtk_widget_destroy (dialog); --- 38,41 ---- *************** *** 44,48 **** } ! void roadmap_messagebox (const char *title, const char *text) { GtkWidget *ok; --- 43,48 ---- } ! static void roadmap_messagebox_show (const char *title, ! const char *text, int modal) { GtkWidget *ok; *************** *** 60,63 **** --- 60,65 ---- gtk_window_set_title (GTK_WINDOW(dialog), roadmap_start_get_title(title)); + gtk_window_set_modal (GTK_WINDOW(dialog), modal); + gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox), label, TRUE, TRUE, 0); *************** *** 76,81 **** gtk_widget_grab_default (ok); - gtk_grab_add (dialog); - gtk_widget_show_all (GTK_WIDGET(dialog)); } --- 78,81 ---- *************** *** 84,92 **** void roadmap_messagebox_wait (const char *title, const char *text) { ! /* gtk_window_set_modal does not seem to do the trick (i.e. ! * halt the application on its course), so we default to ! * the normal message box. ! */ ! roadmap_messagebox (title, text); } --- 84,93 ---- void roadmap_messagebox_wait (const char *title, const char *text) { ! roadmap_messagebox_show (title, text, 1); ! } ! ! void roadmap_messagebox (const char *title, const char *text) { ! ! roadmap_messagebox_show (title, text, 0); } |
From: Paul F. <pg...@us...> - 2006-11-07 23:42:16
|
Update of /cvsroot/roadmap/roadmap/src/gtk2 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv436/gtk2 Modified Files: roadmap_dialog.c roadmap_messagebox.c Log Message: make gtk and gtk2 dialogs modeless, by removing the gtk_grab_add() and gtk_grab_remove() pairs. (these pairs were mismatched in any case, such that the gtk_grab_add() was only called on first creation. this meant the dialogs were all initially modal, but modeless on subsequent invocations.) make roadmap_message_wait() work in gtk by eliminating gtk_grab_add() and gtk_grab_remove() calls, and rely solely on gtk_window_set_modal(). this works on gtk2 as well, so simplify the gtk2 code to match the gtk code. Index: roadmap_dialog.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gtk2/roadmap_dialog.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** roadmap_dialog.c 4 Nov 2006 17:22:45 -0000 1.17 --- roadmap_dialog.c 7 Nov 2006 23:42:13 -0000 1.18 *************** *** 169,173 **** if (dialog->w != NULL) { - gtk_grab_remove (dialog->w); gtk_widget_hide (dialog->w); } --- 169,172 ---- *************** *** 693,698 **** dialog); - gtk_grab_add (dialog->w); - roadmap_main_set_window_size (dialog->w, roadmap_option_width(dialog->name), --- 692,695 ---- Index: roadmap_messagebox.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gtk2/roadmap_messagebox.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** roadmap_messagebox.c 2 Dec 2005 22:50:49 -0000 1.7 --- roadmap_messagebox.c 7 Nov 2006 23:42:13 -0000 1.8 *************** *** 42,46 **** GtkWidget *dialog = (GtkWidget *) data; - gtk_grab_remove (dialog); gtk_widget_destroy (dialog); --- 42,45 ---- *************** *** 48,60 **** } - static gint roadmap_messagebox_ok_modal (GtkWidget *w, gpointer data) { - - GtkWidget *dialog = (GtkWidget *) data; - - gtk_dialog_response (GTK_DIALOG(dialog), 1); - - return FALSE; - } - static void roadmap_messagebox_show (const char *title, const char *text, int modal) { --- 47,50 ---- *************** *** 79,82 **** --- 69,74 ---- gtk_window_set_title (GTK_WINDOW(dialog), roadmap_start_get_title(title)); + gtk_window_set_modal (GTK_WINDOW(dialog), modal); + gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox), label, TRUE, TRUE, 0); *************** *** 88,108 **** (GTK_CONTAINER(GTK_BOX(GTK_DIALOG(dialog)->vbox)), 4); ! g_signal_connect (ok, "clicked", ! modal ? (GCallback) roadmap_messagebox_ok_modal : ! (GCallback) roadmap_messagebox_ok, dialog); gtk_widget_grab_default (ok); - gtk_grab_add (dialog); - gtk_widget_show_all (GTK_WIDGET(dialog)); - - if (modal) { - gtk_dialog_run (GTK_DIALOG(dialog)); - - gtk_grab_remove (dialog); - gtk_widget_destroy (dialog); - } } --- 80,91 ---- (GTK_CONTAINER(GTK_BOX(GTK_DIALOG(dialog)->vbox)), 4); ! g_signal_connect (GTK_OBJECT(ok), ! "clicked", ! GTK_SIGNAL_FUNC(roadmap_messagebox_ok), dialog); gtk_widget_grab_default (ok); gtk_widget_show_all (GTK_WIDGET(dialog)); } |
From: Paul F. <pg...@us...> - 2006-11-07 14:00:19
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1302 Modified Files: roadmap_file.h Log Message: prevent c++ keyword conflict Index: roadmap_file.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_file.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** roadmap_file.h 7 Nov 2006 03:16:45 -0000 1.15 --- roadmap_file.h 7 Nov 2006 14:00:08 -0000 1.16 *************** *** 71,75 **** int roadmap_file_exists (const char *path, const char *name); int roadmap_file_length (const char *path, const char *name); ! int roadmap_file_rename (const char *path, const char *name, const char *new); void roadmap_file_backup (const char *path, const char *name); --- 71,75 ---- int roadmap_file_exists (const char *path, const char *name); int roadmap_file_length (const char *path, const char *name); ! int roadmap_file_rename (const char *path, const char *name, const char *newname); void roadmap_file_backup (const char *path, const char *name); |
From: Paul F. <pg...@us...> - 2006-11-07 03:18:52
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9025 Modified Files: roadmap_track.c roadmap_trip.c roadmap_landmark.c roadmap_gpx.c roadmap_gpx.h Log Message: add optional backing up of landmark and trip files, when saving changes Index: roadmap_landmark.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_landmark.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** roadmap_landmark.c 4 Nov 2006 17:23:43 -0000 1.11 --- roadmap_landmark.c 7 Nov 2006 03:18:48 -0000 1.12 *************** *** 40,43 **** --- 40,46 ---- RoadMapPen RoadMapLandmarksPen; + /* create backup files when writing? */ + extern int RoadMapTripMakeBackups; + static RoadMapConfigDescriptor RoadMapConfigLandmarkName = ROADMAP_CONFIG_ITEM ("Landmarks", "Name"); *************** *** 46,49 **** --- 49,55 ---- ROADMAP_CONFIG_ITEM("Landmarks", "Color"); + /* in roadmap_trip.c */ + extern RoadMapConfigDescriptor RoadMapConfigBackupFiles; + void roadmap_landmark_set_modified(void) { *************** *** 203,208 **** name = roadmap_landmark_filename (&defaulted); ! ret = roadmap_gpx_write_waypoints(roadmap_path_user(), name, ! &RoadMapLandmarkHead); if (ret == 0) return; --- 209,216 ---- name = roadmap_landmark_filename (&defaulted); ! ret = roadmap_gpx_write_waypoints ! (roadmap_config_match (&RoadMapConfigBackupFiles, "yes"), ! roadmap_path_user(), name, ! &RoadMapLandmarkHead); if (ret == 0) return; Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** roadmap_trip.c 4 Nov 2006 17:30:36 -0000 1.72 --- roadmap_trip.c 7 Nov 2006 03:18:48 -0000 1.73 *************** *** 80,83 **** --- 80,86 ---- ROADMAP_CONFIG_ITEM("Trip", "Waypoint Radius"); + RoadMapConfigDescriptor RoadMapConfigBackupFiles = + ROADMAP_CONFIG_ITEM("Files", "Make Backups"); + /* * try and put the trip name in the window title *************** *** 95,99 **** /* route following flags */ ! route_head *RoadMapCurrentRoute = NULL; static int RoadMapRouteInProgress = 0; static int RoadMapRouteIsReversed = 0; --- 98,102 ---- /* route following flags */ ! static route_head *RoadMapCurrentRoute = NULL; static int RoadMapRouteInProgress = 0; static int RoadMapRouteIsReversed = 0; *************** *** 117,127 **** } roadmap_place_pointer; ! RoadMapList RoadMapTripAreaPlaces; /* places near the mouse-click */ ! roadmap_place_pointer *RoadMapTripSelectedPlace; ! const char *RoadMapAreaCurListName; ! void *RoadMapAreaCurListType; ! int RoadMapTripPlaceMoving; /* We use common code to manage the various waypoint lists, even --- 120,130 ---- } roadmap_place_pointer; ! static RoadMapList RoadMapTripAreaPlaces; /* places near the mouse-click */ ! static roadmap_place_pointer *RoadMapTripSelectedPlace; ! static const char *RoadMapAreaCurListName; ! static void *RoadMapAreaCurListType; ! static int RoadMapTripPlaceMoving; /* We use common code to manage the various waypoint lists, even *************** *** 2329,2334 **** } ! if (roadmap_gpx_write_file (path, name, &RoadMapTripWaypointHead, ! &RoadMapTripRouteHead, &RoadMapTripTrackHead)) { roadmap_trip_set_modified(0); return 1; --- 2332,2341 ---- } ! if (roadmap_gpx_write_file ! (roadmap_config_match (&RoadMapConfigBackupFiles, "yes"), ! path, name, ! &RoadMapTripWaypointHead, ! &RoadMapTripRouteHead, ! &RoadMapTripTrackHead)) { roadmap_trip_set_modified(0); return 1; *************** *** 2902,2906 **** if ( RoadMapCurrentRoute == NULL || ! roadmap_list_count(&RoadMapCurrentRoute->rte_waypoint_list) != 2) { return; } --- 2909,2913 ---- if ( RoadMapCurrentRoute == NULL || ! roadmap_list_count(&RoadMapCurrentRoute->waypoint_list) != 2) { return; } *************** *** 2973,2978 **** ("preferences", &RoadMapConfigTripRouteLineColor, "red"); ! RoadMapTripShowInactiveRoutes = ! roadmap_config_match (&RoadMapConfigTripShowInactiveRoutes, "yes"); } --- 2980,2991 ---- ("preferences", &RoadMapConfigTripRouteLineColor, "red"); ! roadmap_config_declare_enumeration ! ("preferences", &RoadMapConfigBackupFiles , "yes", "no", NULL); ! ! ! RoadMapTripShowInactiveRoutes = roadmap_config_match ! (&RoadMapConfigTripShowInactiveRoutes, "yes"); ! ! } Index: roadmap_track.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_track.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** roadmap_track.c 25 Oct 2006 23:49:29 -0000 1.13 --- roadmap_track.c 7 Nov 2006 03:18:48 -0000 1.14 *************** *** 369,373 **** "-%Y-%m-%d-%H-%M-%S.gpx", localtime(&now)); ! return roadmap_gpx_write_track(path, name, track); } --- 369,373 ---- "-%Y-%m-%d-%H-%M-%S.gpx", localtime(&now)); ! return roadmap_gpx_write_track(0, path, name, track); } *************** *** 419,429 **** } ! ret = roadmap_gpx_write_track(path, name, RoadMapTrack); if (ret == 0) return; /* we don't need the "recent points" cache anymore */ if (RoadMapTrackRecentCSV) { ! fclose(RoadMapTrackRecentCSV); ! RoadMapTrackRecentCSV = NULL; } roadmap_file_remove (path, RECENT_CSV); --- 419,429 ---- } ! ret = roadmap_gpx_write_track(0, path, name, RoadMapTrack); if (ret == 0) return; /* we don't need the "recent points" cache anymore */ if (RoadMapTrackRecentCSV) { ! fclose(RoadMapTrackRecentCSV); ! RoadMapTrackRecentCSV = NULL; } roadmap_file_remove (path, RECENT_CSV); Index: roadmap_gpx.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_gpx.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_gpx.h 4 Oct 2006 20:25:03 -0000 1.4 --- roadmap_gpx.h 7 Nov 2006 03:18:48 -0000 1.5 *************** *** 38,47 **** ( const char *path, const char *name, route_head **route); int roadmap_gpx_write_file ! (const char *path, const char *name, RoadMapList *w, RoadMapList *r, RoadMapList *t); int roadmap_gpx_write_waypoints ! (const char *path, const char *name, RoadMapList *waypoints); int roadmap_gpx_write_track ! (const char *path, const char *name, route_head *track); int roadmap_gpx_write_route ! (const char *path, const char *name, route_head *route); --- 38,47 ---- ( const char *path, const char *name, route_head **route); int roadmap_gpx_write_file ! (int backup, const char *path, const char *name, RoadMapList *w, RoadMapList *r, RoadMapList *t); int roadmap_gpx_write_waypoints ! (int backup, const char *path, const char *name, RoadMapList *waypoints); int roadmap_gpx_write_track ! (int backup, const char *path, const char *name, route_head *track); int roadmap_gpx_write_route ! (int backup, const char *path, const char *name, route_head *route); Index: roadmap_gpx.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_gpx.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** roadmap_gpx.c 27 Oct 2006 02:03:30 -0000 1.7 --- roadmap_gpx.c 7 Nov 2006 03:18:48 -0000 1.8 *************** *** 155,159 **** int ! roadmap_gpx_write_file(const char *path, const char *name, queue_head *w, queue_head *r, queue_head *t) { --- 155,159 ---- int ! roadmap_gpx_write_file(int backup, const char *path, const char *name, queue_head *w, queue_head *r, queue_head *t) { *************** *** 161,164 **** --- 161,166 ---- int ret; + if (backup) roadmap_file_backup(path, name); + fp = roadmap_file_fopen (path, name, "w"); if (!fp) return 0; *************** *** 170,174 **** if (!ret) ! roadmap_log (ROADMAP_ERROR, "GPX file save of %s / %s failed", path, name); return ret; --- 172,176 ---- if (!ret) ! roadmap_log (ROADMAP_ERROR, "GPX file save of %s / %s failed", path, name); return ret; *************** *** 176,180 **** /* write a file of waypoints. weepoints cannot be written */ ! int roadmap_gpx_write_waypoints(const char *path, const char *name, queue_head *waypoints) { --- 178,182 ---- /* write a file of waypoints. weepoints cannot be written */ ! int roadmap_gpx_write_waypoints(int backup, const char *path, const char *name, queue_head *waypoints) { *************** *** 182,185 **** --- 184,189 ---- int ret; + if (backup) roadmap_file_backup(path, name); + fp = roadmap_file_fopen (path, name, "w"); if (!fp) return 0; *************** *** 193,197 **** } ! int roadmap_gpx_write_route(const char *path, const char *name, route_head *route) { --- 197,201 ---- } ! int roadmap_gpx_write_route(int backup, const char *path, const char *name, route_head *route) { *************** *** 203,206 **** --- 207,212 ---- ENQUEUE_TAIL(&route_head, &route->Q); + if (backup) roadmap_file_backup(path, name); + fp = roadmap_file_fopen (path, name, "w"); if (!fp) return 0; *************** *** 208,212 **** ret = gpx_write(fp, NULL, &route_head, NULL); if (ferror(fp)) ! ret = 0; if (fclose(fp) != 0) --- 214,218 ---- ret = gpx_write(fp, NULL, &route_head, NULL); if (ferror(fp)) ! ret = 0; if (fclose(fp) != 0) *************** *** 216,220 **** } ! int roadmap_gpx_write_track(const char *path, const char *name, route_head *track) { --- 222,226 ---- } ! int roadmap_gpx_write_track(int backup, const char *path, const char *name, route_head *track) { *************** *** 226,229 **** --- 232,237 ---- ENQUEUE_TAIL(&track_head, &track->Q); + if (backup) roadmap_file_backup(path, name); + fp = roadmap_file_fopen (path, name, "w"); if (!fp) return 0; *************** *** 285,289 **** int ! roadmap_gpx_write_file(const char *path, const char *name, queue *w, queue *r, queue *t) { --- 293,297 ---- int ! roadmap_gpx_write_file(int backup, const char *path, const char *name, queue *w, queue *r, queue *t) { *************** *** 292,296 **** } ! int roadmap_gpx_write_waypoints(const char *path, const char *name, queue *waypoints) { --- 300,304 ---- } ! int roadmap_gpx_write_waypoints(int backup, const char *path, const char *name, queue *waypoints) { *************** *** 299,303 **** } ! int roadmap_gpx_write_route(const char *path, const char *name, route_head *route) { --- 307,311 ---- } ! int roadmap_gpx_write_route(int backup, const char *path, const char *name, route_head *route) { *************** *** 306,310 **** } ! int roadmap_gpx_write_track(const char *path, const char *name, route_head *track) { --- 314,318 ---- } ! int roadmap_gpx_write_track(int backup, const char *path, const char *name, route_head *track) { |
From: Paul F. <pg...@us...> - 2006-11-07 03:17:34
|
Update of /cvsroot/roadmap/roadmap/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8192/win32 Modified Files: roadmap_file.c Log Message: add ability to rename and make backups of files Index: roadmap_file.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/win32/roadmap_file.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap_file.c 2 Jan 2006 09:00:31 -0000 1.3 --- roadmap_file.c 7 Nov 2006 03:16:45 -0000 1.4 *************** *** 196,199 **** --- 196,246 ---- } + int roadmap_file_rename (const char *path, const char *name, const char *new) { + + const char *full_name, *full_new; + int r = 1; + + full_name = roadmap_path_join (path, name); + full_new = roadmap_path_join (path, new); + + #if NEEDED /* perhaps under win95, others? */ + unlink(full_new); + #endif + if (rename(full_name, full_new)) r = 0; + + roadmap_path_free (full_name); + roadmap_path_free (full_new); + + } + + /* + * Make backup file: If suffix is 3 or fewer chars, replace it + * with ".bak", else append ".bak" + */ + void roadmap_file_backup(const char *path, const char *name) { + + int len; + char *newname; + char *suffix; + + len = strlen(name); + newname = malloc(len + 5); /* '.bak' + '\0' */ + + roadmap_check_allocated(newname); + + strcpy(newname, name); + + suffix = strrchr(newname, '.'); + if (suffix != NULL && strlen(suffix) <= 4) { /* short suffix --> ".bak" */ + strcpy(suffix, ".bak"); + } else { + strcat(newname, ".bak"); + } + + roadmap_file_rename(path, name, newname); + + free(newname); + } + const char *roadmap_file_unique (const char *base) |
From: Paul F. <pg...@us...> - 2006-11-07 03:17:34
|
Update of /cvsroot/roadmap/roadmap/src/unix In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8192/unix Modified Files: roadmap_file.c Log Message: add ability to rename and make backups of files Index: roadmap_file.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/unix/roadmap_file.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** roadmap_file.c 27 Oct 2006 02:28:01 -0000 1.19 --- roadmap_file.c 7 Nov 2006 03:16:45 -0000 1.20 *************** *** 74,79 **** /* read-only opens will succeed on directories */ if (!S_ISREG(stat_buffer.st_mode)) { ! fclose(file); ! file = NULL; } } --- 74,79 ---- /* read-only opens will succeed on directories */ if (!S_ISREG(stat_buffer.st_mode)) { ! fclose(file); ! file = NULL; } } *************** *** 172,175 **** --- 172,211 ---- } + int roadmap_file_rename (const char *path, const char *name, const char *new) { + + const char *full_name, *full_new; + int ret = 1; + + full_name = roadmap_path_join (path, name); + full_new = roadmap_path_join (path, new); + + if (rename(full_name, full_new)) ret = 0; + + roadmap_path_free (full_name); + roadmap_path_free (full_new); + + return ret; + } + + /* + * Make backup file: append "~" + */ + void roadmap_file_backup(const char *path, const char *name) { + + int len; + char *newname; + + len = strlen(name); + newname = malloc(len + 2); /* '~' + '\0' */ + + roadmap_check_allocated(newname); + + strcpy(newname, name); + strcpy(&newname[len], "~"); + + roadmap_file_rename(path, name, newname); + + free(newname); + } const char *roadmap_file_unique (const char *base) { |
From: Paul F. <pg...@us...> - 2006-11-07 03:17:34
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8192 Modified Files: roadmap_file.h Log Message: add ability to rename and make backups of files Index: roadmap_file.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_file.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** roadmap_file.h 2 Jan 2006 08:59:11 -0000 1.14 --- roadmap_file.h 7 Nov 2006 03:16:45 -0000 1.15 *************** *** 71,74 **** --- 71,76 ---- int roadmap_file_exists (const char *path, const char *name); int roadmap_file_length (const char *path, const char *name); + int roadmap_file_rename (const char *path, const char *name, const char *new); + void roadmap_file_backup (const char *path, const char *name); void roadmap_file_save (const char *path, const char *name, |
From: Paul F. <pg...@us...> - 2006-11-04 21:59:42
|
Update of /cvsroot/roadmap/roadmap/src/gtk In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8118/gtk Modified Files: roadmap_main.c Log Message: eliminate spurious output ("roadmap_starting"/"roadmap_stopping" and gtk errors) when we only get as far as -help, or a usage message. Index: roadmap_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gtk/roadmap_main.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** roadmap_main.c 27 Oct 2006 16:00:58 -0000 1.22 --- roadmap_main.c 4 Nov 2006 21:59:38 -0000 1.23 *************** *** 551,560 **** } atexit(roadmap_main_exit); roadmap_signals_init(); - roadmap_start (argc, argv); - gtk_main(); --- 551,560 ---- } + roadmap_start (argc, argv); + atexit(roadmap_main_exit); roadmap_signals_init(); gtk_main(); |
From: Paul F. <pg...@us...> - 2006-11-04 21:59:41
|
Update of /cvsroot/roadmap/roadmap/src/gtk2 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8118/gtk2 Modified Files: roadmap_main.c Log Message: eliminate spurious output ("roadmap_starting"/"roadmap_stopping" and gtk errors) when we only get as far as -help, or a usage message. Index: roadmap_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gtk2/roadmap_main.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** roadmap_main.c 27 Oct 2006 02:33:14 -0000 1.28 --- roadmap_main.c 4 Nov 2006 21:59:38 -0000 1.29 *************** *** 645,654 **** } atexit(roadmap_main_exit); roadmap_signals_init(); - roadmap_start (argc, argv); - gtk_main(); --- 645,654 ---- } + roadmap_start (argc, argv); + atexit(roadmap_main_exit); roadmap_signals_init(); gtk_main(); |
From: Paul F. <pg...@us...> - 2006-11-04 21:59:41
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8118 Modified Files: roadmap_start.c Log Message: eliminate spurious output ("roadmap_starting"/"roadmap_stopping" and gtk errors) when we only get as far as -help, or a usage message. Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_start.c,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** roadmap_start.c 3 Nov 2006 02:42:16 -0000 1.110 --- roadmap_start.c 4 Nov 2006 21:59:37 -0000 1.111 *************** *** 1047,1051 **** #endif - roadmap_log (ROADMAP_WARNING, "RoadMap starting, time %s", roadmap_start_now()); roadmap_log_redirect (ROADMAP_MESSAGE_ERROR, roadmap_start_error); roadmap_log_redirect (ROADMAP_MESSAGE_FATAL, roadmap_start_fatal); --- 1047,1050 ---- *************** *** 1109,1112 **** --- 1108,1113 ---- roadmap_option (argc, argv, roadmap_start_usage); + roadmap_log (ROADMAP_WARNING, "RoadMap starting, time %s", roadmap_start_now()); + roadmap_start_set_unit (); |
From: Paul F. <pg...@us...> - 2006-11-04 17:30:39
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30756 Modified Files: roadmap_trip.c roadmap_trip.h Log Message: tighten coupling between selecting waypoints via the list dialog(s), and via the mouse. points selected via the dialog can now be deleted/edited/moved via the mouse menus. if a point is deleted via a mouse menu, it forces the dialog list to be updated on next attempted access. also, cleaned up the mark-as-modified code, so that the trip and landmark files won't be written needlessly. Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** roadmap_trip.c 2 Nov 2006 01:48:09 -0000 1.71 --- roadmap_trip.c 4 Nov 2006 17:30:36 -0000 1.72 *************** *** 94,108 **** extern route_head *RoadMapTrack; route_head *RoadMapCurrentRoute = NULL; static int RoadMapRouteInProgress = 0; static int RoadMapRouteIsReversed = 0; static int RoadMapTripRotate = 1; - static int RoadMapTripModified = 0; /* Trip needs to be saved? */ static int RoadMapTripRefresh = 1; /* Screen needs to be refreshed? */ static int RoadMapTripFocusChanged = 1; static int RoadMapTripFocusMoved = 1; [...1201 lines suppressed...] } --- 2902,2906 ---- if ( RoadMapCurrentRoute == NULL || ! roadmap_list_count(&RoadMapCurrentRoute->rte_waypoint_list) != 2) { return; } *************** *** 2802,2806 **** ROADMAP_LIST_INIT(&RoadMapTripTrackHead); ! ROADMAP_LIST_INIT(&RoadMapTripAreaPoints); ROADMAP_LIST_INIT(&RoadMapTripQuickRoute.waypoint_list); --- 2937,2941 ---- ROADMAP_LIST_INIT(&RoadMapTripTrackHead); ! ROADMAP_LIST_INIT(&RoadMapTripAreaPlaces); ROADMAP_LIST_INIT(&RoadMapTripQuickRoute.waypoint_list); Index: roadmap_trip.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** roadmap_trip.h 2 Nov 2006 01:48:09 -0000 1.29 --- roadmap_trip.h 4 Nov 2006 17:30:36 -0000 1.30 *************** *** 109,113 **** int roadmap_trip_move_last_place_callback ! (int action, const RoadMapGuiPoint *point); #if WGET_GOOGLE_ROUTE --- 109,113 ---- int roadmap_trip_move_last_place_callback ! (int action, const RoadMapGuiPoint *point); #if WGET_GOOGLE_ROUTE |
From: Paul F. <pg...@us...> - 2006-11-04 17:24:04
|
Update of /cvsroot/roadmap/roadmap/src/qt In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29173/qt Modified Files: qt_dialog.cc qt_dialog.h roadmap_dialog.cc Log Message: add support for hidden dialog data, to allow invisible context to be carried along with the dialog. Index: roadmap_dialog.cc =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/qt/roadmap_dialog.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** roadmap_dialog.cc 3 Nov 2006 14:42:15 -0000 1.7 --- roadmap_dialog.cc 4 Nov 2006 17:22:46 -0000 1.8 *************** *** 91,94 **** --- 91,98 ---- } + void roadmap_dialog_new_hidden (const char *frame, const char *name) { + currentDialog->addHiddenEntry(frame, name); + } + void roadmap_dialog_show_list (const char* frame, const char* name, int count, char **labels, void **values, RoadMapDialogCallback callback) { Index: qt_dialog.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/qt/qt_dialog.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** qt_dialog.h 3 Nov 2006 14:42:15 -0000 1.5 --- qt_dialog.h 4 Nov 2006 17:22:46 -0000 1.6 *************** *** 60,63 **** --- 60,64 ---- int current; QWidget* widget; + const void* value; public: *************** *** 69,72 **** --- 70,74 ---- ButtonEntry, LabelEntry, + HiddenEntry, }; *************** *** 103,106 **** --- 105,109 ---- void addTextEntry(const char* frame, const char* name); void addLabelEntry(const char* frame, const char* name); + void addHiddenEntry(const char* frame, const char* name); void addColorEntry(const char* frame, const char* name); void addChoiceEntry(const char* frame, Index: qt_dialog.cc =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/qt/qt_dialog.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** qt_dialog.cc 3 Nov 2006 14:42:15 -0000 1.7 --- qt_dialog.cc 4 Nov 2006 17:22:46 -0000 1.8 *************** *** 143,146 **** --- 143,153 ---- } + void RMapDialog::addHiddenEntry(const char* frameName, const char* name) { + QList<Entry>* frame = getFrame(frameName); + + Entry* entry = new Entry(this, Entry::HiddenEntry, name); + frame->append(entry); + } + void RMapDialog::complete(int) { QVBoxLayout* main = new QVBoxLayout(this); *************** *** 204,217 **** int i = 0; ! for(Entry* entry = entries->first(); entry != 0; entry = entries->next(), i++) { QWidget* w = entry->create(tab); QLabel* l; ! if (entry->getName()[0] == '.') { ! grid->addMultiCellWidget(w, i, i, 0, 1); ! } else { ! l = new QLabel(entry->getName(), tab, entry->getName()); ! grid->addWidget(l, i, 0); ! grid->addWidget(w, i, 1); } } --- 211,226 ---- int i = 0; ! for(Entry* entry = entries->first(); entry != 0; entry = entries->next(), i++) { QWidget* w = entry->create(tab); QLabel* l; ! if (entry->getWidget() != 0) { ! if (entry->getName()[0] == '.') { ! grid->addMultiCellWidget(w, i, i, 0, 1); ! } else { ! l = new QLabel(entry->getName(), tab, entry->getName()); ! grid->addWidget(l, i, 0); ! grid->addWidget(w, i, 1); ! } } } *************** *** 230,233 **** --- 239,243 ---- widget = 0; current = 0; + value = 0; } *************** *** 240,243 **** --- 250,254 ---- current = ecurrent; callback = ecallback; + value = 0; items.resize(eitems.count()); *************** *** 303,306 **** --- 314,320 ---- ((QLabel *)widget)->setAlignment (AlignRight|AlignVCenter|ExpandTabs); break; + + case HiddenEntry: + break; } *************** *** 334,337 **** --- 348,355 ---- ret = items[((QListBox*) widget)->currentItem()]->value; break; + + case HiddenEntry: + ret = (void *)value; + break; } *************** *** 370,373 **** --- 388,395 ---- ((QLabel*) widget)->setText((char *)val); break; + + case HiddenEntry: + value = val; + break; } } |
From: Paul F. <pg...@us...> - 2006-11-04 17:23:46
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29936 Modified Files: roadmap_landmark.c roadmap_landmark.h Log Message: add accessor function for marking the landmark list as modified. Index: roadmap_landmark.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_landmark.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** roadmap_landmark.c 4 Oct 2006 20:25:03 -0000 1.10 --- roadmap_landmark.c 4 Nov 2006 17:23:43 -0000 1.11 *************** *** 47,50 **** --- 47,54 ---- + void roadmap_landmark_set_modified(void) { + RoadMapLandmarkModified = 1; + } + #define ROADMAP_LANDMARK_LABEL_SIZE 18 *************** *** 146,150 **** waypt_add(&RoadMapLandmarkHead, waypointp); ! RoadMapLandmarkModified = 1; RoadMapLandmarkRefresh = 1; roadmap_screen_refresh (); --- 150,154 ---- waypt_add(&RoadMapLandmarkHead, waypointp); ! roadmap_landmark_set_modified(); RoadMapLandmarkRefresh = 1; roadmap_screen_refresh (); *************** *** 156,160 **** waypt_del (waypointp); waypt_free (waypointp); ! RoadMapLandmarkModified = 1; RoadMapLandmarkRefresh = 1; roadmap_screen_refresh (); --- 160,164 ---- waypt_del (waypointp); waypt_free (waypointp); ! roadmap_landmark_set_modified(); RoadMapLandmarkRefresh = 1; roadmap_screen_refresh (); *************** *** 164,171 **** RoadMapList * roadmap_landmark_list(void) { ! // hack -- if roadmap_trip asked for the list, it's possible ! // someone is doing an edit. we don't get informed of the actual ! // edit, which is done generically. ! RoadMapLandmarkModified = 1; return &RoadMapLandmarkHead; } --- 168,172 ---- RoadMapList * roadmap_landmark_list(void) { ! return &RoadMapLandmarkHead; } *************** *** 244,248 **** roadmap_list_sort(&RoadMapLandmarkHead, alpha_waypoint_cmp); ! RoadMapLandmarkModified = 1; RoadMapLandmarkRefresh = 1; --- 245,249 ---- roadmap_list_sort(&RoadMapLandmarkHead, alpha_waypoint_cmp); ! roadmap_landmark_set_modified(); RoadMapLandmarkRefresh = 1; Index: roadmap_landmark.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_landmark.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** roadmap_landmark.h 4 Oct 2006 20:25:03 -0000 1.6 --- roadmap_landmark.h 4 Nov 2006 17:23:43 -0000 1.7 *************** *** 25,28 **** --- 25,29 ---- #define INCLUDE__ROADMAP_LANDMARK__H + void roadmap_landmark_set_modified(void); void roadmap_landmark_display (void); void roadmap_landmark_initialize (void); |
From: Paul F. <pg...@us...> - 2006-11-04 17:23:45
|
Update of /cvsroot/roadmap/roadmap/src/gtk In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29173/gtk Modified Files: roadmap_dialog.c Log Message: add support for hidden dialog data, to allow invisible context to be carried along with the dialog. Index: roadmap_dialog.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gtk/roadmap_dialog.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** roadmap_dialog.c 7 Dec 2005 01:07:32 -0000 1.11 --- roadmap_dialog.c 4 Nov 2006 17:22:45 -0000 1.12 *************** *** 46,49 **** --- 46,50 ---- #define ROADMAP_WIDGET_LIST 4 #define ROADMAP_WIDGET_LABEL 5 + #define ROADMAP_WIDGET_HIDDEN 6 /* We maintain a three-level tree of lists: *************** *** 245,248 **** --- 246,254 ---- child = roadmap_dialog_get (parent, name); + if (w == NULL) { + child->w = NULL; + return child; + } + if (parent->w == NULL) { *************** *** 344,347 **** --- 350,359 ---- } + void roadmap_dialog_new_hidden (const char *frame, const char *name) { + + RoadMapDialogItem child = roadmap_dialog_new_item (frame, name, 0, 0); + + child->widget_type = ROADMAP_WIDGET_HIDDEN; + } void roadmap_dialog_new_choice (const char *frame, |
From: Paul F. <pg...@us...> - 2006-11-04 17:23:39
|
Update of /cvsroot/roadmap/roadmap/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29173/win32 Modified Files: roadmap_dialog.c Log Message: add support for hidden dialog data, to allow invisible context to be carried along with the dialog. Index: roadmap_dialog.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/win32/roadmap_dialog.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap_dialog.c 3 Dec 2005 03:24:09 -0000 1.3 --- roadmap_dialog.c 4 Nov 2006 17:22:46 -0000 1.4 *************** *** 47,50 **** --- 47,51 ---- #define ROADMAP_WIDGET_LIST 4 #define ROADMAP_WIDGET_LABEL 5 + #define ROADMAP_WIDGET_HIDDEN 6 const unsigned int MAX_ROW_HEIGHT = 20; *************** *** 235,239 **** static RoadMapDialogItem roadmap_dialog_new_item (const char *frame, ! const char *name) { RoadMapDialogItem parent; --- 236,240 ---- static RoadMapDialogItem roadmap_dialog_new_item (const char *frame, ! const char *name) { RoadMapDialogItem parent; *************** *** 296,299 **** --- 297,306 ---- } + void roadmap_dialog_new_hidden (const char *frame, const char *name) + { + RoadMapDialogItem child = roadmap_dialog_new_item (frame, name); + + child->widget_type = ROADMAP_WIDGET_HIDDEN; + } void roadmap_dialog_new_choice (const char *frame, |
From: Paul F. <pg...@us...> - 2006-11-04 17:23:39
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29173 Modified Files: roadmap_dialog.h Log Message: add support for hidden dialog data, to allow invisible context to be carried along with the dialog. Index: roadmap_dialog.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_dialog.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_dialog.h 3 Dec 2005 03:27:21 -0000 1.4 --- roadmap_dialog.h 4 Nov 2006 17:22:45 -0000 1.5 *************** *** 112,115 **** --- 112,118 ---- void roadmap_dialog_add_button (char *label, RoadMapDialogCallback callback); + /* Add one hidden data item to the current dialog. */ + void roadmap_dialog_new_hidden (const char *frame, const char *name); + /* When all done with building the dialog, call this to finalize and show: */ void roadmap_dialog_complete (int use_keyboard); |