You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
(59) |
Sep
(43) |
Oct
(95) |
Nov
(135) |
Dec
(108) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(229) |
Feb
(141) |
Mar
(59) |
Apr
(70) |
May
(64) |
Jun
(87) |
Jul
(57) |
Aug
(108) |
Sep
(74) |
Oct
(203) |
Nov
(141) |
Dec
(108) |
| 2009 |
Jan
(114) |
Feb
(91) |
Mar
(101) |
Apr
(69) |
May
(54) |
Jun
(82) |
Jul
(49) |
Aug
(109) |
Sep
(81) |
Oct
(93) |
Nov
(100) |
Dec
(79) |
| 2010 |
Jan
(46) |
Feb
(36) |
Mar
(135) |
Apr
(103) |
May
(116) |
Jun
(130) |
Jul
(52) |
Aug
(31) |
Sep
(46) |
Oct
(48) |
Nov
(98) |
Dec
(110) |
| 2011 |
Jan
(234) |
Feb
(184) |
Mar
(150) |
Apr
(43) |
May
(53) |
Jun
(52) |
Jul
(112) |
Aug
(72) |
Sep
(79) |
Oct
(23) |
Nov
(6) |
Dec
(30) |
| 2012 |
Jan
(39) |
Feb
(37) |
Mar
(49) |
Apr
(60) |
May
(63) |
Jun
(38) |
Jul
(33) |
Aug
(24) |
Sep
(20) |
Oct
(14) |
Nov
(23) |
Dec
(50) |
| 2013 |
Jan
(30) |
Feb
(32) |
Mar
(27) |
Apr
(41) |
May
(59) |
Jun
(21) |
Jul
(10) |
Aug
(73) |
Sep
(23) |
Oct
(60) |
Nov
(14) |
Dec
(15) |
| 2014 |
Jan
(4) |
Feb
(8) |
Mar
(11) |
Apr
(6) |
May
(27) |
Jun
(4) |
Jul
(29) |
Aug
(62) |
Sep
(11) |
Oct
(17) |
Nov
(58) |
Dec
(9) |
| 2015 |
Jan
(23) |
Feb
(3) |
Mar
(26) |
Apr
(47) |
May
(8) |
Jun
(28) |
Jul
(10) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <mar...@us...> - 2013-01-25 21:18:50
|
Revision: 5355
http://navit.svn.sourceforge.net/navit/?rev=5355&view=rev
Author: martin-s
Date: 2013-01-25 21:18:43 +0000 (Fri, 25 Jan 2013)
Log Message:
-----------
Fix:XML:Removed accidentially introduced duplicate attributes
Modified Paths:
--------------
trunk/navit/navit/navit_shipped.xml
Modified: trunk/navit/navit/navit_shipped.xml
===================================================================
--- trunk/navit/navit/navit_shipped.xml 2013-01-25 21:05:58 UTC (rev 5354)
+++ trunk/navit/navit/navit_shipped.xml 2013-01-25 21:18:43 UTC (rev 5355)
@@ -3302,7 +3302,7 @@
<arrows color="#FF089C" width="1"/>
</itemgra>
<itemgra item_types="rg_point" order="0-">
- <circle color="#FF089C" radius="10" color="#55c4bd" background_color="#000000" text_size="7"/>
+ <circle color="#FF089C" radius="10" background_color="#000000" text_size="7"/>
</itemgra>
<itemgra item_types="nav_left_1" order="0-">
<icon src="nav_left_1_bk.svg" w="32" h="32"/>
@@ -3384,47 +3384,47 @@
</itemgra>
<itemgra item_types="announcement" order="7-">
<icon src="gui_sound_32_32.png"/>
- <circle color="#FF089C" radius="10" color="#55c4bd" background_color="#000000" text_size="7"/>
+ <circle color="#FF089C" radius="10" background_color="#000000" text_size="7"/>
</itemgra>
<itemgra item_types="waypoint" order="2">
- <circle color="#00a0a0" radius="4" width="2" color="#55c4bd" background_color="#000000" text_size="24"/>
+ <circle color="#00a0a0" radius="4" width="2" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="3-5">
- <circle color="#00a0a0" radius="8" width="2" color="#55c4bd" background_color="#000000" text_size="24"/>
+ <circle color="#00a0a0" radius="8" width="2" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="6">
- <circle color="#00a0a0" radius="10" width="2" color="#55c4bd" background_color="#000000" text_size="24"/>
+ <circle color="#00a0a0" radius="10" width="2" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="7-8">
- <circle color="#00a0a0" radius="16" width="2" color="#55c4bd" background_color="#000000" text_size="24"/>
+ <circle color="#00a0a0" radius="16" width="2" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="9-10">
- <circle color="#00a0a0" radius="20" width="4" color="#55c4bd" background_color="#000000" text_size="32"/>
+ <circle color="#00a0a0" radius="20" width="4" background_color="#000000" text_size="32"/>
</itemgra>
<itemgra item_types="waypoint" order="11">
- <circle color="#00a0a0" radius="28" width="4" color="#55c4bd" background_color="#000000" text_size="32"/>
+ <circle color="#00a0a0" radius="28" width="4" background_color="#000000" text_size="32"/>
</itemgra>
<itemgra item_types="waypoint" order="12">
- <circle color="#00a0a0" radius="32" width="4" color="#55c4bd" background_color="#000000" text_size="32"/>
+ <circle color="#00a0a0" radius="32" width="4" background_color="#000000" text_size="32"/>
</itemgra>
<itemgra item_types="waypoint" order="13">
- <circle color="#00a0a0" radius="52" width="4" color="#55c4bd" background_color="#000000" text_size="24"/>
+ <circle color="#00a0a0" radius="52" width="4" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="14">
- <circle color="#00a0a0" radius="64" width="4" color="#55c4bd" background_color="#000000" text_size="24"/>
+ <circle color="#00a0a0" radius="64" width="4" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="15">
- <circle color="#00a0a0" radius="68" width="6" color="#55c4bd" background_color="#000000" text_size="24"/>
+ <circle color="#00a0a0" radius="68" width="6" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="16">
- <circle color="#00a0a0" radius="132" width="8" color="#55c4bd" background_color="#000000" text_size="32"/>
+ <circle color="#00a0a0" radius="132" width="8" background_color="#000000" text_size="32"/>
</itemgra>
<itemgra item_types="waypoint" order="17">
- <circle color="#00a0a0" radius="268" width="8" color="#55c4bd" background_color="#000000" text_size="48"/>
+ <circle color="#00a0a0" radius="268" width="8" background_color="#000000" text_size="48"/>
</itemgra>
<itemgra item_types="waypoint" order="18">
- <circle color="#00a0a0" radius="530" width="8" color="#55c4bd" background_color="#000000" text_size="48"/>
+ <circle color="#00a0a0" radius="530" width="8" background_color="#000000" text_size="48"/>
</itemgra>
</layer>
<layer name="points">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-01-25 21:06:06
|
Revision: 5354
http://navit.svn.sourceforge.net/navit/?rev=5354&view=rev
Author: martin-s
Date: 2013-01-25 21:05:58 +0000 (Fri, 25 Jan 2013)
Log Message:
-----------
Fix:XML:Made text on Car-dark appear white on black
Modified Paths:
--------------
trunk/navit/navit/navit_shipped.xml
Modified: trunk/navit/navit/navit_shipped.xml
===================================================================
--- trunk/navit/navit/navit_shipped.xml 2013-01-25 10:07:49 UTC (rev 5353)
+++ trunk/navit/navit/navit_shipped.xml 2013-01-25 21:05:58 UTC (rev 5354)
@@ -2524,15 +2524,15 @@
</itemgra>
<itemgra item_types="poly_wood" order="0-">
<polygon color="#041a06"/>
- <text text_size="5"/>
+ <text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_flats,poly_scrub,poly_military_zone,poly_marine,plantation,tundra" order="0-">
<polygon color="#041a06"/>
- <text text_size="5"/>
+ <text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_farm" order="0-">
<polygon color="#041a06"/>
- <text text_size="5"/>
+ <text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_meadow" order="0-">
<polygon color="#041a06"/>
@@ -2545,15 +2545,15 @@
</itemgra>
<itemgra item_types="poly_water" order="0-">
<polygon color="#010321"/>
- <text text_size="5"/>
+ <text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_land" order="0-">
<polygon color="#011001"/>
- <text text_size="5"/>
+ <text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_park" order="0-">
<polygon color="#041a06"/>
- <text text_size="5"/>
+ <text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_pedestrian" order="10">
<polygon color="#202020"/>
@@ -2638,7 +2638,7 @@
</itemgra>
<itemgra item_types="water_line" order="0-">
<polyline color="#010321" width="1"/>
- <text text_size="5"/>
+ <text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="water_river" order="4-5">
<polyline color="#010321" width="1"/>
@@ -2648,41 +2648,41 @@
</itemgra>
<itemgra item_types="water_river" order="7">
<polyline color="#010321" width="3"/>
- <text text_size="5"/>
+ <text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="water_river" order="8-9">
<polyline color="#010321" width="4"/>
- <text text_size="7"/>
+ <text color="#55c4bd" background_color="#000000" text_size="7"/>
</itemgra>
<itemgra item_types="water_river" order="10-">
<polyline color="#010321" width="4"/>
- <text text_size="10"/>
+ <text color="#55c4bd" background_color="#000000" text_size="10"/>
</itemgra>
<itemgra item_types="water_canal" order="6">
<polyline color="#010321" width="1"/>
</itemgra>
<itemgra item_types="water_canal" order="7">
<polyline color="#010321" width="2"/>
- <text text_size="5"/>
+ <text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="water_canal" order="8-9">
<polyline color="#010321" width="3"/>
- <text text_size="7"/>
+ <text color="#55c4bd" background_color="#000000" text_size="7"/>
</itemgra>
<itemgra item_types="water_canal" order="10-">
<polyline color="#010321" width="3"/>
- <text text_size="10"/>
+ <text color="#55c4bd" background_color="#000000" text_size="10"/>
</itemgra>
<itemgra item_types="water_stream" order="8-9">
<polyline color="#010321" width="1"/>
</itemgra>
<itemgra item_types="water_stream" order="10-">
<polyline color="#010321" width="2"/>
- <text text_size="7"/>
+ <text color="#55c4bd" background_color="#000000" text_size="7"/>
</itemgra>
<itemgra item_types="water_drain" order="10-">
<polyline color="#010321" width="1"/>
- <text text_size="5"/>
+ <text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_apron" order="0-">
<polygon color="#041a06"/>
@@ -3178,16 +3178,16 @@
</itemgra>
-->
<itemgra item_types="highway_exit_label" order="10-">
- <circle color="#000000" radius="3" text_size="7"/>
+ <circle color="#55c4bd" background_color="#000000" radius="3" text_size="7"/>
</itemgra>
<itemgra item_types="highway_city,highway_land,street_4_city,street_4_land,street_n_lanes,living_street" order="10-18">
- <text text_size="8" color="#55c4bd"/>
+ <text text_size="8" color="#55c4bd" background_color="#000000"/>
</itemgra>
<itemgra item_types="street_2_city,street_2_land,street_3_city,street_3_land,ramp" order="11-18">
- <text text_size="9" color="#55c4bd"/>
+ <text text_size="9" color="#55c4bd" background_color="#000000"/>
</itemgra>
<itemgra item_types="street_nopass,street_0,street_1_city,street_1_land,footway" order="12-18">
- <text text_size="9" color="#55c4bd"/>
+ <text text_size="9" color="#55c4bd" background_color="#000000"/>
</itemgra>
</layer>
<layer name="polylines">
@@ -3260,34 +3260,34 @@
</layer>
<layer name="labels">
<itemgra item_types="town_label,district_label,town_label_0e0,town_label_1e0,town_label_2e0,town_label_5e0,town_label_1e1,town_label_2e1,town_label_5e1,town_label_1e2,town_label_2e2,town_label_5e2,district_label_0e0,district_label_1e0,district_label_2e0,district_label_5e0,district_label_1e1,district_label_2e1,district_label_5e1,district_label_1e2,district_label_2e2,district_label_5e2" order="12-">
- <circle color="#55c4bd" radius="3" text_size="7"/>
+ <circle color="#55c4bd" background_color="#000000" radius="3" text_size="7"/>
</itemgra>
<itemgra item_types="district_label_1e3,district_label_2e3,district_label_5e3" order="11-">
- <circle color="#55c4bd" radius="3" text_size="7"/>
+ <circle color="#55c4bd" background_color="#000000" radius="3" text_size="7"/>
</itemgra>
<itemgra item_types="town_label_1e3,town_label_2e3,town_label_5e3,place_label" order="10-">
- <circle color="#55c4bd" radius="3" text_size="7"/>
+ <circle color="#55c4bd" background_color="#000000" radius="3" text_size="7"/>
</itemgra>
<itemgra item_types="district_label_1e4,district_label_2e4,district_label_5e4" order="9-">
- <circle color="#55c4bd" radius="3" text_size="7"/>
+ <circle color="#55c4bd" background_color="#000000" radius="3" text_size="7"/>
</itemgra>
<itemgra item_types="town_label_1e4,town_label_2e4,town_label_5e4" order="8-">
- <circle color="#55c4bd" radius="3" text_size="7"/>
+ <circle color="#55c4bd" background_color="#000000" radius="3" text_size="7"/>
</itemgra>
<itemgra item_types="district_label_1e5,district_label_2e5,district_label_5e5" order="6-">
- <circle color="#55c4bd" radius="3" text_size="10"/>
+ <circle color="#55c4bd" background_color="#000000" radius="3" text_size="10"/>
</itemgra>
<itemgra item_types="town_label_1e5,town_label_2e5,town_label_5e5" order="4-">
- <circle color="#55c4bd" radius="3" text_size="10"/>
+ <circle color="#55c4bd" background_color="#000000" radius="3" text_size="10"/>
</itemgra>
<itemgra item_types="district_label_1e6,district_label_2e6,district_label_5e6" order="3-">
- <circle color="#55c4bd" radius="3" text_size="15"/>
+ <circle color="#55c4bd" background_color="#000000" radius="3" text_size="15"/>
</itemgra>
<itemgra item_types="town_label_1e6,town_label_2e6,town_label_5e6" order="2-">
- <circle color="#55c4bd" radius="3" text_size="15"/>
+ <circle color="#55c4bd" background_color="#000000" radius="3" text_size="15"/>
</itemgra>
<itemgra item_types="town_label_1e7,district_label_1e7" order="1-">
- <circle color="#55c4bd" radius="3" text_size="15"/>
+ <circle color="#55c4bd" background_color="#000000" radius="3" text_size="15"/>
</itemgra>
</layer>
<layer name="Internal">
@@ -3302,7 +3302,7 @@
<arrows color="#FF089C" width="1"/>
</itemgra>
<itemgra item_types="rg_point" order="0-">
- <circle color="#FF089C" radius="10" text_size="7"/>
+ <circle color="#FF089C" radius="10" color="#55c4bd" background_color="#000000" text_size="7"/>
</itemgra>
<itemgra item_types="nav_left_1" order="0-">
<icon src="nav_left_1_bk.svg" w="32" h="32"/>
@@ -3384,47 +3384,47 @@
</itemgra>
<itemgra item_types="announcement" order="7-">
<icon src="gui_sound_32_32.png"/>
- <circle color="#FF089C" radius="10" text_size="7"/>
+ <circle color="#FF089C" radius="10" color="#55c4bd" background_color="#000000" text_size="7"/>
</itemgra>
<itemgra item_types="waypoint" order="2">
- <circle color="#00a0a0" radius="4" width="2" text_size="24"/>
+ <circle color="#00a0a0" radius="4" width="2" color="#55c4bd" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="3-5">
- <circle color="#00a0a0" radius="8" width="2" text_size="24"/>
+ <circle color="#00a0a0" radius="8" width="2" color="#55c4bd" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="6">
- <circle color="#00a0a0" radius="10" width="2" text_size="24"/>
+ <circle color="#00a0a0" radius="10" width="2" color="#55c4bd" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="7-8">
- <circle color="#00a0a0" radius="16" width="2" text_size="24"/>
+ <circle color="#00a0a0" radius="16" width="2" color="#55c4bd" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="9-10">
- <circle color="#00a0a0" radius="20" width="4" text_size="32"/>
+ <circle color="#00a0a0" radius="20" width="4" color="#55c4bd" background_color="#000000" text_size="32"/>
</itemgra>
<itemgra item_types="waypoint" order="11">
- <circle color="#00a0a0" radius="28" width="4" text_size="32"/>
+ <circle color="#00a0a0" radius="28" width="4" color="#55c4bd" background_color="#000000" text_size="32"/>
</itemgra>
<itemgra item_types="waypoint" order="12">
- <circle color="#00a0a0" radius="32" width="4" text_size="32"/>
+ <circle color="#00a0a0" radius="32" width="4" color="#55c4bd" background_color="#000000" text_size="32"/>
</itemgra>
<itemgra item_types="waypoint" order="13">
- <circle color="#00a0a0" radius="52" width="4" text_size="24"/>
+ <circle color="#00a0a0" radius="52" width="4" color="#55c4bd" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="14">
- <circle color="#00a0a0" radius="64" width="4" text_size="24"/>
+ <circle color="#00a0a0" radius="64" width="4" color="#55c4bd" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="15">
- <circle color="#00a0a0" radius="68" width="6" text_size="24"/>
+ <circle color="#00a0a0" radius="68" width="6" color="#55c4bd" background_color="#000000" text_size="24"/>
</itemgra>
<itemgra item_types="waypoint" order="16">
- <circle color="#00a0a0" radius="132" width="8" text_size="32"/>
+ <circle color="#00a0a0" radius="132" width="8" color="#55c4bd" background_color="#000000" text_size="32"/>
</itemgra>
<itemgra item_types="waypoint" order="17">
- <circle color="#00a0a0" radius="268" width="8" text_size="48"/>
+ <circle color="#00a0a0" radius="268" width="8" color="#55c4bd" background_color="#000000" text_size="48"/>
</itemgra>
<itemgra item_types="waypoint" order="18">
- <circle color="#00a0a0" radius="530" width="8" text_size="48"/>
+ <circle color="#00a0a0" radius="530" width="8" color="#55c4bd" background_color="#000000" text_size="48"/>
</itemgra>
</layer>
<layer name="points">
@@ -3721,18 +3721,18 @@
</itemgra>
<itemgra item_types="poi_rail_halt" order="10-">
<circle color="#000000" radius="3" width="3"/>
- <circle color="#3d3d3d" radius="6" width="2" text_size="8"/>
+ <circle color="#3d3d3d" background_color="#000000" radius="6" width="2" text_size="8"/>
</itemgra>
<itemgra item_types="poi_rail_station" order="11-">
<circle color="#000000" radius="3" width="3"/>
- <circle color="#3d3d3d" radius="6" width="2" text_size="8"/>
+ <circle color="#3d3d3d" background_color="#000000" radius="6" width="2" text_size="8"/>
</itemgra>
<itemgra item_types="poi_rail_tram_stop" order="10-11">
- <circle color="#3d3d3d" radius="2" width="2"/>
+ <circle color="#3d3d3d" background_color="#000000" radius="2" width="2"/>
</itemgra>
<itemgra item_types="poi_rail_tram_stop" order="12-">
<circle color="#000000" radius="3" width="3"/>
- <circle color="#3d3d3d" radius="6" width="2" text_size="8"/>
+ <circle color="#3d3d3d" background_color="#000000" radius="6" width="2" text_size="8"/>
</itemgra>
<itemgra item_types="poi_repair_service" order="0-">
<icon src="repair_service.png"/>
@@ -3927,12 +3927,12 @@
</layer>
<layer name="POI Labels">
<itemgra item_types="poi_airport,town_ghost,poi_hotel,poi_car_parking,poi_car_dealer_parts,poi_fuel,poi_shopping,poi_attraction,poi_cafe,poi_bar,poi_pub,highway_exit,poi_camp_rv,poi_museum_history,poi_hospital,poi_dining,poi_fastfood,poi_police,poi_autoservice,poi_bank,poi_atm,poi_bus_station,poi_bus_stop,poi_business_service,poi_car_rent,poi_car_sharing,poi_church,poi_bahai,poi_buddhist,poi_hindu,poi_islamic,poi_jain,poi_jewish,poi_pagan,poi_pastafarian,poi_shinto,poi_sikh,poi_taoist,poi_cinema,poi_concert,poi_drinking_water,poi_emergency,poi_fair,poi_fish,poi_government_building,poi_hotspring,poi_information,poi_justice,poi_landmark,poi_library,poi_mall,poi_manmade_feature,poi_marine,poi_marine_type,poi_mark,poi_oil_field,poi_peak,poi_personal_service,poi_pharmacy,poi_post_office,poi_public_office,poi_rail_halt,poi_rail_station,poi_rail_tram_stop,poi_repair_service,poi_resort,poi_restaurant,poi_restricted_area,poi_sailing,poi_scenic_area,poi_school,poi_service,poi_shop_retail,poi_skiing,poi_social_service,poi_sport,poi_stadium,poi_swimming,poi_theater,poi_townhall,poi_trail,poi_truck_stop,poi_tunnel,poi_worship,poi_wrecker,poi_zoo,poi_biergarten,poi_castle,poi_ruins,poi_memorial,poi_monument,poi_shelter,poi_fountain,poi_viewpoint,vehicle" order="14-">
- <circle color="#606060" radius="0" width="0" text_size="10"/>
+ <circle color="#606060" background_color="#000000" radius="0" width="0" text_size="10"/>
</itemgra>
</layer>
<layer name="Found items" order="0-">
<itemgra item_types="found_item">
- <circle color="#008080" radius="24" width="2" text_size="12"/>
+ <circle color="#008080" background_color="#000000" radius="24" width="2" text_size="12"/>
</itemgra>
</layer>
</layout>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-01-25 10:08:00
|
Revision: 5353
http://navit.svn.sourceforge.net/navit/?rev=5353&view=rev
Author: martin-s
Date: 2013-01-25 10:07:49 +0000 (Fri, 25 Jan 2013)
Log Message:
-----------
Add:binding_dbus:Support for postal code and house number
Modified Paths:
--------------
trunk/navit/navit/binding/dbus/binding_dbus.c
Modified: trunk/navit/navit/binding/dbus/binding_dbus.c
===================================================================
--- trunk/navit/navit/binding/dbus/binding_dbus.c 2013-01-25 09:49:57 UTC (rev 5352)
+++ trunk/navit/navit/binding/dbus/binding_dbus.c 2013-01-25 10:07:49 UTC (rev 5353)
@@ -1425,6 +1425,15 @@
return request_destroy(connection, message, "search_list", NULL, (void (*)(void *)) search_list_destroy);
}
+void
+request_search_list_common(struct search_list_common *slc, DBusMessageIter *iter4)
+{
+ if (slc->postal)
+ encode_dict_string_variant_string(iter4, "postal", slc->postal);
+ if (slc->postal_mask)
+ encode_dict_string_variant_string(iter4, "postal_mask", slc->postal_mask);
+}
+
static DBusHandlerResult
request_search_list_get_result(DBusConnection *connection, DBusMessage *message)
{
@@ -1435,6 +1444,7 @@
char *country="country";
char *town="town";
char *street="street";
+ char *house_number="housenumber";
search_list = object_get_from_message(message, "search_list");
if (! search_list)
@@ -1466,6 +1476,7 @@
dbus_message_iter_open_container(&iter2, DBUS_TYPE_DICT_ENTRY, NULL, &iter3);
dbus_message_iter_append_basic(&iter3, DBUS_TYPE_STRING, &town);
dbus_message_iter_open_container(&iter3, DBUS_TYPE_ARRAY, "{sv}", &iter4);
+ request_search_list_common(&result->town->common,&iter4);
if (result->town->common.district_name)
encode_dict_string_variant_string(&iter4, "district", result->town->common.district_name);
if (result->town->common.town_name)
@@ -1477,11 +1488,21 @@
dbus_message_iter_open_container(&iter2, DBUS_TYPE_DICT_ENTRY, NULL, &iter3);
dbus_message_iter_append_basic(&iter3, DBUS_TYPE_STRING, &street);
dbus_message_iter_open_container(&iter3, DBUS_TYPE_ARRAY, "{sv}", &iter4);
+ request_search_list_common(&result->street->common,&iter4);
if (result->street->name)
encode_dict_string_variant_string(&iter4, "name", result->street->name);
dbus_message_iter_close_container(&iter3, &iter4);
dbus_message_iter_close_container(&iter2, &iter3);
}
+ if (result->house_number && result->house_number->house_number) {
+ dbus_message_iter_open_container(&iter2, DBUS_TYPE_DICT_ENTRY, NULL, &iter3);
+ dbus_message_iter_append_basic(&iter3, DBUS_TYPE_STRING, &house_number);
+ dbus_message_iter_open_container(&iter3, DBUS_TYPE_ARRAY, "{sv}", &iter4);
+ request_search_list_common(&result->house_number->common,&iter4);
+ encode_dict_string_variant_string(&iter4, "name", result->house_number->house_number);
+ dbus_message_iter_close_container(&iter3, &iter4);
+ dbus_message_iter_close_container(&iter2, &iter3);
+ }
dbus_message_iter_close_container(&iter, &iter2);
dbus_connection_send (connection, reply, NULL);
dbus_message_unref (reply);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-01-25 09:50:10
|
Revision: 5352
http://navit.svn.sourceforge.net/navit/?rev=5352&view=rev
Author: martin-s
Date: 2013-01-25 09:49:57 +0000 (Fri, 25 Jan 2013)
Log Message:
-----------
Fix:Core:Fixed interpolation, do not free alloca()ted memory
Modified Paths:
--------------
trunk/navit/navit/search.c
Modified: trunk/navit/navit/search.c
===================================================================
--- trunk/navit/navit/search.c 2013-01-21 11:21:39 UTC (rev 5351)
+++ trunk/navit/navit/search.c 2013-01-25 09:49:57 UTC (rev 5352)
@@ -702,7 +702,7 @@
struct pcoord *ret=g_new(struct pcoord, 1);
ret->pro = map_projection(item->map);
dbg(1,"%s\n",item_to_name(item->type));
- if (item->type<type_house_number_interpolation_even || item->type>type_house_number_interpolation_alphabetic) {
+ if (!inter) {
struct coord c;
if (item_coord_get(item, &c, 1)) {
ret->x=c.x;
@@ -746,9 +746,7 @@
dbg(1,"remaining distance=%d from %d\n",hn_distance,distances[i]);
ret->x=(c[i+1].x-c[i].x)*hn_distance/distances[i]+c[i].x;
ret->y=(c[i+1].y-c[i].y)*hn_distance/distances[i]+c[i].y;
- g_free(distances);
}
- g_free(c);
}
return ret;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-01-21 11:21:46
|
Revision: 5351
http://navit.svn.sourceforge.net/navit/?rev=5351&view=rev
Author: martin-s
Date: 2013-01-21 11:21:39 +0000 (Mon, 21 Jan 2013)
Log Message:
-----------
Fix:Core:Make images in cursors work again
Modified Paths:
--------------
trunk/navit/navit/vehicle.c
Modified: trunk/navit/navit/vehicle.c
===================================================================
--- trunk/navit/navit/vehicle.c 2013-01-21 11:18:21 UTC (rev 5350)
+++ trunk/navit/navit/vehicle.c 2013-01-21 11:21:39 UTC (rev 5351)
@@ -373,6 +373,7 @@
struct color c;
this_->gra=graphics_overlay_new(gra, &this_->cursor_pnt, this_->cursor->w, this_->cursor->h, 65535, 0);
if (this_->gra) {
+ graphics_init(this_->gra);
this_->bg=graphics_gc_new(this_->gra);
c.r=0; c.g=0; c.b=0; c.a=0;
graphics_gc_set_foreground(this_->bg, &c);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-01-21 11:18:27
|
Revision: 5350
http://navit.svn.sourceforge.net/navit/?rev=5350&view=rev
Author: martin-s
Date: 2013-01-21 11:18:21 +0000 (Mon, 21 Jan 2013)
Log Message:
-----------
Fix:gui_qml:Make compileable again
Modified Paths:
--------------
trunk/navit/navit/gui/qml/gui_qml.cpp
Modified: trunk/navit/navit/gui/qml/gui_qml.cpp
===================================================================
--- trunk/navit/navit/gui/qml/gui_qml.cpp 2013-01-21 08:41:55 UTC (rev 5349)
+++ trunk/navit/navit/gui/qml/gui_qml.cpp 2013-01-21 11:18:21 UTC (rev 5350)
@@ -10,6 +10,7 @@
#include "plugin.h"
#include "item.h"
#include "attr.h"
+#include "xmlconfig.h"
#include "color.h"
#include "gui.h"
#include "callback.h"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-01-21 08:42:01
|
Revision: 5349
http://navit.svn.sourceforge.net/navit/?rev=5349&view=rev
Author: martin-s
Date: 2013-01-21 08:41:55 +0000 (Mon, 21 Jan 2013)
Log Message:
-----------
Fix:Core:Reverted part of r5347 because function is needed for custom modules
Revision Links:
--------------
http://navit.svn.sourceforge.net/navit/?rev=5347&view=rev
Modified Paths:
--------------
trunk/navit/navit/navit.c
trunk/navit/navit/navit.h
Modified: trunk/navit/navit/navit.c
===================================================================
--- trunk/navit/navit/navit.c 2013-01-20 18:29:23 UTC (rev 5348)
+++ trunk/navit/navit/navit.c 2013-01-21 08:41:55 UTC (rev 5349)
@@ -424,7 +424,7 @@
transform_set_center(tr, ¢er_new);
}
-static void
+void
navit_set_timeout(struct navit *this_)
{
struct attr follow;
Modified: trunk/navit/navit/navit.h
===================================================================
--- trunk/navit/navit/navit.h 2013-01-20 18:29:23 UTC (rev 5348)
+++ trunk/navit/navit/navit.h 2013-01-21 08:41:55 UTC (rev 5349)
@@ -64,6 +64,7 @@
int navit_get_height(struct navit *this_);
int navit_ignore_button(struct navit *this_);
void navit_ignore_graphics_events(struct navit *this_, int ignore);
+void navit_set_timeout(struct navit *this_);
int navit_handle_button(struct navit *this_, int pressed, int button, struct point *p, struct callback *popup_callback);
void navit_handle_motion(struct navit *this_, struct point *p);
void navit_zoom_in(struct navit *this_, int factor, struct point *p);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sl...@us...> - 2013-01-20 18:29:29
|
Revision: 5348
http://navit.svn.sourceforge.net/navit/?rev=5348&view=rev
Author: sleske
Date: 2013-01-20 18:29:23 +0000 (Sun, 20 Jan 2013)
Log Message:
-----------
Fix:translations:Add missing Spanish translation. Fixes #1012.
Modified Paths:
--------------
trunk/navit/po/es.po.in
Modified: trunk/navit/po/es.po.in
===================================================================
--- trunk/navit/po/es.po.in 2013-01-20 18:17:32 UTC (rev 5347)
+++ trunk/navit/po/es.po.in 2013-01-20 18:29:23 UTC (rev 5348)
@@ -1542,7 +1542,7 @@
msgstr "Ver atributos"
msgid "Set as position (and deactivate vehicle)"
-msgstr ""
+msgstr "Definir como origen (y desactivar el vehículo)"
msgid "View on map"
msgstr "Ver en el mapa"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sl...@us...> - 2013-01-20 18:17:38
|
Revision: 5347
http://navit.svn.sourceforge.net/navit/?rev=5347&view=rev
Author: sleske
Date: 2013-01-20 18:17:32 +0000 (Sun, 20 Jan 2013)
Log Message:
-----------
Fix:core:Refactoring|Rename, unused variables removed, static added.
Modified Paths:
--------------
trunk/navit/navit/navit.c
trunk/navit/navit/navit.h
trunk/navit/navit/transform.c
Modified: trunk/navit/navit/navit.c
===================================================================
--- trunk/navit/navit/navit.c 2013-01-20 18:17:09 UTC (rev 5346)
+++ trunk/navit/navit/navit.c 2013-01-20 18:17:32 UTC (rev 5347)
@@ -398,7 +398,7 @@
}
static void
-navit_restrict_map_center_to_visible_area(struct transformation *tr, struct coord *new_center){
+navit_restrict_map_center_to_world_boundingbox(struct transformation *tr, struct coord *new_center){
new_center->x = navit_restrict_to_range(new_center->x, WORLD_BOUNDINGBOX_MIN_X, WORLD_BOUNDINGBOX_MAX_X);
new_center->y = navit_restrict_to_range(new_center->y, WORLD_BOUNDINGBOX_MIN_Y, WORLD_BOUNDINGBOX_MAX_Y);
}
@@ -419,12 +419,12 @@
center_old=transform_get_center(tr);
center_new.x=center_old->x+coord_old.x-coord_new.x;
center_new.y=center_old->y+coord_old.y-coord_new.y;
- navit_restrict_map_center_to_visible_area(tr, ¢er_new);
+ navit_restrict_map_center_to_world_boundingbox(tr, ¢er_new);
dbg(1,"change center from 0x%x,0x%x to 0x%x,0x%x\n", center_old->x, center_old->y, center_new.x, center_new.y);
transform_set_center(tr, ¢er_new);
}
-void
+static void
navit_set_timeout(struct navit *this_)
{
struct attr follow;
Modified: trunk/navit/navit/navit.h
===================================================================
--- trunk/navit/navit/navit.h 2013-01-20 18:17:09 UTC (rev 5346)
+++ trunk/navit/navit/navit.h 2013-01-20 18:17:32 UTC (rev 5347)
@@ -64,7 +64,6 @@
int navit_get_height(struct navit *this_);
int navit_ignore_button(struct navit *this_);
void navit_ignore_graphics_events(struct navit *this_, int ignore);
-void navit_set_timeout(struct navit *this_);
int navit_handle_button(struct navit *this_, int pressed, int button, struct point *p, struct callback *popup_callback);
void navit_handle_motion(struct navit *this_, struct point *p);
void navit_zoom_in(struct navit *this_, int factor, struct point *p);
Modified: trunk/navit/navit/transform.c
===================================================================
--- trunk/navit/navit/transform.c 2013-01-20 18:17:09 UTC (rev 5346)
+++ trunk/navit/navit/transform.c 2013-01-20 18:17:32 UTC (rev 5347)
@@ -427,7 +427,6 @@
int xcn, ycn;
struct coord_geo g;
int xc, yc, zc=0, xco=0, yco=0, zco=0;
- int xm,ym,zct;
int zlimit=t->znear;
int visible, visibleo=-1;
int i,j = 0,k=0;
@@ -442,21 +441,16 @@
xc=c1.x;
yc=c1.y;
}
- xm=xc;
- ym=yc;
xc-=t->map_center.x;
yc-=t->map_center.y;
xc >>= t->scale_shift;
yc >>= t->scale_shift;
- xm=xc;
- ym=yc;
xcn=xc*t->m00+yc*t->m01+HOG(*t)*t->m02;
ycn=xc*t->m10+yc*t->m11+HOG(*t)*t->m12;
if (t->ddd) {
zc=(xc*t->m20+yc*t->m21+HOG(*t)*t->m22);
- zct=zc;
zc+=t->offz << POST_SHIFT;
dbg(1,"zc=%d\n", zc);
dbg(1,"zc(%d)=xc(%d)*m20(%d)+yc(%d)*m21(%d)\n", (xc*t->m20+yc*t->m21), xc, t->m20, yc, t->m21);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sl...@us...> - 2013-01-20 18:17:15
|
Revision: 5346
http://navit.svn.sourceforge.net/navit/?rev=5346&view=rev
Author: sleske
Date: 2013-01-20 18:17:09 +0000 (Sun, 20 Jan 2013)
Log Message:
-----------
Fix:core:Refactoring|Extract method clip_line_endoint_to_rect_edge.
Modified Paths:
--------------
trunk/navit/navit/graphics.c
Modified: trunk/navit/navit/graphics.c
===================================================================
--- trunk/navit/navit/graphics.c 2013-01-20 18:16:49 UTC (rev 5345)
+++ trunk/navit/navit/graphics.c 2013-01-20 18:17:09 UTC (rev 5346)
@@ -1547,6 +1547,31 @@
return relative_pos;
}
+static void
+clip_line_endoint_to_rect_edge(struct wpoint *p, int rel_pos, int dx, int dy, int dw, struct point_rect *clip_rect)
+{
+ // We must cast to float to avoid integer
+ // overflow (i.e. undefined behaviour) at high
+ // zoom levels.
+ if (rel_pos & LEFT_OF) {
+ p->y+=(((float)clip_rect->lu.x)-p->x)*dy/dx;
+ p->w+=(((float)clip_rect->lu.x)-p->x)*dw/dx;
+ p->x=clip_rect->lu.x;
+ } else if (rel_pos & RIGHT_OF) {
+ p->y+=(((float)clip_rect->rl.x)-p->x)*dy/dx;
+ p->w+=(((float)clip_rect->rl.x)-p->x)*dw/dx;
+ p->x=clip_rect->rl.x;
+ } else if (rel_pos & ABOVE) {
+ p->x+=(((float)clip_rect->lu.y)-p->y)*dx/dy;
+ p->w+=(((float)clip_rect->lu.y)-p->y)*dw/dy;
+ p->y=clip_rect->lu.y;
+ } else if (rel_pos & BELOW) {
+ p->x+=(((float)clip_rect->rl.y)-p->y)*dx/dy;
+ p->w+=(((float)clip_rect->rl.y)-p->y)*dw/dy;
+ p->y=clip_rect->rl.y;
+ }
+}
+
enum clip_result {
CLIPRES_INVISIBLE = 0,
CLIPRES_VISIBLE = 1,
@@ -1572,46 +1597,11 @@
while ((rel_pos1!=INSIDE) || (rel_pos2!=INSIDE)) {
if (rel_pos1 & rel_pos2)
return CLIPRES_INVISIBLE;
- if (rel_pos1 & LEFT_OF) {
- // We must cast to float to avoid integer
- // overflow (i.e. undefined behaviour) at high
- // zoom levels.
- p1->y+=(((float)clip_rect->lu.x)-p1->x)*dy/dx;
- p1->w+=(((float)clip_rect->lu.x)-p1->x)*dw/dx;
- p1->x=clip_rect->lu.x;
- } else if (rel_pos1 & RIGHT_OF) {
- p1->y+=(((float)clip_rect->rl.x)-p1->x)*dy/dx;
- p1->w+=(((float)clip_rect->rl.x)-p1->x)*dw/dx;
- p1->x=clip_rect->rl.x;
- } else if (rel_pos1 & ABOVE) {
- p1->x+=(((float)clip_rect->lu.y)-p1->y)*dx/dy;
- p1->w+=(((float)clip_rect->lu.y)-p1->y)*dw/dy;
- p1->y=clip_rect->lu.y;
- } else if (rel_pos1 & BELOW) {
- p1->x+=(((float)clip_rect->rl.y)-p1->y)*dx/dy;
- p1->w+=(((float)clip_rect->rl.y)-p1->y)*dw/dy;
- p1->y=clip_rect->rl.y;
- }
+ clip_line_endoint_to_rect_edge(p1, rel_pos1, dx, dy, dw, clip_rect);
rel_pos1=relative_pos(p1, clip_rect);
if (rel_pos1 & rel_pos2)
return CLIPRES_INVISIBLE;
- if (rel_pos2 & LEFT_OF) {
- p2->y+=(((float)clip_rect->lu.x)-p2->x)*dy/dx;
- p2->w+=(((float)clip_rect->lu.x)-p2->x)*dw/dx;
- p2->x=clip_rect->lu.x;
- } else if (rel_pos2 & RIGHT_OF) {
- p2->y+=(((float)clip_rect->rl.x)-p2->x)*dy/dx;
- p2->w+=(((float)clip_rect->rl.x)-p2->x)*dw/dx;
- p2->x=clip_rect->rl.x;
- } else if (rel_pos2 & ABOVE) {
- p2->x+=(((float)clip_rect->lu.y)-p2->y)*dx/dy;
- p2->w+=(((float)clip_rect->lu.y)-p2->y)*dw/dy;
- p2->y=clip_rect->lu.y;
- } else if (rel_pos2 & BELOW) {
- p2->x+=(((float)clip_rect->rl.y)-p2->y)*dx/dy;
- p2->w+=(((float)clip_rect->rl.y)-p2->y)*dw/dy;
- p2->y=clip_rect->rl.y;
- }
+ clip_line_endoint_to_rect_edge(p2, rel_pos2, dx, dy, dw, clip_rect);
rel_pos2=relative_pos(p2, clip_rect);
}
return ret;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sl...@us...> - 2013-01-20 18:16:56
|
Revision: 5345
http://navit.svn.sourceforge.net/navit/?rev=5345&view=rev
Author: sleske
Date: 2013-01-20 18:16:49 +0000 (Sun, 20 Jan 2013)
Log Message:
-----------
Fix:core:Refactor code for polyline clipping|Introduce enums, rename variables, simplify conditions.
Modified Paths:
--------------
trunk/navit/navit/graphics.c
Modified: trunk/navit/navit/graphics.c
===================================================================
--- trunk/navit/navit/graphics.c 2013-01-20 15:01:00 UTC (rev 5344)
+++ trunk/navit/navit/graphics.c 2013-01-20 18:16:49 UTC (rev 5345)
@@ -1524,80 +1524,95 @@
int x,y,w;
};
+enum relative_pos {
+ INSIDE = 0,
+ LEFT_OF = 1,
+ RIGHT_OF = 2,
+ ABOVE = 4,
+ BELOW = 8
+};
+
static int
-clipcode(struct wpoint *p, struct point_rect *r)
+relative_pos(struct wpoint *p, struct point_rect *r)
{
- int code=0;
+ int relative_pos=INSIDE;
if (p->x < r->lu.x)
- code=1;
- if (p->x > r->rl.x)
- code=2;
+ relative_pos=LEFT_OF;
+ else if (p->x > r->rl.x)
+ relative_pos=RIGHT_OF;
if (p->y < r->lu.y)
- code |=4;
- if (p->y > r->rl.y)
- code |=8;
- return code;
+ relative_pos |=ABOVE;
+ else if (p->y > r->rl.y)
+ relative_pos |=BELOW;
+ return relative_pos;
}
+enum clip_result {
+ CLIPRES_INVISIBLE = 0,
+ CLIPRES_VISIBLE = 1,
+ CLIPRES_START_CLIPPED = 2,
+ CLIPRES_END_CLIPPED = 4,
+};
static int
-clip_line(struct wpoint *p1, struct wpoint *p2, struct point_rect *r)
+clip_line(struct wpoint *p1, struct wpoint *p2, struct point_rect *clip_rect)
{
- int code1,code2,ret=1;
+ int rel_pos1,rel_pos2;
+ int ret = CLIPRES_VISIBLE;
int dx,dy,dw;
- code1=clipcode(p1, r);
- if (code1)
- ret |= 2;
- code2=clipcode(p2, r);
- if (code2)
- ret |= 4;
+ rel_pos1=relative_pos(p1, clip_rect);
+ if (rel_pos1!=INSIDE)
+ ret |= CLIPRES_START_CLIPPED;
+ rel_pos2=relative_pos(p2, clip_rect);
+ if (rel_pos2!=INSIDE)
+ ret |= CLIPRES_END_CLIPPED;
dx=p2->x-p1->x;
dy=p2->y-p1->y;
dw=p2->w-p1->w;
- while (code1 || code2) {
- if (code1 & code2)
- return 0;
- if (code1 & 1) {
+ while ((rel_pos1!=INSIDE) || (rel_pos2!=INSIDE)) {
+ if (rel_pos1 & rel_pos2)
+ return CLIPRES_INVISIBLE;
+ if (rel_pos1 & LEFT_OF) {
// We must cast to float to avoid integer
- // overflow (i.e. undefined behaviour) at high
+ // overflow (i.e. undefined behaviour) at high
// zoom levels.
- p1->y+=(((float)r->lu.x)-p1->x)*dy/dx;
- p1->w+=(((float)r->lu.x)-p1->x)*dw/dx;
- p1->x=r->lu.x;
- } else if (code1 & 2) {
- p1->y+=(((float)r->rl.x)-p1->x)*dy/dx;
- p1->w+=(((float)r->rl.x)-p1->x)*dw/dx;
- p1->x=r->rl.x;
- } else if (code1 & 4) {
- p1->x+=(((float)r->lu.y)-p1->y)*dx/dy;
- p1->w+=(((float)r->lu.y)-p1->y)*dw/dy;
- p1->y=r->lu.y;
- } else if (code1 & 8) {
- p1->x+=(((float)r->rl.y)-p1->y)*dx/dy;
- p1->w+=(((float)r->rl.y)-p1->y)*dw/dy;
- p1->y=r->rl.y;
+ p1->y+=(((float)clip_rect->lu.x)-p1->x)*dy/dx;
+ p1->w+=(((float)clip_rect->lu.x)-p1->x)*dw/dx;
+ p1->x=clip_rect->lu.x;
+ } else if (rel_pos1 & RIGHT_OF) {
+ p1->y+=(((float)clip_rect->rl.x)-p1->x)*dy/dx;
+ p1->w+=(((float)clip_rect->rl.x)-p1->x)*dw/dx;
+ p1->x=clip_rect->rl.x;
+ } else if (rel_pos1 & ABOVE) {
+ p1->x+=(((float)clip_rect->lu.y)-p1->y)*dx/dy;
+ p1->w+=(((float)clip_rect->lu.y)-p1->y)*dw/dy;
+ p1->y=clip_rect->lu.y;
+ } else if (rel_pos1 & BELOW) {
+ p1->x+=(((float)clip_rect->rl.y)-p1->y)*dx/dy;
+ p1->w+=(((float)clip_rect->rl.y)-p1->y)*dw/dy;
+ p1->y=clip_rect->rl.y;
}
- code1=clipcode(p1, r);
- if (code1 & code2)
- return 0;
- if (code2 & 1) {
- p2->y+=(((float)r->lu.x)-p2->x)*dy/dx;
- p2->w+=(((float)r->lu.x)-p2->x)*dw/dx;
- p2->x=r->lu.x;
- } else if (code2 & 2) {
- p2->y+=(((float)r->rl.x)-p2->x)*dy/dx;
- p2->w+=(((float)r->rl.x)-p2->x)*dw/dx;
- p2->x=r->rl.x;
- } else if (code2 & 4) {
- p2->x+=(((float)r->lu.y)-p2->y)*dx/dy;
- p2->w+=(((float)r->lu.y)-p2->y)*dw/dy;
- p2->y=r->lu.y;
- } else if (code2 & 8) {
- p2->x+=(((float)r->rl.y)-p2->y)*dx/dy;
- p2->w+=(((float)r->rl.y)-p2->y)*dw/dy;
- p2->y=r->rl.y;
+ rel_pos1=relative_pos(p1, clip_rect);
+ if (rel_pos1 & rel_pos2)
+ return CLIPRES_INVISIBLE;
+ if (rel_pos2 & LEFT_OF) {
+ p2->y+=(((float)clip_rect->lu.x)-p2->x)*dy/dx;
+ p2->w+=(((float)clip_rect->lu.x)-p2->x)*dw/dx;
+ p2->x=clip_rect->lu.x;
+ } else if (rel_pos2 & RIGHT_OF) {
+ p2->y+=(((float)clip_rect->rl.x)-p2->x)*dy/dx;
+ p2->w+=(((float)clip_rect->rl.x)-p2->x)*dw/dx;
+ p2->x=clip_rect->rl.x;
+ } else if (rel_pos2 & ABOVE) {
+ p2->x+=(((float)clip_rect->lu.y)-p2->y)*dx/dy;
+ p2->w+=(((float)clip_rect->lu.y)-p2->y)*dw/dy;
+ p2->y=clip_rect->lu.y;
+ } else if (rel_pos2 & BELOW) {
+ p2->x+=(((float)clip_rect->rl.y)-p2->y)*dx/dy;
+ p2->w+=(((float)clip_rect->rl.y)-p2->y)*dw/dy;
+ p2->y=clip_rect->rl.y;
}
- code2=clipcode(p2, r);
+ rel_pos2=relative_pos(p2, clip_rect);
}
return ret;
}
@@ -1605,10 +1620,11 @@
static void
graphics_draw_polyline_clipped(struct graphics *gra, struct graphics_gc *gc, struct point *pa, int count, int *width, int step, int poly)
{
- struct point *p=g_alloca(sizeof(struct point)*(count+1));
+ struct point *points_to_draw=g_alloca(sizeof(struct point)*(count+1));
int *w=g_alloca(sizeof(int)*(count*step+1));
- struct wpoint p1,p2;
- int i,code,out=0;
+ struct wpoint segment_start,segment_end;
+ int i,points_to_draw_cnt=0;
+ int clip_result;
int wmax;
struct point_rect r=gra->r;
@@ -1625,35 +1641,37 @@
r.lu.y-=wmax;
r.rl.x+=wmax;
r.rl.y+=wmax;
+ // Iterate over line segments, push them into points_to_draw
+ // until we reach a completely invisible segment...
for (i = 0 ; i < count ; i++) {
if (i) {
- p1.x=pa[i-1].x;
- p1.y=pa[i-1].y;
- p1.w=width[(i-1)*step];
- p2.x=pa[i].x;
- p2.y=pa[i].y;
- p2.w=width[i*step];
- /* 0 = invisible, 1 = completely visible, 3 = start point clipped, 5 = end point clipped, 7 both points clipped */
- code=clip_line(&p1, &p2, &r);
- if (((code == 1 || code == 5) && i == 1) || (code & 2)) {
- p[out].x=p1.x;
- p[out].y=p1.y;
- w[out*step]=p1.w;
- out++;
+ segment_start.x=pa[i-1].x;
+ segment_start.y=pa[i-1].y;
+ segment_start.w=width[(i-1)*step];
+ segment_end.x=pa[i].x;
+ segment_end.y=pa[i].y;
+ segment_end.w=width[i*step];
+ clip_result=clip_line(&segment_start, &segment_end, &r);
+ if (clip_result != CLIPRES_INVISIBLE) {
+ if ((i == 1) || (clip_result & CLIPRES_START_CLIPPED)) {
+ points_to_draw[points_to_draw_cnt].x=segment_start.x;
+ points_to_draw[points_to_draw_cnt].y=segment_start.y;
+ w[points_to_draw_cnt*step]=segment_start.w;
+ points_to_draw_cnt++;
+ }
+ points_to_draw[points_to_draw_cnt].x=segment_end.x;
+ points_to_draw[points_to_draw_cnt].y=segment_end.y;
+ w[points_to_draw_cnt*step]=segment_end.w;
+ points_to_draw_cnt++;
}
- if (code) {
- p[out].x=p2.x;
- p[out].y=p2.y;
- w[out*step]=p2.w;
- out++;
- }
- if (i == count-1 || (code & 4)) {
- if (out > 1) {
+ if ((i == count-1) || (clip_result & CLIPRES_END_CLIPPED)) {
+ // ... then draw the resulting polyline
+ if (points_to_draw_cnt > 1) {
if (poly) {
- graphics_draw_polyline_as_polygon(gra, gc, p, out, w, step);
+ graphics_draw_polyline_as_polygon(gra, gc, points_to_draw, points_to_draw_cnt, w, step);
} else
- gra->meth.draw_lines(gra->priv, gc->priv, p, out);
- out=0;
+ gra->meth.draw_lines(gra->priv, gc->priv, points_to_draw, points_to_draw_cnt);
+ points_to_draw_cnt=0;
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-01-20 15:01:07
|
Revision: 5344
http://navit.svn.sourceforge.net/navit/?rev=5344&view=rev
Author: martin-s
Date: 2013-01-20 15:01:00 +0000 (Sun, 20 Jan 2013)
Log Message:
-----------
Fix:Core:Improved config object handling
Modified Paths:
--------------
trunk/navit/navit/attr.c
trunk/navit/navit/attr.h
trunk/navit/navit/config_.c
trunk/navit/navit/xmlconfig.c
trunk/navit/navit/xmlconfig.h
Modified: trunk/navit/navit/attr.c
===================================================================
--- trunk/navit/navit/attr.c 2013-01-20 10:21:32 UTC (rev 5343)
+++ trunk/navit/navit/attr.c 2013-01-20 15:01:00 UTC (rev 5344)
@@ -462,6 +462,24 @@
}
struct attr **
+attr_generic_prepend_attr(struct attr **attrs, struct attr *attr)
+{
+ struct attr **curr=attrs;
+ int i,count=0;
+ while (curr && *curr) {
+ curr++;
+ count++;
+ }
+ curr=g_new0(struct attr *, count+2);
+ for (i = 0 ; i < count ; i++)
+ curr[i+1]=attrs[i];
+ curr[0]=attr_dup(attr);
+ curr[count+1]=NULL;
+ g_free(attrs);
+ return curr;
+}
+
+struct attr **
attr_generic_remove_attr(struct attr **attrs, struct attr *attr)
{
struct attr **curr=attrs;
Modified: trunk/navit/navit/attr.h
===================================================================
--- trunk/navit/navit/attr.h 2013-01-20 10:21:32 UTC (rev 5343)
+++ trunk/navit/navit/attr.h 2013-01-20 15:01:00 UTC (rev 5344)
@@ -180,6 +180,7 @@
int attr_generic_get_attr(struct attr **attrs, struct attr **def_attrs, enum attr_type type, struct attr *attr, struct attr_iter *iter);
struct attr **attr_generic_set_attr(struct attr **attrs, struct attr *attr);
struct attr **attr_generic_add_attr(struct attr **attrs, struct attr *attr);
+struct attr **attr_generic_prepend_attr(struct attr **attrs, struct attr *attr);
struct attr **attr_generic_remove_attr(struct attr **attrs, struct attr *attr);
enum attr_type attr_type_begin(enum attr_type type);
int attr_data_size(struct attr *attr);
Modified: trunk/navit/navit/config_.c
===================================================================
--- trunk/navit/navit/config_.c 2013-01-20 10:21:32 UTC (rev 5343)
+++ trunk/navit/navit/config_.c 2013-01-20 15:01:00 UTC (rev 5344)
@@ -22,6 +22,7 @@
#include <signal.h>
#include "debug.h"
#include "item.h"
+#include "xmlconfig.h"
#include "callback.h"
#include "navit.h"
#include "config_.h"
@@ -30,8 +31,7 @@
#endif
struct config {
- struct attr **attrs;
- struct callback_list *cbl;
+ NAVIT_OBJECT
} *config;
struct config *
@@ -52,7 +52,6 @@
config_destroy(struct config *this_)
{
attr_list_free(this_->attrs);
- callback_list_destroy(this_->cbl);
g_free(config);
exit(0);
}
@@ -68,7 +67,6 @@
config_new_int(void)
{
config=g_new0(struct config, 1);
- config->cbl=callback_list_new();
#ifndef HAVE_API_WIN32_CE
signal(SIGTERM, config_terminate);
#ifndef HAVE_API_WIN32
@@ -102,7 +100,10 @@
int
config_set_attr(struct config *this_, struct attr *attr)
{
- return config_set_attr_int(this_, attr);
+ if (config_set_attr_int(this_, attr))
+ return navit_object_set_attr((struct navit_object *)this_, attr);
+ else
+ return 0;
}
int
@@ -112,39 +113,25 @@
config_new_int();
this_=config;
}
- switch (attr->type) {
- case attr_callback:
- callback_list_add(this_->cbl, attr->u.callback);
- default:
- this_->attrs=attr_generic_add_attr(this_->attrs, attr);
- }
- callback_list_call_attr_2(this_->cbl, attr->type, attr->u.data, 1);
- return 1;
+ return navit_object_add_attr((struct navit_object *)this_, attr);
}
int
config_remove_attr(struct config *this_, struct attr *attr)
{
- switch (attr->type) {
- case attr_callback:
- callback_list_remove(this_->cbl, attr->u.callback);
- default:
- this_->attrs=attr_generic_remove_attr(this_->attrs, attr);
- }
- callback_list_call_attr_2(this_->cbl, attr->type, attr->u.data, -1);
- return 1;
+ return navit_object_remove_attr((struct navit_object *)this_, attr);
}
struct attr_iter *
config_attr_iter_new()
{
- return g_new0(struct attr_iter, 1);
+ return navit_object_attr_iter_new();
}
void
config_attr_iter_destroy(struct attr_iter *iter)
{
- g_free(iter);
+ navit_object_attr_iter_destroy(iter);
}
@@ -161,6 +148,8 @@
}
if (!config)
config_new_int();
+ config->func=&config_func;
+ navit_object_ref((struct navit_object *)config);
config->attrs=attr_list_dup(attrs);
while (*attrs) {
if (!config_set_attr_int(config,*attrs)) {
@@ -174,3 +163,19 @@
configured=1;
return config;
}
+
+struct object_func config_func = {
+ attr_config,
+ (object_func_new)config_new,
+ (object_func_get_attr)navit_object_get_attr,
+ (object_func_iter_new)navit_object_attr_iter_new,
+ (object_func_iter_destroy)navit_object_attr_iter_destroy,
+ (object_func_set_attr)config_set_attr,
+ (object_func_add_attr)config_add_attr,
+ (object_func_remove_attr)navit_object_remove_attr,
+ (object_func_init)NULL,
+ (object_func_destroy)NULL,
+ (object_func_dup)NULL,
+ (object_func_ref)navit_object_ref,
+ (object_func_unref)navit_object_unref,
+};
Modified: trunk/navit/navit/xmlconfig.c
===================================================================
--- trunk/navit/navit/xmlconfig.c 2013-01-20 10:21:32 UTC (rev 5343)
+++ trunk/navit/navit/xmlconfig.c 2013-01-20 15:01:00 UTC (rev 5344)
@@ -51,6 +51,7 @@
#include "announcement.h"
#include "vehicleprofile.h"
#include "roadprofile.h"
+#include "callback.h"
#include "config_.h"
#if (defined __MINGW32__) || (defined _MSC_VER)
@@ -246,7 +247,6 @@
{ attr_announcement,NEW(announcement_new), GET(announcement_get_attr), NULL, NULL, SET(announcement_set_attr), ADD(announcement_add_attr) },
{ attr_arrows, NEW(arrows_new)},
{ attr_circle, NEW(circle_new), NULL, NULL, NULL, NULL, ADD(element_add_attr)},
- { attr_config, NEW(config_new), GET(config_get_attr), ITERN(config_attr_iter_new), ITERD(config_attr_iter_destroy), SET(config_set_attr), ADD(config_add_attr), REMOVE(config_remove_attr), NULL, DESTROY(config_destroy)},
{ attr_coord, NEW(coord_new_from_attrs)},
{ attr_cursor, NEW(cursor_new), NULL, NULL, NULL, NULL, ADD(cursor_add_attr)},
{ attr_debug, NEW(debug_new)},
@@ -273,6 +273,8 @@
{
int i;
switch (type) {
+ case attr_config:
+ return &config_func;
case attr_layer:
return &layer_func;
case attr_layout:
@@ -1245,3 +1247,73 @@
obj->func->destroy(obj);
}
}
+
+struct attr_iter {
+ void *last;
+};
+
+struct attr_iter *
+navit_object_attr_iter_new(void)
+{
+ return g_new0(struct attr_iter, 1);
+}
+
+void
+navit_object_attr_iter_destroy(struct attr_iter *iter)
+{
+ g_free(iter);
+}
+
+int
+navit_object_get_attr(struct navit_object *obj, enum attr_type type, struct attr *attr, struct attr_iter *iter)
+{
+ return attr_generic_get_attr(obj->attrs, NULL, type, attr, iter);
+}
+
+int
+navit_object_set_attr(struct navit_object *obj, struct attr *attr)
+{
+ obj->attrs=attr_generic_set_attr(obj->attrs, attr);
+ if (obj->attrs && obj->attrs[0] && obj->attrs[0]->type == attr_callback_list)
+ callback_list_call_attr_2(obj->attrs[0]->u.callback_list, attr->type, attr->u.data, 0);
+ return 1;
+}
+
+int
+navit_object_add_attr(struct navit_object *obj, struct attr *attr)
+{
+ if (attr->type == attr_callback) {
+ struct callback_list *cbl;
+ if (obj->attrs && obj->attrs[0] && obj->attrs[0]->type == attr_callback_list)
+ cbl=obj->attrs[0]->u.callback_list;
+ else {
+ struct attr attr;
+ cbl=callback_list_new();
+ attr.type=attr_callback_list;
+ attr.u.callback_list=cbl;
+ obj->attrs=attr_generic_prepend_attr(obj->attrs, &attr);
+ }
+ callback_list_add(cbl, attr->u.callback);
+ return 1;
+ }
+ obj->attrs=attr_generic_add_attr(obj->attrs, attr);
+ if (obj->attrs && obj->attrs[0] && obj->attrs[0]->type == attr_callback_list)
+ callback_list_call_attr_2(obj->attrs[0]->u.callback_list, attr->type, attr->u.data, 1);
+ return 1;
+}
+
+int
+navit_object_remove_attr(struct navit_object *obj, struct attr *attr)
+{
+ if (attr->type == attr_callback) {
+ if (obj->attrs && obj->attrs[0] && obj->attrs[0]->type == attr_callback_list) {
+ callback_list_remove(obj->attrs[0]->u.callback_list, attr->u.callback);
+ return 1;
+ } else
+ return 0;
+ }
+ obj->attrs=attr_generic_remove_attr(obj->attrs, attr);
+ if (obj->attrs && obj->attrs[0] && obj->attrs[0]->type == attr_callback_list)
+ callback_list_call_attr_2(obj->attrs[0]->u.callback_list, attr->type, attr->u.data, -1);
+ return 1;
+}
Modified: trunk/navit/navit/xmlconfig.h
===================================================================
--- trunk/navit/navit/xmlconfig.h 2013-01-20 10:21:32 UTC (rev 5343)
+++ trunk/navit/navit/xmlconfig.h 2013-01-20 15:01:00 UTC (rev 5344)
@@ -54,9 +54,9 @@
void *(*unref)(void *);
};
-extern struct object_func map_func, mapset_func, navit_func, tracking_func, vehicle_func, maps_func, layout_func, vehicleprofile_func, layer_func;
+extern struct object_func map_func, mapset_func, navit_func, tracking_func, vehicle_func, maps_func, layout_func, vehicleprofile_func, layer_func, config_func;
-#define HAS_OBJECT_FUNC(x) ((x) == attr_map || (x) == attr_mapset || (x) == attr_navit || (x) == attr_trackingo || (x) == attr_vehicle || (x) == attr_maps || (x) == attr_layout || (x) == attr_vehicleprofile || (x) == attr_layer)
+#define HAS_OBJECT_FUNC(x) ((x) == attr_map || (x) == attr_mapset || (x) == attr_navit || (x) == attr_trackingo || (x) == attr_vehicle || (x) == attr_maps || (x) == attr_layout || (x) == attr_vehicleprofile || (x) == attr_layer || (x) == attr_config)
#define NAVIT_OBJECT struct object_func *func; int refcount; struct attr **attrs;
struct navit_object {
@@ -65,6 +65,12 @@
struct navit_object *navit_object_ref(struct navit_object *obj);
void navit_object_unref(struct navit_object *obj);
+struct attr_iter * navit_object_attr_iter_new(void);
+void navit_object_attr_iter_destroy(struct attr_iter *iter);
+int navit_object_get_attr(struct navit_object *obj, enum attr_type type, struct attr *attr, struct attr_iter *iter);
+int navit_object_set_attr(struct navit_object *obj, struct attr *attr);
+int navit_object_add_attr(struct navit_object *obj, struct attr *attr);
+int navit_object_remove_attr(struct navit_object *obj, struct attr *attr);
typedef GError xmlerror;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-01-20 10:21:41
|
Revision: 5343
http://navit.svn.sourceforge.net/navit/?rev=5343&view=rev
Author: martin-s
Date: 2013-01-20 10:21:32 +0000 (Sun, 20 Jan 2013)
Log Message:
-----------
Fix:Core:Fix vs compile
Modified Paths:
--------------
trunk/navit/navit/graphics.c
Modified: trunk/navit/navit/graphics.c
===================================================================
--- trunk/navit/navit/graphics.c 2013-01-20 09:06:37 UTC (rev 5342)
+++ trunk/navit/navit/graphics.c 2013-01-20 10:21:32 UTC (rev 5343)
@@ -2128,9 +2128,10 @@
{
while (layers) {
struct layer *layer=layers->data;
+ GList *itemgras;
if (layer->ref)
layer=layer->ref;
- GList *itemgras=layer->itemgras;
+ itemgras=layer->itemgras;
while (itemgras) {
struct itemgra *itemgra=itemgras->data;
GList *types=itemgra->type;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-01-20 09:07:28
|
Revision: 5342
http://navit.svn.sourceforge.net/navit/?rev=5342&view=rev
Author: martin-s
Date: 2013-01-20 09:06:37 +0000 (Sun, 20 Jan 2013)
Log Message:
-----------
Fix:Core:Compile problems with r5340
Revision Links:
--------------
http://navit.svn.sourceforge.net/navit/?rev=5340&view=rev
Modified Paths:
--------------
trunk/navit/navit/binding/win32/binding_win32.c
trunk/navit/navit/plugin/pedestrian/pedestrian.c
Modified: trunk/navit/navit/binding/win32/binding_win32.c
===================================================================
--- trunk/navit/navit/binding/win32/binding_win32.c 2013-01-19 21:16:08 UTC (rev 5341)
+++ trunk/navit/navit/binding/win32/binding_win32.c 2013-01-20 09:06:37 UTC (rev 5342)
@@ -28,6 +28,7 @@
#include "plugin.h"
#include "debug.h"
#include "item.h"
+#include "xmlconfig.h"
#include "attr.h"
#include "layout.h"
#include "navigation.h"
Modified: trunk/navit/navit/plugin/pedestrian/pedestrian.c
===================================================================
--- trunk/navit/navit/plugin/pedestrian/pedestrian.c 2013-01-19 21:16:08 UTC (rev 5341)
+++ trunk/navit/navit/plugin/pedestrian/pedestrian.c 2013-01-20 09:06:37 UTC (rev 5342)
@@ -30,6 +30,7 @@
#include <sys/ioctl.h>
#include "config.h"
#include <navit/item.h>
+#include <navit/xmlconfig.h>
#include <navit/main.h>
#include <navit/debug.h>
#include <navit/point.h>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2013-01-19 21:16:15
|
Revision: 5341
http://navit.svn.sourceforge.net/navit/?rev=5341&view=rev
Author: mdankov
Date: 2013-01-19 21:16:08 +0000 (Sat, 19 Jan 2013)
Log Message:
-----------
Fix:gui_internal:Do not crash in POI filter if Navigation map is enabled.
Modified Paths:
--------------
trunk/navit/navit/gui/internal/gui_internal_poi.c
Modified: trunk/navit/navit/gui/internal/gui_internal_poi.c
===================================================================
--- trunk/navit/navit/gui/internal/gui_internal_poi.c 2013-01-19 18:56:41 UTC (rev 5340)
+++ trunk/navit/navit/gui/internal/gui_internal_poi.c 2013-01-19 21:16:08 UTC (rev 5341)
@@ -386,7 +386,6 @@
}
long_name=removecase(s);
g_free(s);
- item_attr_rewind(item);
match=0;
for(i=0;i<3 && !match;i++) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-01-19 18:56:51
|
Revision: 5340
http://navit.svn.sourceforge.net/navit/?rev=5340&view=rev
Author: martin-s
Date: 2013-01-19 18:56:41 +0000 (Sat, 19 Jan 2013)
Log Message:
-----------
Add:Core:Allow layer tag to reference layers within navit context, object handling cleanup
Modified Paths:
--------------
trunk/navit/navit/attr.h
trunk/navit/navit/attr_def.h
trunk/navit/navit/binding/dbus/binding_dbus.c
trunk/navit/navit/graphics.c
trunk/navit/navit/gui/gtk/gui_gtk_window.c
trunk/navit/navit/gui/internal/gui_internal.c
trunk/navit/navit/gui/internal/gui_internal_command.c
trunk/navit/navit/gui/internal/gui_internal_poi.c
trunk/navit/navit/layout.c
trunk/navit/navit/layout.h
trunk/navit/navit/map.c
trunk/navit/navit/maps.c
trunk/navit/navit/mapset.c
trunk/navit/navit/navigation.c
trunk/navit/navit/navit.c
trunk/navit/navit/osd/core/osd_core.c
trunk/navit/navit/route.c
trunk/navit/navit/search.c
trunk/navit/navit/track.c
trunk/navit/navit/vehicle.c
trunk/navit/navit/vehicleprofile.c
trunk/navit/navit/vehicleprofile.h
trunk/navit/navit/xmlconfig.c
trunk/navit/navit/xmlconfig.h
Modified: trunk/navit/navit/attr.h
===================================================================
--- trunk/navit/navit/attr.h 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/attr.h 2013-01-19 18:56:41 UTC (rev 5340)
@@ -159,6 +159,7 @@
struct config *config;
struct osd *osd;
struct range range;
+ struct navit_object *navit_object;
int *dash;
enum item_type *item_types;
enum attr_type *attr_types;
Modified: trunk/navit/navit/attr_def.h
===================================================================
--- trunk/navit/navit/attr_def.h 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/attr_def.h 2013-01-19 18:56:41 UTC (rev 5340)
@@ -358,6 +358,7 @@
ATTR(state_file)
ATTR(on_map_click)
ATTR(route_depth)
+ATTR(ref)
ATTR2(0x0003ffff,type_string_end)
ATTR2(0x00040000,type_special_begin)
ATTR(order)
Modified: trunk/navit/navit/binding/dbus/binding_dbus.c
===================================================================
--- trunk/navit/navit/binding/dbus/binding_dbus.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/binding/dbus/binding_dbus.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -30,6 +30,7 @@
#include "plugin.h"
#include "debug.h"
#include "item.h"
+#include "xmlconfig.h"
#include "attr.h"
#include "layout.h"
#include "navigation.h"
Modified: trunk/navit/navit/graphics.c
===================================================================
--- trunk/navit/navit/graphics.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/graphics.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -38,6 +38,7 @@
#include "graphics.h"
#include "projection.h"
#include "item.h"
+#include "xmlconfig.h"
#include "map.h"
#include "coord.h"
#include "transform.h"
@@ -2105,8 +2106,11 @@
lays=l->layers;
while (lays) {
lay=lays->data;
- if (lay->active)
+ if (lay->active) {
+ if (lay->ref)
+ lay=lay->ref;
xdisplay_draw_layer(display_list, gra, lay, order);
+ }
lays=g_list_next(lays);
}
}
@@ -2124,6 +2128,8 @@
{
while (layers) {
struct layer *layer=layers->data;
+ if (layer->ref)
+ layer=layer->ref;
GList *itemgras=layer->itemgras;
while (itemgras) {
struct itemgra *itemgra=itemgras->data;
Modified: trunk/navit/navit/gui/gtk/gui_gtk_window.c
===================================================================
--- trunk/navit/navit/gui/gtk/gui_gtk_window.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/gui/gtk/gui_gtk_window.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -29,6 +29,7 @@
#include <gtk/gtk.h>
#include "config.h"
#include "item.h"
+#include "xmlconfig.h"
#include "navit.h"
#include "debug.h"
#include "gui.h"
Modified: trunk/navit/navit/gui/internal/gui_internal.c
===================================================================
--- trunk/navit/navit/gui/internal/gui_internal.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/gui/internal/gui_internal.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -41,6 +41,7 @@
#include <sys/time.h>
#endif /* _MSC_VER */
#include "item.h"
+#include "xmlconfig.h"
#include "file.h"
#include "navit.h"
#include "navit_nls.h"
@@ -52,7 +53,6 @@
#include "transform.h"
#include "color.h"
#include "map.h"
-#include "layout.h"
#include "callback.h"
#include "vehicle.h"
#include "vehicleprofile.h"
@@ -70,7 +70,6 @@
#include "navigation.h"
#include "gui_internal.h"
#include "command.h"
-#include "xmlconfig.h"
#include "util.h"
#include "bookmarks.h"
#include "linguistics.h"
Modified: trunk/navit/navit/gui/internal/gui_internal_command.c
===================================================================
--- trunk/navit/navit/gui/internal/gui_internal_command.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/gui/internal/gui_internal_command.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -15,6 +15,7 @@
#include "navit_nls.h"
#include "command.h"
#include "attr.h"
+#include "xmlconfig.h"
#include "event.h"
#include "config_.h"
#include "map.h"
Modified: trunk/navit/navit/gui/internal/gui_internal_poi.c
===================================================================
--- trunk/navit/navit/gui/internal/gui_internal_poi.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/gui/internal/gui_internal_poi.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -9,6 +9,7 @@
#include "navit.h"
#include "navit_nls.h"
#include "item.h"
+#include "xmlconfig.h"
#include "map.h"
#include "mapset.h"
#include "layout.h"
Modified: trunk/navit/navit/layout.c
===================================================================
--- trunk/navit/navit/layout.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/layout.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -21,10 +21,10 @@
#include <string.h>
#include "item.h"
#include "attr.h"
+#include "xmlconfig.h"
#include "layout.h"
#include "coord.h"
#include "debug.h"
-#include "xmlconfig.h"
struct layout * layout_new(struct attr *parent, struct attr **attrs)
@@ -36,6 +36,8 @@
if (! (name_attr=attr_search(attrs, NULL, attr_name)))
return NULL;
l = g_new0(struct layout, 1);
+ l->func=&layout_func;
+ navit_object_ref((struct navit_object *)l);
l->name = g_strdup(name_attr->u.str);
if ((font_attr=attr_search(attrs, NULL, attr_font))) {
l->font = g_strdup(font_attr->u.str);
@@ -54,9 +56,20 @@
l->order_delta=order_delta_attr->u.num;
if ((active_attr=attr_search(attrs, NULL, attr_active)))
l->active = active_attr->u.num;
+ l->navit=parent->u.navit;
return l;
}
+void
+layout_destroy(struct layout *layout)
+{
+ attr_list_free(layout->attrs);
+ g_free(layout->font);
+ g_free(layout->dayname);
+ g_free(layout->nightname);
+ g_free(layout);
+}
+
struct attr_iter {
GList *last;
};
@@ -123,13 +136,15 @@
switch (attr->type) {
case attr_cursor:
layout->cursors = g_list_append(layout->cursors, attr->u.cursor);
- return 1;
+ break;
case attr_layer:
layout->layers = g_list_append(layout->layers, attr->u.layer);
- return 1;
+ break;
default:
return 0;
}
+ layout->attrs=attr_generic_add_attr(layout->attrs, attr);
+ return 1;
}
/**
@@ -222,6 +237,9 @@
static int
layer_set_attr_do(struct layer *l, struct attr *attr, int init)
{
+ struct attr_iter *iter;
+ struct navit_object *obj;
+ struct attr layer;
switch (attr->type) {
case attr_active:
l->active = attr->u.num;
@@ -233,6 +251,18 @@
g_free(l->name);
l->name = g_strdup(attr->u.str);
return 1;
+ case attr_ref:
+ navit_object_unref((struct navit_object *)l->ref);
+ l->ref=NULL;
+ obj=(struct navit_object *)l->navit;
+ iter=obj->func->iter_new(obj);
+ while (obj->func->get_attr(obj, attr_layer, &layer, iter)) {
+ if (!strcmp(layer.u.layer->name, attr->u.str)) {
+ l->ref=navit_object_ref(layer.u.navit_object);
+ break;
+ }
+ }
+ obj->func->iter_destroy(iter);
default:
return 0;
}
@@ -245,6 +275,10 @@
struct layer *l;
l = g_new0(struct layer, 1);
+ if (parent->type == attr_layout)
+ l->navit=parent->u.layout->navit;
+ l->func=&layer_func;
+ navit_object_ref((struct navit_object *)l);
l->active=1;
for (;*attrs; attrs++) {
layer_set_attr_do(l, *attrs, 1);
@@ -293,6 +327,14 @@
return layer_set_attr_do(layer, attr, 0);
}
+void
+layer_destroy(struct layer *layer)
+{
+ attr_list_free(layer->attrs);
+ g_free(layer->name);
+ g_free(layer);
+}
+
struct itemgra * itemgra_new(struct attr *parent, struct attr **attrs)
{
struct itemgra *itm;
@@ -588,7 +630,23 @@
(object_func_init)NULL,
(object_func_destroy)NULL,
(object_func_dup)NULL,
- (object_func_ref)NULL,
- (object_func_unref)NULL,
+ (object_func_ref)navit_object_ref,
+ (object_func_unref)navit_object_unref,
};
+
+struct object_func layer_func = {
+ attr_layer,
+ (object_func_new)layer_new,
+ (object_func_get_attr)layer_get_attr,
+ (object_func_iter_new)NULL,
+ (object_func_iter_destroy)NULL,
+ (object_func_set_attr)layer_set_attr,
+ (object_func_add_attr)layer_add_attr,
+ (object_func_remove_attr)NULL,
+ (object_func_init)NULL,
+ (object_func_destroy)layer_destroy,
+ (object_func_dup)NULL,
+ (object_func_ref)navit_object_ref,
+ (object_func_unref)navit_object_unref,
+};
Modified: trunk/navit/navit/layout.h
===================================================================
--- trunk/navit/navit/layout.h 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/layout.h 2013-01-19 18:56:41 UTC (rev 5340)
@@ -75,10 +75,13 @@
};
struct layer {
+ NAVIT_OBJECT
+ struct navit *navit;
char *name;
int details;
GList *itemgras;
int active;
+ struct layer *ref;
};
struct cursor {
@@ -89,7 +92,19 @@
int interval;
};
-struct layout { char *name; char* dayname; char* nightname; char *font; struct color color; GList *layers; GList *cursors; int order_delta; int active; };
+struct layout {
+ NAVIT_OBJECT
+ struct navit *navit;
+ char *name;
+ char* dayname;
+ char* nightname;
+ char *font;
+ struct color color;
+ GList *layers;
+ GList *cursors;
+ int order_delta;
+ int active;
+};
/* prototypes */
enum attr_type;
Modified: trunk/navit/navit/map.c
===================================================================
--- trunk/navit/navit/map.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/map.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -58,9 +58,7 @@
* This structure holds information about a map.
*/
struct map {
- struct object_func *func; /**< Object functions */
- int refcount; /**< Reference count */
- struct attr **attrs; /**< Attributes of this map */
+ NAVIT_OBJECT
struct map_methods meth; /**< Structure with pointers to the map plugin's functions */
struct map_priv *priv; /**< Private data of the map, only known to the map plugin */
struct callback_list *attr_cbl; /**< List of callbacks that are called when attributes change */
@@ -110,7 +108,7 @@
m=g_new0(struct map, 1);
m->attrs=attr_list_dup(attrs);
m->func=&map_func;
- m->refcount = 1;
+ navit_object_ref((struct navit_object *)m);
m->attr_cbl=callback_list_new();
m->priv=maptype_new(&m->meth, attrs, m->attr_cbl);
if (! m->priv) {
@@ -120,14 +118,6 @@
return m;
}
-struct map *
-map_ref(struct map* m)
-{
- m->refcount++;
- return m;
-}
-
-
/**
* @brief Gets an attribute from a map
*
@@ -289,16 +279,6 @@
g_free(m);
}
-void
-map_unref(struct map *m)
-{
- if(!m)
- return;
- m->refcount--;
- if (m->refcount <= 0)
- map_destroy(m);
-}
-
/**
* @brief Creates a new map rect
*
@@ -733,8 +713,8 @@
(object_func_init)NULL,
(object_func_destroy)map_destroy,
(object_func_dup)NULL,
- (object_func_ref)map_ref,
- (object_func_unref)map_unref,
+ (object_func_ref)navit_object_ref,
+ (object_func_unref)navit_object_unref,
};
Modified: trunk/navit/navit/maps.c
===================================================================
--- trunk/navit/navit/maps.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/maps.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -73,7 +73,7 @@
if (map.u.map) {
mapset_add_attr(parent->u.mapset, &map);
- map_unref(map.u.map);
+ navit_object_unref(map.u.navit_object);
}
}
Modified: trunk/navit/navit/mapset.c
===================================================================
--- trunk/navit/navit/mapset.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/mapset.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -42,9 +42,7 @@
* This structure holds a complete mapset
*/
struct mapset {
- struct object_func *func;
- int refcount;
- struct attr **attrs;
+ NAVIT_OBJECT
GList *maps; /**< Linked list of all the maps in the mapset */
};
@@ -63,7 +61,7 @@
ms=g_new0(struct mapset, 1);
ms->func=&mapset_func;
- ms->refcount=1;
+ navit_object_ref((struct navit_object *)ms);
ms->attrs=attr_list_dup(attrs);
return ms;
@@ -160,22 +158,6 @@
g_free(ms);
}
-struct mapset *
-mapset_ref(struct mapset* m)
-{
- m->refcount++;
- return m;
-}
-
-
-void
-mapset_unref(struct mapset *m)
-{
- m->refcount--;
- if (m->refcount <= 0)
- mapset_destroy(m);
-}
-
/**
* @brief Handle for a mapset in use
*
@@ -410,8 +392,8 @@
(object_func_init)NULL,
(object_func_destroy)mapset_destroy,
(object_func_dup)mapset_dup,
- (object_func_ref)mapset_ref,
- (object_func_unref)mapset_unref,
+ (object_func_ref)navit_object_ref,
+ (object_func_unref)navit_object_unref,
};
Modified: trunk/navit/navit/navigation.c
===================================================================
--- trunk/navit/navit/navigation.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/navigation.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -28,6 +28,7 @@
#include "navigation.h"
#include "coord.h"
#include "item.h"
+#include "xmlconfig.h"
#include "route.h"
#include "transform.h"
#include "mapset.h"
Modified: trunk/navit/navit/navit.c
===================================================================
--- trunk/navit/navit/navit.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/navit.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -36,6 +36,7 @@
#include "callback.h"
#include "gui.h"
#include "item.h"
+#include "xmlconfig.h"
#include "projection.h"
#include "map.h"
#include "mapset.h"
@@ -67,7 +68,6 @@
#include "vehicleprofile.h"
#include "sunriset.h"
#include "bookmarks.h"
-#include "xmlconfig.h"
#ifdef HAVE_API_WIN32_BASE
#include <windows.h>
#include "util.h"
@@ -100,9 +100,7 @@
};
struct navit {
- struct object_func *func;
- int refcount;
- struct attr **attrs;
+ NAVIT_OBJECT
struct attr self;
GList *mapsets;
GList *layouts;
@@ -165,7 +163,6 @@
int imperial;
int waypoints_flag;
struct coord_geo center;
- struct attr **attr_list;
};
struct gui *main_loop_gui;
@@ -1386,7 +1383,7 @@
g.lng=11.70;
this_->func=&navit_func;
- this_->refcount=1;
+ navit_object_ref((struct navit_object *)this_);
this_->attrs=attr_list_dup(attrs);
this_->self.type=attr_navit;
this_->self.u.navit=this_;
@@ -2683,6 +2680,9 @@
attr->u.gui=this_->gui;
ret=(attr->u.gui != NULL);
break;
+ case attr_layer:
+ ret=attr_generic_get_attr(this_->attrs, NULL, type, attr, iter?(struct attr_iter *)&iter->iter:NULL);
+ break;
case attr_layout:
if (iter) {
if (iter->u.list) {
@@ -2722,7 +2722,7 @@
attr->u.num=this_->orientation;
break;
case attr_osd:
- ret=attr_generic_get_attr(this_->attr_list, NULL, type, attr, iter?(struct attr_iter *)&iter->iter:NULL);
+ ret=attr_generic_get_attr(this_->attrs, NULL, type, attr, iter?(struct attr_iter *)&iter->iter:NULL);
break;
case attr_osd_configuration:
attr->u.num=this_->osd_configuration;
@@ -2851,7 +2851,7 @@
ret=navit_set_graphics(this_, attr->u.graphics);
break;
case attr_layout:
- ret=navit_add_layout(this_, attr->u.layout);
+ navit_add_layout(this_, attr->u.layout);
break;
case attr_route:
this_->route=attr->u.route;
@@ -2863,7 +2863,6 @@
this_->navigation=attr->u.navigation;
break;
case attr_osd:
- this_->attr_list=attr_generic_add_attr(this_->attr_list, attr);
break;
case attr_recent_dest:
this_->recentdest_count = attr->u.num;
@@ -2883,6 +2882,8 @@
case attr_autozoom_min:
this_->autozoom_min = attr->u.num;
break;
+ case attr_layer:
+ break;
default:
return 0;
}
@@ -3436,23 +3437,6 @@
g_free(this_);
}
-struct navit *
-navit_ref(struct navit *this_)
-{
- this_->refcount++;
- dbg(1,"refcount %d\n",this_->refcount);
- return this_;
-}
-
-void
-navit_unref(struct navit *this_)
-{
- this_->refcount--;
- dbg(1,"refcount %d\n",this_->refcount);
- if (this_->refcount <= 0)
- navit_destroy(this_);
-}
-
struct object_func navit_func = {
attr_navit,
(object_func_new)navit_new,
@@ -3465,8 +3449,8 @@
(object_func_init)navit_init,
(object_func_destroy)navit_destroy,
(object_func_dup)NULL,
- (object_func_ref)navit_ref,
- (object_func_unref)navit_unref,
+ (object_func_ref)navit_object_ref,
+ (object_func_unref)navit_object_unref,
};
/** @} */
Modified: trunk/navit/navit/osd/core/osd_core.c
===================================================================
--- trunk/navit/navit/osd/core/osd_core.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/osd/core/osd_core.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -31,6 +31,7 @@
#endif
#include <string.h>
#include "item.h"
+#include "xmlconfig.h"
#include "point.h"
#include "coord.h"
#include "graphics.h"
Modified: trunk/navit/navit/route.c
===================================================================
--- trunk/navit/navit/route.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/route.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -57,6 +57,7 @@
#include "coord.h"
#include "projection.h"
#include "item.h"
+#include "xmlconfig.h"
#include "map.h"
#include "mapset.h"
#include "route.h"
@@ -3680,7 +3681,7 @@
if (! *map) {
*map=map_new(NULL, attrs);
- map_ref(*map);
+ navit_object_ref((struct navit_object *)*map);
}
return *map;
Modified: trunk/navit/navit/search.c
===================================================================
--- trunk/navit/navit/search.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/search.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -24,6 +24,7 @@
#include "debug.h"
#include "projection.h"
#include "item.h"
+#include "xmlconfig.h"
#include "map.h"
#include "mapset.h"
#include "coord.h"
Modified: trunk/navit/navit/track.c
===================================================================
--- trunk/navit/navit/track.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/track.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -24,6 +24,7 @@
#include "item.h"
#include "attr.h"
#include "track.h"
+#include "xmlconfig.h"
#include "debug.h"
#include "transform.h"
#include "coord.h"
@@ -37,7 +38,6 @@
#include "roadprofile.h"
#include "util.h"
#include "config.h"
-#include "xmlconfig.h"
#include "callback.h"
struct object_func tracking_func;
@@ -83,9 +83,7 @@
};
struct tracking {
- struct object_func *func;
- int refcount;
- struct attr *attrs;
+ NAVIT_OBJECT
struct callback_list *callback_list;
struct mapset *ms;
struct route *rt;
@@ -863,23 +861,6 @@
}
}
-struct tracking *
-tracking_ref(struct tracking *this_)
-{
- this_->refcount++;
- dbg(1,"refcount %d\n",this_->refcount);
- return this_;
-}
-
-void
-tracking_unref(struct tracking *this_)
-{
- this_->refcount--;
- dbg(1,"refcount %d\n",this_->refcount);
- if (this_->refcount <= 0)
- tracking_destroy(this_);
-}
-
struct object_func tracking_func = {
attr_trackingo,
(object_func_new)tracking_new,
@@ -892,8 +873,8 @@
(object_func_init)tracking_init,
(object_func_destroy)tracking_destroy,
(object_func_dup)NULL,
- (object_func_ref)tracking_ref,
- (object_func_unref)tracking_unref,
+ (object_func_ref)navit_object_ref,
+ (object_func_unref)navit_object_unref,
};
@@ -903,7 +884,7 @@
struct tracking *this=g_new0(struct tracking, 1);
struct attr hist_size;
this->func=&tracking_func;
- this->refcount=1;
+ navit_object_ref((struct navit_object *)this);
this->angle_pref=10;
this->connected_pref=10;
this->nostop_pref=10;
Modified: trunk/navit/navit/vehicle.c
===================================================================
--- trunk/navit/navit/vehicle.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/vehicle.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -25,6 +25,7 @@
#include "debug.h"
#include "coord.h"
#include "item.h"
+#include "xmlconfig.h"
#include "log.h"
#include "plugin.h"
#include "transform.h"
@@ -39,17 +40,14 @@
#include "color.h"
#include "layout.h"
#include "vehicle.h"
-#include "xmlconfig.h"
struct vehicle {
- struct object_func *func;
- int refcount;
+ NAVIT_OBJECT
struct vehicle_methods meth;
struct vehicle_priv *priv;
struct callback_list *cbl;
struct log *nmea_log, *gpx_log;
char *gpx_desc;
- struct attr **attrs;
// cursor
struct cursor *cursor;
@@ -115,7 +113,7 @@
g_free(type);
this_ = g_new0(struct vehicle, 1);
this_->func=&vehicle_func;
- this_->refcount = 1;
+ navit_object_ref((struct navit_object *)this_);
this_->cbl = callback_list_new();
this_->priv = vehicletype_new(&this_->meth, this_->cbl, attrs);
if (!this_->priv) {
@@ -169,25 +167,6 @@
g_free(this_);
}
-struct vehicle *
-vehicle_ref(struct vehicle *this_)
-{
- this_->refcount++;
- dbg(0,"refcount %d\n",this_->refcount);
- return this_;
-}
-
-void
-vehicle_unref(struct vehicle *this_)
-{
- if(!this_)
- return;
- this_->refcount--;
- dbg(0,"refcount %d\n",this_->refcount);
- if (this_->refcount <= 0)
- vehicle_destroy(this_);
-}
-
/**
* Creates an attribute iterator to be used with vehicles
*/
@@ -731,6 +710,6 @@
(object_func_init)NULL,
(object_func_destroy)vehicle_destroy,
(object_func_dup)NULL,
- (object_func_ref)vehicle_ref,
- (object_func_unref)vehicle_unref,
+ (object_func_ref)navit_object_ref,
+ (object_func_unref)navit_object_unref,
};
Modified: trunk/navit/navit/vehicleprofile.c
===================================================================
--- trunk/navit/navit/vehicleprofile.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/vehicleprofile.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -22,9 +22,9 @@
#include <string.h>
#include "debug.h"
#include "item.h"
+#include "xmlconfig.h"
#include "roadprofile.h"
#include "vehicleprofile.h"
-#include "xmlconfig.h"
static void
vehicleprofile_set_attr_do(struct vehicleprofile *this_, struct attr *attr)
@@ -93,6 +93,8 @@
return NULL;
}
this_=g_new0(struct vehicleprofile, 1);
+ this_->func=&vehicleprofile_func;
+ navit_object_ref((struct navit_object *)this_);
this_->attrs=attr_list_dup(attrs);
this_->roadprofile_hash=g_hash_table_new(NULL, NULL);
this_->length=-1;
@@ -189,6 +191,6 @@
(object_func_init)NULL,
(object_func_destroy)NULL,
(object_func_dup)NULL,
- (object_func_ref)NULL,
- (object_func_unref)NULL,
+ (object_func_ref)navit_object_ref,
+ (object_func_unref)navit_object_unref,
};
Modified: trunk/navit/navit/vehicleprofile.h
===================================================================
--- trunk/navit/navit/vehicleprofile.h 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/vehicleprofile.h 2013-01-19 18:56:41 UTC (rev 5340)
@@ -22,6 +22,7 @@
extern "C" {
#endif
struct vehicleprofile {
+ NAVIT_OBJECT
int mode; /**< 0 = Auto, 1 = On-Road, 2 = Off-Road */
int flags_forward_mask; /**< Flags mask for moving in positive direction */
int flags_reverse_mask; /**< Flags mask for moving in reverse direction */
@@ -37,7 +38,6 @@
int axle_weight; /**< Axle Weight of the vehicle in kg */
int dangerous_goods; /**< Flags of dangerous goods present */
int through_traffic_penalty; /**< Penalty when driving on a through traffic limited road */
- struct attr **attrs;
GHashTable *roadprofile_hash;
};
Modified: trunk/navit/navit/xmlconfig.c
===================================================================
--- trunk/navit/navit/xmlconfig.c 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/xmlconfig.c 2013-01-19 18:56:41 UTC (rev 5340)
@@ -30,6 +30,8 @@
#include "config.h"
#include "file.h"
#include "coord.h"
+#include "item.h"
+#include "xmlconfig.h"
#include "layout.h"
#include "mapset.h"
#include "projection.h"
@@ -50,7 +52,6 @@
#include "vehicleprofile.h"
#include "roadprofile.h"
#include "config_.h"
-#include "xmlconfig.h"
#if (defined __MINGW32__) || (defined _MSC_VER)
/* This only works if a is a string constant, i.e. "name" */
@@ -254,7 +255,6 @@
{ attr_icon, NEW(icon_new), NULL, NULL, NULL, NULL, ADD(element_add_attr)},
{ attr_image, NEW(image_new)},
{ attr_itemgra, NEW(itemgra_new), NULL, NULL, NULL, NULL, ADD(itemgra_add_attr)},
- { attr_layer, NEW(layer_new), NULL, NULL, NULL, NULL, ADD(layer_add_attr)},
{ attr_log, NEW(log_new)},
{ attr_navigation, NEW(navigation_new), GET(navigation_get_attr)},
{ attr_osd, NEW(osd_new), GET(osd_get_attr), NULL, NULL, SET(osd_set_attr) },
@@ -273,6 +273,8 @@
{
int i;
switch (type) {
+ case attr_layer:
+ return &layer_func;
case attr_layout:
return &layout_func;
case attr_map:
@@ -533,6 +535,11 @@
elements[38].parent="mapset";
elements[38].func=NULL;
elements[38].type=attr_maps;
+
+ elements[39].name="layer";
+ elements[39].parent="navit";
+ elements[39].func=NULL;
+ elements[39].type=attr_layer;
}
/**
@@ -1220,3 +1227,21 @@
return result;
}
+struct navit_object *
+navit_object_ref(struct navit_object *obj)
+{
+ obj->refcount++;
+ dbg(1,"refcount %s %p %d\n",attr_to_name(obj->func->type),obj,obj->refcount);
+ return obj;
+}
+
+void
+navit_object_unref(struct navit_object *obj)
+{
+ if (obj) {
+ obj->refcount--;
+ dbg(1,"refcount %s %p %d\n",attr_to_name(obj->func->type),obj,obj->refcount);
+ if (obj->refcount <= 0 && obj->func && obj->func->destroy)
+ obj->func->destroy(obj);
+ }
+}
Modified: trunk/navit/navit/xmlconfig.h
===================================================================
--- trunk/navit/navit/xmlconfig.h 2013-01-09 21:53:13 UTC (rev 5339)
+++ trunk/navit/navit/xmlconfig.h 2013-01-19 18:56:41 UTC (rev 5340)
@@ -54,15 +54,17 @@
void *(*unref)(void *);
};
-extern struct object_func map_func, mapset_func, navit_func, tracking_func, vehicle_func, maps_func, layout_func, vehicleprofile_func;
+extern struct object_func map_func, mapset_func, navit_func, tracking_func, vehicle_func, maps_func, layout_func, vehicleprofile_func, layer_func;
-#define HAS_OBJECT_FUNC(x) ((x) == attr_map || (x) == attr_mapset || (x) == attr_navit || (x) == attr_trackingo || (x) == attr_vehicle)
+#define HAS_OBJECT_FUNC(x) ((x) == attr_map || (x) == attr_mapset || (x) == attr_navit || (x) == attr_trackingo || (x) == attr_vehicle || (x) == attr_maps || (x) == attr_layout || (x) == attr_vehicleprofile || (x) == attr_layer)
+#define NAVIT_OBJECT struct object_func *func; int refcount; struct attr **attrs;
struct navit_object {
- struct object_func *func;
- int refcount;
+ NAVIT_OBJECT
};
+struct navit_object *navit_object_ref(struct navit_object *obj);
+void navit_object_unref(struct navit_object *obj);
typedef GError xmlerror;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wog...@us...> - 2013-01-09 21:53:20
|
Revision: 5339
http://navit.svn.sourceforge.net/navit/?rev=5339&view=rev
Author: woglinde
Date: 2013-01-09 21:53:13 +0000 (Wed, 09 Jan 2013)
Log Message:
-----------
Fix:i18n:add the splitted gui_internal files to potfiles
Modified Paths:
--------------
trunk/navit/po/CMakeLists.txt
trunk/navit/po/Makefile.am
Modified: trunk/navit/po/CMakeLists.txt
===================================================================
--- trunk/navit/po/CMakeLists.txt 2013-01-09 21:16:25 UTC (rev 5338)
+++ trunk/navit/po/CMakeLists.txt 2013-01-09 21:53:13 UTC (rev 5339)
@@ -13,6 +13,13 @@
${PROJECT_SOURCE_DIR}/navit/gui/gtk/gui_gtk_action.c
${PROJECT_SOURCE_DIR}/navit/gui/gtk/gui_gtk_statusbar.c
${PROJECT_SOURCE_DIR}/navit/gui/internal/gui_internal.c
+ ${PROJECT_SOURCE_DIR}/navit/gui/internal/gui_internal_bookmark.c
+ ${PROJECT_SOURCE_DIR}/navit/gui/internal/gui_internal_command.c
+ ${PROJECT_SOURCE_DIR}/navit/gui/internal/gui_internal_html.c
+ ${PROJECT_SOURCE_DIR}/navit/gui/internal/gui_internal_menu.c
+ ${PROJECT_SOURCE_DIR}/navit/gui/internal/gui_internal_poi.c
+ ${PROJECT_SOURCE_DIR}/navit/gui/internal/gui_internal_search.c
+ ${PROJECT_SOURCE_DIR}/navit/gui/internal/gui_internal_widget.c
${PROJECT_SOURCE_DIR}/navit/osd/core/osd_core.c
${CMAKE_CURRENT_BINARY_DIR}/navit_shipped.c
)
Modified: trunk/navit/po/Makefile.am
===================================================================
--- trunk/navit/po/Makefile.am 2013-01-09 21:16:25 UTC (rev 5338)
+++ trunk/navit/po/Makefile.am 2013-01-09 21:53:13 UTC (rev 5339)
@@ -15,6 +15,13 @@
$(top_srcdir)/navit/gui/gtk/gui_gtk_action.c \
$(top_srcdir)/navit/gui/gtk/gui_gtk_statusbar.c \
$(top_srcdir)/navit/gui/internal/gui_internal.c \
+ $(top_srcdir)/navit/gui/internal/gui_internal_bookmark.c \
+ $(top_srcdir)/navit/gui/internal/gui_internal_command.c \
+ $(top_srcdir)/navit/gui/internal/gui_internal_html.c \
+ $(top_srcdir)/navit/gui/internal/gui_internal_menu.c \
+ $(top_srcdir)/navit/gui/internal/gui_internal_poi.c \
+ $(top_srcdir)/navit/gui/internal/gui_internal_search.c \
+ $(top_srcdir)/navit/gui/internal/gui_internal_widget.c \
$(top_srcdir)/navit/osd/core/osd_core.c \
$(top_builddir)/navit/navit_shipped.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2013-01-09 21:16:31
|
Revision: 5338
http://navit.svn.sourceforge.net/navit/?rev=5338&view=rev
Author: mdankov
Date: 2013-01-09 21:16:25 +0000 (Wed, 09 Jan 2013)
Log Message:
-----------
Fix:core:Reverting 5334 changes to fix navigational regression. Discussion is at #1046.
Modified Paths:
--------------
trunk/navit/navit/route.c
Modified: trunk/navit/navit/route.c
===================================================================
--- trunk/navit/navit/route.c 2013-01-05 08:30:47 UTC (rev 5337)
+++ trunk/navit/navit/route.c 2013-01-09 21:16:25 UTC (rev 5338)
@@ -136,10 +136,8 @@
struct route_graph_segment_data {
struct item *item;
- /* If the item passed in "item" is segmented (i.e. divided into several segments), this indicates the position of this segment within the item */
int offset;
int flags;
- /* The length of this segment */
int len;
int maxspeed;
struct size_weight_limit size_weight;
@@ -1455,24 +1453,20 @@
static int
-route_graph_segment_is_duplicate(struct route_graph_point *start, struct route_graph_point *end, struct route_graph_segment_data *data)
+route_graph_segment_is_duplicate(struct route_graph_point *start, struct route_graph_segment_data *data)
{
struct route_graph_segment *s;
-
- for(s=start->start;s;s=s->start_next) {
- if(s->end==end) {
- /* Compare by flags set, but do not consider AF_SEGMENTED */
- if((data->flags & ~AF_SEGMENTED) != (s->data.flags & ~AF_SEGMENTED))
- continue;
- /* Compare segments by limits that have been set for them */
- if ((data->flags & AF_SPEED_LIMIT) && RSD_MAXSPEED(&s->data)!=data->maxspeed)
- continue;
- if ((data->flags & AF_SIZE_OR_WEIGHT_LIMIT) && memcmp(&RSD_SIZE_WEIGHT(&s->data),&data->size_weight, sizeof(data->size_weight)))
- continue;
- if ((data->flags & AF_DANGEROUS_GOODS) && RSD_DANGEROUS_GOODS(&s->data)!=data->dangerous_goods)
- continue;
- return 1;
+ s=start->start;
+ while (s) {
+ if (item_is_equal(*data->item, s->data.item)) {
+ if (data->flags & AF_SEGMENTED) {
+ if (RSD_OFFSET(&s->data) == data->offset) {
+ return 1;
+ }
+ } else
+ return 1;
}
+ s=s->start_next;
}
return 0;
}
@@ -1486,7 +1480,11 @@
* @param this The route graph to insert the segment into
* @param start The graph point which should be connected to the start of this segment
* @param end The graph point which should be connected to the end of this segment
- * @param data Segment parameters: access flags, speed and weight limits and so on
+ * @param len The length of this segment
+ * @param item The item that is represented by this segment
+ * @param flags Flags for this segment
+ * @param offset If the item passed in "item" is segmented (i.e. divided into several segments), this indicates the position of this segment within the item
+ * @param maxspeed The maximum speed allowed on this segment in km/h. -1 if not known.
*/
static void
route_graph_add_segment(struct route_graph *this, struct route_graph_point *start,
@@ -2138,7 +2136,7 @@
e_pnt=route_graph_add_point(this,&l);
dbg_assert(len >= 0);
data.len=len;
- if (!route_graph_segment_is_duplicate(s_pnt, e_pnt, &data))
+ if (!route_graph_segment_is_duplicate(s_pnt, &data))
route_graph_add_segment(this, s_pnt, e_pnt, &data);
} else {
int isseg,rc;
@@ -2152,7 +2150,7 @@
if (isseg) {
e_pnt=route_graph_add_point(this,&l);
data.len=len;
- if (!route_graph_segment_is_duplicate(s_pnt, e_pnt, &data))
+ if (!route_graph_segment_is_duplicate(s_pnt, &data))
route_graph_add_segment(this, s_pnt, e_pnt, &data);
data.offset++;
s_pnt=route_graph_add_point(this,&l);
@@ -2164,7 +2162,7 @@
dbg_assert(len >= 0);
sc++;
data.len=len;
- if (!route_graph_segment_is_duplicate(s_pnt, e_pnt, &data))
+ if (!route_graph_segment_is_duplicate(s_pnt, &data))
route_graph_add_segment(this, s_pnt, e_pnt, &data);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2013-01-05 08:30:55
|
Revision: 5337
http://navit.svn.sourceforge.net/navit/?rev=5337&view=rev
Author: mdankov
Date: 2013-01-05 08:30:47 +0000 (Sat, 05 Jan 2013)
Log Message:
-----------
Fix:core:Update iso3166-1 country lists, recoginse iso3166-1:alpha2 tag on coutry boundary relations.
Modified Paths:
--------------
trunk/navit/navit/country.c
trunk/navit/navit/maptool/boundaries.c
trunk/navit/navit/maptool/osm.c
Modified: trunk/navit/navit/country.c
===================================================================
--- trunk/navit/navit/country.c 2013-01-03 20:55:00 UTC (rev 5336)
+++ trunk/navit/navit/country.c 2013-01-05 08:30:47 UTC (rev 5337)
@@ -35,6 +35,8 @@
char *name;
};
+/* List of all known countries and their codes.
+ * If you update this list, look at country_table array in maptool/osm.c also. */
static struct country country[]= {
{ 20, "AND", "AD", "AND", /* 020 */ _n("Andorra")},
{784, "UAE", "AE", "ARE", /* 784 */ _n("United Arab Emirates")},
@@ -66,6 +68,7 @@
{ 60, NULL, "BM", "BMU", /* 060 */ _n("Bermuda")},
{ 96, "BRU", "BN", "BRN", /* 096 */ _n("Brunei Darussalam")},
{ 68, "BOL", "BO", "BOL", /* 068 */ _n("Bolivia")},
+ {535, NULL, "BQ", "BES", /* 535 */ _n("Bonaire, Sint Eustatius and Saba")},
{ 76, "BR", "BR", "BRA", /* 076 */ _n("Brazil")},
{ 44, "BS", "BS", "BHS", /* 044 */ _n("Bahamas")},
{ 64, "BHT", "BT", "BTN", /* 064 */ _n("Bhutan")},
@@ -88,6 +91,7 @@
{188, "CR", "CR", "CRI", /* 188 */ _n("Costa Rica")},
{192, "C", "CU", "CUB", /* 192 */ _n("Cuba")},
{132, "CV", "CV", "CPV", /* 132 */ _n("Cape Verde")},
+ {531, NULL, "CW", "CUW", /* 531 */ _n("Curacao")},
{162, NULL, "CX", "CXR", /* 162 */ _n("Christmas Island")},
{196, "CY", "CY", "CYP", /* 196 */ _n("Cyprus")},
{203, "CZ", "CZ", "CZE", /* 203 */ _n("Czech Republic")},
@@ -242,8 +246,10 @@
{686, "SN", "SN", "SEN", /* 686 */ _n("Senegal")},
{706, "SO", "SO", "SOM", /* 706 */ _n("Somalia")},
{740, "SME", "SR", "SUR", /* 740 */ _n("Suriname")},
+ {728, NULL, "SS", "SSD", /* 728 */ _n("South Sudan")},
{678, "STP", "ST", "STP", /* 678 */ _n("Sao Tome and Principe")},
{222, "ES", "SV", "SLV", /* 222 */ _n("El Salvador")},
+ {534, NULL, "SX", "SXM", /* 534 */ _n("Sint Maarten (Dutch part)")},
{760, "SYR", "SY", "SYR", /* 760 */ _n("Syrian Arab Republic")},
{748, "SD", "SZ", "SWZ", /* 748 */ _n("Swaziland")},
{796, NULL, "TC", "TCA", /* 796 */ _n("Turks and Caicos Islands")},
Modified: trunk/navit/navit/maptool/boundaries.c
===================================================================
--- trunk/navit/navit/maptool/boundaries.c 2013-01-03 20:55:00 UTC (rev 5336)
+++ trunk/navit/navit/maptool/boundaries.c 2013-01-05 08:30:47 UTC (rev 5337)
@@ -78,6 +78,10 @@
struct boundary *boundary=g_new0(struct boundary, 1);
char *admin_level=osm_tag_value(ib, "admin_level");
char *iso=osm_tag_value(ib, "ISO3166-1");
+
+ if(!iso)
+ iso=osm_tag_value(ib, "iso3166-1:alpha2");
+
/* disable spain for now since it creates a too large index */
if (admin_level && !strcmp(admin_level, "2") && (!iso || strcasecmp(iso,"es"))) {
if (iso) {
Modified: trunk/navit/navit/maptool/osm.c
===================================================================
--- trunk/navit/navit/maptool/osm.c 2013-01-03 20:55:00 UTC (rev 5336)
+++ trunk/navit/navit/maptool/osm.c 2013-01-05 08:30:47 UTC (rev 5337)
@@ -112,6 +112,9 @@
#define REF(c) ((c).y)
#define SET_REF(c,ref) do { (c).x = 1 << 30; (c).y = ref ; } while(0)
+/* Table of country codes with possible is_in spellings.
+ * Note: If you update this list, check also country array in country.c
+ */
struct country_table {
int countryid;
char *names;
@@ -272,7 +275,10 @@
{ 524,"Nepal"},
{ 528,"Nederland,The Netherlands,Niederlande,NL,Netherlands"},
{ 530,"Netherlands Antilles"},
+ { 531,"Curacao"},
{ 533,"Aruba"},
+ { 534,"Sint Maarten (Dutch part)"},
+ { 535,"Bonaire, Sint Eustatius and Saba"},
{ 540,"New Caledonia"},
{ 548,"Vanuatu"},
{ 554,"New Zealand"},
@@ -327,6 +333,7 @@
{ 710,"South Africa"},
{ 716,"Zimbabwe"},
{ 724,"Spain,Espana,España,Reino de Espana,Reino de España"},
+ { 728,"South Sudan"},
{ 732,"Western Sahara"},
{ 736,"Sudan"},
{ 740,"Suriname"},
@@ -1817,7 +1824,7 @@
while (l) {
struct boundary *b=l->data;
if (b->country) {
- if (match) {
+ if (match && match->country->countryid!=b->country->countryid) {
osm_warning("node",item_bin_get_nodeid(ib),0,"node (0x%x,0x%x) conflict country ", c->x, c->y);
osm_warning("relation",boundary_relid(match),1,"country %d vs ",match->country->countryid);
osm_warning("relation",boundary_relid(b),1,"country %d\n",b->country->countryid);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2013-01-03 20:55:07
|
Revision: 5336
http://navit.svn.sourceforge.net/navit/?rev=5336&view=rev
Author: mdankov
Date: 2013-01-03 20:55:00 +0000 (Thu, 03 Jan 2013)
Log Message:
-----------
Fix:gui_internal:Show the "unknown" image when requested image is not found
Modified Paths:
--------------
trunk/navit/navit/gui/internal/gui_internal.c
Modified: trunk/navit/navit/gui/internal/gui_internal.c
===================================================================
--- trunk/navit/navit/gui/internal/gui_internal.c 2013-01-03 19:24:02 UTC (rev 5335)
+++ trunk/navit/navit/gui/internal/gui_internal.c 2013-01-03 20:55:00 UTC (rev 5336)
@@ -131,8 +131,12 @@
ret=graphics_image_new_scaled(this->gra, full_path, w, h);
dbg(1,"Trying to load image '%s' (w=%d, h=%d): %s\n", name, w, h, ret ? "OK" : "NOT FOUND");
g_free(full_path);
- if (!ret)
+ if (!ret) {
dbg(0,"Failed to load image for '%s' (w=%d, h=%d)\n", name, w, h);
+ full_path=graphics_icon_path("unknown");
+ ret=graphics_image_new_scaled(this->gra, full_path, w, h);
+ g_free(full_path);
+ }
return ret;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2013-01-03 19:24:08
|
Revision: 5335
http://navit.svn.sourceforge.net/navit/?rev=5335&view=rev
Author: mdankov
Date: 2013-01-03 19:24:02 +0000 (Thu, 03 Jan 2013)
Log Message:
-----------
Fix:core:Consider each member way of border relation only once, even if it has duplicate osm->binfile item mapping.
Modified Paths:
--------------
trunk/navit/navit/attr_def.h
trunk/navit/navit/maptool/boundaries.c
trunk/navit/navit/maptool/osm.c
Modified: trunk/navit/navit/attr_def.h
===================================================================
--- trunk/navit/navit/attr_def.h 2013-01-01 13:01:47 UTC (rev 5334)
+++ trunk/navit/navit/attr_def.h 2013-01-03 19:24:02 UTC (rev 5335)
@@ -236,6 +236,7 @@
ATTR(persistent)
ATTR(waypoints_flag) /* toggle for "set as destination" to switch between start a new route or add */
ATTR(no_warning_if_map_file_missing)
+ATTR(duplicate)
ATTR2(0x0002ffff,type_int_end)
ATTR2(0x00030000,type_string_begin)
ATTR(type)
Modified: trunk/navit/navit/maptool/boundaries.c
===================================================================
--- trunk/navit/navit/maptool/boundaries.c 2013-01-01 13:01:47 UTC (rev 5334)
+++ trunk/navit/navit/maptool/boundaries.c 2013-01-03 19:24:02 UTC (rev 5335)
@@ -59,7 +59,10 @@
{
struct boundary *b=relation_priv;
enum geom_poly_segment_type role=(long)member_priv;
- b->segments=g_list_prepend(b->segments,item_bin_to_poly_segment(member, role));
+ int *dup;
+ dup=item_bin_get_attr(member,attr_duplicate,NULL);
+ if(!dup || *dup==0)
+ b->segments=g_list_prepend(b->segments,item_bin_to_poly_segment(member, role));
}
static GList *
Modified: trunk/navit/navit/maptool/osm.c
===================================================================
--- trunk/navit/navit/maptool/osm.c 2013-01-01 13:01:47 UTC (rev 5334)
+++ trunk/navit/navit/maptool/osm.c 2013-01-03 19:24:02 UTC (rev 5335)
@@ -1675,6 +1675,8 @@
item_bin_add_attr_int(item_bin, attr_flags, flags_attr_value);
if (maxspeed_attr_value)
item_bin_add_attr_int(item_bin, attr_maxspeed, maxspeed_attr_value);
+ if(i>0)
+ item_bin_add_attr_int(item_bin, attr_duplicate, 1);
item_bin_write(item_bin,osm->ways);
}
if(osm->line2poi) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2013-01-01 13:02:01
|
Revision: 5334
http://navit.svn.sourceforge.net/navit/?rev=5334&view=rev
Author: mdankov
Date: 2013-01-01 13:01:47 +0000 (Tue, 01 Jan 2013)
Log Message:
-----------
Fix:core:Better detect identical edges at routing graph build stage. Lower impact of having overlapped binfiles in one mapset. Fixes #1046 from the routing perspective.
Modified Paths:
--------------
trunk/navit/navit/route.c
Modified: trunk/navit/navit/route.c
===================================================================
--- trunk/navit/navit/route.c 2012-12-29 19:54:21 UTC (rev 5333)
+++ trunk/navit/navit/route.c 2013-01-01 13:01:47 UTC (rev 5334)
@@ -136,8 +136,10 @@
struct route_graph_segment_data {
struct item *item;
+ /* If the item passed in "item" is segmented (i.e. divided into several segments), this indicates the position of this segment within the item */
int offset;
int flags;
+ /* The length of this segment */
int len;
int maxspeed;
struct size_weight_limit size_weight;
@@ -1453,20 +1455,24 @@
static int
-route_graph_segment_is_duplicate(struct route_graph_point *start, struct route_graph_segment_data *data)
+route_graph_segment_is_duplicate(struct route_graph_point *start, struct route_graph_point *end, struct route_graph_segment_data *data)
{
struct route_graph_segment *s;
- s=start->start;
- while (s) {
- if (item_is_equal(*data->item, s->data.item)) {
- if (data->flags & AF_SEGMENTED) {
- if (RSD_OFFSET(&s->data) == data->offset) {
- return 1;
- }
- } else
- return 1;
+
+ for(s=start->start;s;s=s->start_next) {
+ if(s->end==end) {
+ /* Compare by flags set, but do not consider AF_SEGMENTED */
+ if((data->flags & ~AF_SEGMENTED) != (s->data.flags & ~AF_SEGMENTED))
+ continue;
+ /* Compare segments by limits that have been set for them */
+ if ((data->flags & AF_SPEED_LIMIT) && RSD_MAXSPEED(&s->data)!=data->maxspeed)
+ continue;
+ if ((data->flags & AF_SIZE_OR_WEIGHT_LIMIT) && memcmp(&RSD_SIZE_WEIGHT(&s->data),&data->size_weight, sizeof(data->size_weight)))
+ continue;
+ if ((data->flags & AF_DANGEROUS_GOODS) && RSD_DANGEROUS_GOODS(&s->data)!=data->dangerous_goods)
+ continue;
+ return 1;
}
- s=s->start_next;
}
return 0;
}
@@ -1480,11 +1486,7 @@
* @param this The route graph to insert the segment into
* @param start The graph point which should be connected to the start of this segment
* @param end The graph point which should be connected to the end of this segment
- * @param len The length of this segment
- * @param item The item that is represented by this segment
- * @param flags Flags for this segment
- * @param offset If the item passed in "item" is segmented (i.e. divided into several segments), this indicates the position of this segment within the item
- * @param maxspeed The maximum speed allowed on this segment in km/h. -1 if not known.
+ * @param data Segment parameters: access flags, speed and weight limits and so on
*/
static void
route_graph_add_segment(struct route_graph *this, struct route_graph_point *start,
@@ -2136,7 +2138,7 @@
e_pnt=route_graph_add_point(this,&l);
dbg_assert(len >= 0);
data.len=len;
- if (!route_graph_segment_is_duplicate(s_pnt, &data))
+ if (!route_graph_segment_is_duplicate(s_pnt, e_pnt, &data))
route_graph_add_segment(this, s_pnt, e_pnt, &data);
} else {
int isseg,rc;
@@ -2150,7 +2152,7 @@
if (isseg) {
e_pnt=route_graph_add_point(this,&l);
data.len=len;
- if (!route_graph_segment_is_duplicate(s_pnt, &data))
+ if (!route_graph_segment_is_duplicate(s_pnt, e_pnt, &data))
route_graph_add_segment(this, s_pnt, e_pnt, &data);
data.offset++;
s_pnt=route_graph_add_point(this,&l);
@@ -2162,7 +2164,7 @@
dbg_assert(len >= 0);
sc++;
data.len=len;
- if (!route_graph_segment_is_duplicate(s_pnt, &data))
+ if (!route_graph_segment_is_duplicate(s_pnt, e_pnt, &data))
route_graph_add_segment(this, s_pnt, e_pnt, &data);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sl...@us...> - 2012-12-29 19:54:27
|
Revision: 5333
http://navit.svn.sourceforge.net/navit/?rev=5333&view=rev
Author: sleske
Date: 2012-12-29 19:54:21 +0000 (Sat, 29 Dec 2012)
Log Message:
-----------
Fix:core:Fix integer overflow that causes wrong lines on map at high zoom levels.
Modified Paths:
--------------
trunk/navit/navit/graphics.c
Modified: trunk/navit/navit/graphics.c
===================================================================
--- trunk/navit/navit/graphics.c 2012-12-26 18:02:05 UTC (rev 5332)
+++ trunk/navit/navit/graphics.c 2012-12-29 19:54:21 UTC (rev 5333)
@@ -1557,40 +1557,43 @@
if (code1 & code2)
return 0;
if (code1 & 1) {
- p1->y+=(r->lu.x-p1->x)*dy/dx;
- p1->w+=(r->lu.x-p1->x)*dw/dx;
+ // We must cast to float to avoid integer
+ // overflow (i.e. undefined behaviour) at high
+ // zoom levels.
+ p1->y+=(((float)r->lu.x)-p1->x)*dy/dx;
+ p1->w+=(((float)r->lu.x)-p1->x)*dw/dx;
p1->x=r->lu.x;
} else if (code1 & 2) {
- p1->y+=(r->rl.x-p1->x)*dy/dx;
- p1->w+=(r->rl.x-p1->x)*dw/dx;
+ p1->y+=(((float)r->rl.x)-p1->x)*dy/dx;
+ p1->w+=(((float)r->rl.x)-p1->x)*dw/dx;
p1->x=r->rl.x;
} else if (code1 & 4) {
- p1->x+=(r->lu.y-p1->y)*dx/dy;
- p1->w+=(r->lu.y-p1->y)*dw/dy;
+ p1->x+=(((float)r->lu.y)-p1->y)*dx/dy;
+ p1->w+=(((float)r->lu.y)-p1->y)*dw/dy;
p1->y=r->lu.y;
} else if (code1 & 8) {
- p1->x+=(r->rl.y-p1->y)*dx/dy;
- p1->w+=(r->rl.y-p1->y)*dw/dy;
+ p1->x+=(((float)r->rl.y)-p1->y)*dx/dy;
+ p1->w+=(((float)r->rl.y)-p1->y)*dw/dy;
p1->y=r->rl.y;
}
code1=clipcode(p1, r);
if (code1 & code2)
return 0;
if (code2 & 1) {
- p2->y+=(r->lu.x-p2->x)*dy/dx;
- p2->w+=(r->lu.x-p2->x)*dw/dx;
+ p2->y+=(((float)r->lu.x)-p2->x)*dy/dx;
+ p2->w+=(((float)r->lu.x)-p2->x)*dw/dx;
p2->x=r->lu.x;
} else if (code2 & 2) {
- p2->y+=(r->rl.x-p2->x)*dy/dx;
- p2->w+=(r->rl.x-p2->x)*dw/dx;
+ p2->y+=(((float)r->rl.x)-p2->x)*dy/dx;
+ p2->w+=(((float)r->rl.x)-p2->x)*dw/dx;
p2->x=r->rl.x;
} else if (code2 & 4) {
- p2->x+=(r->lu.y-p2->y)*dx/dy;
- p2->w+=(r->lu.y-p2->y)*dw/dy;
+ p2->x+=(((float)r->lu.y)-p2->y)*dx/dy;
+ p2->w+=(((float)r->lu.y)-p2->y)*dw/dy;
p2->y=r->lu.y;
} else if (code2 & 8) {
- p2->x+=(r->rl.y-p2->y)*dx/dy;
- p2->w+=(r->rl.y-p2->y)*dw/dy;
+ p2->x+=(((float)r->rl.y)-p2->y)*dx/dy;
+ p2->w+=(((float)r->rl.y)-p2->y)*dw/dy;
p2->y=r->rl.y;
}
code2=clipcode(p2, r);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2012-12-26 18:02:12
|
Revision: 5332
http://navit.svn.sourceforge.net/navit/?rev=5332&view=rev
Author: mdankov
Date: 2012-12-26 18:02:05 +0000 (Wed, 26 Dec 2012)
Log Message:
-----------
Fix:core:Let demo vehicle report data for gps_status osd.
Modified Paths:
--------------
trunk/navit/navit/vehicle/demo/vehicle_demo.c
Modified: trunk/navit/navit/vehicle/demo/vehicle_demo.c
===================================================================
--- trunk/navit/navit/vehicle/demo/vehicle_demo.c 2012-12-26 16:37:35 UTC (rev 5331)
+++ trunk/navit/navit/vehicle/demo/vehicle_demo.c 2012-12-26 18:02:05 UTC (rev 5332)
@@ -79,6 +79,12 @@
priv->timep=current_to_iso8601();
attr->u.str=priv->timep;
break;
+ case attr_position_fix_type:
+ attr->u.num = 2;
+ break;
+ case attr_position_sats_used:
+ attr->u.num = 9;
+ break;
default:
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2012-12-26 16:37:41
|
Revision: 5331
http://navit.svn.sourceforge.net/navit/?rev=5331&view=rev
Author: mdankov
Date: 2012-12-26 16:37:35 +0000 (Wed, 26 Dec 2012)
Log Message:
-----------
Fix:gui_internal:Don't blow keyboard when entering digits.
Modified Paths:
--------------
trunk/navit/navit/gui/internal/gui_internal_keyboard.c
Modified: trunk/navit/navit/gui/internal/gui_internal_keyboard.c
===================================================================
--- trunk/navit/navit/gui/internal/gui_internal_keyboard.c 2012-12-26 16:04:59 UTC (rev 5330)
+++ trunk/navit/navit/gui/internal/gui_internal_keyboard.c 2012-12-26 16:37:35 UTC (rev 5331)
@@ -168,20 +168,21 @@
char text[]={'0'+i,'\0'};
KEY(text);
}
- KEY("."); KEY("°"); KEY("'"); KEY("\""); KEY("-"); KEY("+");
- KEY("*"); KEY("/"); KEY("("); KEY(")"); KEY("="); KEY("?");
- KEY(":");
+ /* ("8") ("9")*/KEY("."); KEY("°"); KEY("'"); KEY("\"");KEY("-"); KEY("+");
+ KEY("*"); KEY("/"); KEY("("); KEY(")"); KEY("="); KEY("?"); KEY(":"); SPACER();
if (mode == 16) {
- for (i = 0 ; i < 5 ; i++) SPACER();
+ SPACER();
KEY("-");
KEY("'");
wk=gui_internal_keyboard_key_data(this, wkbd, hide, 0, gui_internal_keyboard_change, wkbdb, NULL,max_w,max_h);
wk->datai=mode+1024;
+ SPACER();
+ SPACER();
} else {
- for (i = 0 ; i < 3 ; i++) SPACER();
+ SPACER();
MODE(40);
MODE(48);
wk=gui_internal_keyboard_key_data(this, wkbd, hide, 0, gui_internal_keyboard_change, wkbdb, NULL,max_w,max_h);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|