Merge lp:~chkr/gpx-viewer/gpx-viewer into lp:gpx-viewer

Proposed by Qball Cow
Status: Work in progress
Proposed branch: lp:~chkr/gpx-viewer/gpx-viewer
Merge into: lp:gpx-viewer
Diff against target: 1064 lines (+607/-49) (has conflicts)
10 files modified
Makefile.am (+3/-2)
configure.ac (+6/-2)
data/gpx-viewer.ui (+455/-9)
src/gpx-graph.vala (+11/-12)
src/gpx-parser-xml.vala (+9/-9)
src/gpx-parser.vala (+54/-3)
src/gpx-settings.vala (+1/-1)
src/gpx-track-treemodel.vala (+4/-0)
src/gpx-viewer.c (+63/-11)
src/gpx-viewer.h (+1/-0)
Text conflict in data/gpx-viewer.ui
Text conflict in src/gpx-viewer.c
To merge this branch: bzr merge lp:~chkr/gpx-viewer/gpx-viewer
Reviewer Review Type Date Requested Status
Qball Cow Approve
Review via email: mp+186933@code.launchpad.net

Commit message

Merge in the Changes from Christian Krause

To post a comment you must log in.
Revision history for this message
Qball Cow (qball-qballcow) :
review: Approve
lp:~chkr/gpx-viewer/gpx-viewer updated
261. By Qball Cow <email address hidden>

Add automake-1.14 to autogen.sh

262. By Qball Cow

Quick and dirty support for heart-rate information in gpxfile

This is using the garmin standards:
 * http://www.garmin.com/xmlschemas/GpxExtensions/v3
 * http://www.garmin.com/xmlschemas/TrackPointExtension/v1

Added option to show heart-rate plot.

263. By Qball Cow

Add start of cal. calc function.

264. By Qball Cow

Add fit parser.. split parsing.

265. By Qball Cow <email address hidden>

When only hr and no gpx locations, add them at previous location.
This seems to improve plot when waiting before traffic light.

266. By Qball Cow <email address hidden>

Accidently commited some of the changes of Christian in previous commit.
My apologies.

267. By Qball Cow <email address hidden>

Small fix for fit file without position data.

268. By Qball Cow

Remove translation + set_z_position as they do not exist on my system.
(clutter to old)

So far it seems to work correct

Update libchamplain bindings.. looks like we do not need to include them anymore.

269. By Qball Cow

Updates.

270. By Christian Krause

Distribute gpx-viewer.vapi in tarball

Add vapi/gpx-viewer.vapi to EXTRA_DIST to include it in the tarball.
The file is necessary to recompile the vala sources into C sources.

271. By Christian Krause

Lower required version of champlain to 0.12.3

Require for clutter-gtk package

272. By Christian Krause

Usability fixes:

- when starting gpx-viewer for the first time, open the left side pane
- when opening a gpx track, display it immediately
- don't allow to undock 3 dock items (it can happen easily that they are undocked accidentally and get lost or closed)

273. By Christian Krause

Fix compile warnings and deprecation warnings in C sources

274. By Christian Krause

Fix compilation warnings and deprecation warnings in vala sources

275. By Christian Krause

Add -Wno-unused-but-set-variable to maintainer CFLAGS to avoid warnings caused by C files generated out of the vala sources

276. By Christian Krause

first test of calculating the accumulated elevation

277. By Christian Krause

Let button event callbacks return true to consume event and avoid that KDE Oxygen's window drag mode "Drag windows from all empty areas" always moves the window when using the Graph window to mark a part of the track.

278. By Christian Krause

Remove debug output

279. By Christian Krause

Remove debug output
Fix off-by-one bug when calculating accumulated elevation

Unmerged revisions

279. By Christian Krause

Remove debug output
Fix off-by-one bug when calculating accumulated elevation

278. By Christian Krause

Remove debug output

277. By Christian Krause

Let button event callbacks return true to consume event and avoid that KDE Oxygen's window drag mode "Drag windows from all empty areas" always moves the window when using the Graph window to mark a part of the track.

276. By Christian Krause

first test of calculating the accumulated elevation

275. By Christian Krause

Add -Wno-unused-but-set-variable to maintainer CFLAGS to avoid warnings caused by C files generated out of the vala sources

274. By Christian Krause

Fix compilation warnings and deprecation warnings in vala sources

273. By Christian Krause

Fix compile warnings and deprecation warnings in C sources

272. By Christian Krause

Usability fixes:

- when starting gpx-viewer for the first time, open the left side pane
- when opening a gpx track, display it immediately
- don't allow to undock 3 dock items (it can happen easily that they are undocked accidentally and get lost or closed)

271. By Christian Krause

Lower required version of champlain to 0.12.3

Require for clutter-gtk package

270. By Christian Krause

Distribute gpx-viewer.vapi in tarball

Add vapi/gpx-viewer.vapi to EXTRA_DIST to include it in the tarball.
The file is necessary to recompile the vala sources into C sources.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile.am'
--- Makefile.am 2013-10-03 18:20:08 +0000
+++ Makefile.am 2013-10-14 21:07:05 +0000
@@ -89,14 +89,15 @@
89 -I$(top_builddir)/src89 -I$(top_builddir)/src
9090
91if MAINTAINER_MODE91if MAINTAINER_MODE
92AM_CFLAGS+=-Wall -Wdeclaration-after-statement -Wshadow -fno-common -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wold-style-definition -Wmissing-declarations -Wredundant-decls -Wmissing-noreturn -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wnested-externs -Wmissing-format-attribute -Waggregate-return -Wundef -Wmissing-include-dirs -Winit-self -Wswitch-default -Wswitch-enum92AM_CFLAGS+=-Wall -Wdeclaration-after-statement -Wshadow -fno-common -Wextra -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-missing-field-initializers -Wold-style-definition -Wmissing-declarations -Wredundant-decls -Wmissing-noreturn -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wnested-externs -Wmissing-format-attribute -Waggregate-return -Wundef -Wmissing-include-dirs -Winit-self -Wswitch-default -Wswitch-enum
93endif93endif
9494
95EXTRA_DIST+=\95EXTRA_DIST+=\
96 vapi/config.vapi\96 vapi/config.vapi\
97 vapi/gpx-viewer.vapi\
97 vapi/champlain-0.12.vapi\98 vapi/champlain-0.12.vapi\
98 vapi/champlain-gtk-0.12.vapi\99 vapi/champlain-gtk-0.12.vapi\
99 src/gpx-viewer-path-layer.h\100 src/gpx-viewer-path-layer.h\
100 src/gpx-viewer.h101 src/gpx-viewer.h
101102
102##103##
103104
=== modified file 'configure.ac'
--- configure.ac 2013-10-04 09:24:26 +0000
+++ configure.ac 2013-10-14 21:07:05 +0000
@@ -60,8 +60,12 @@
60 gdl-3.060 gdl-3.0
61])61])
62PKG_CHECK_MODULES([champlain], [62PKG_CHECK_MODULES([champlain], [
63 champlain-gtk-0.12 >= 0.12.463 champlain-gtk-0.12 >= 0.12.3
64 champlain-0.12 >= 0.12.464 champlain-0.12 >= 0.12.3
65])
66
67PKG_CHECK_MODULES([clutter], [
68 clutter-gtk-1.0 >= 1.1.2
65])69])
6670
6771
6872
=== modified file 'data/gpx-viewer.ui'
--- data/gpx-viewer.ui 2013-10-10 20:18:04 +0000
+++ data/gpx-viewer.ui 2013-10-14 21:07:05 +0000
@@ -767,6 +767,7 @@
767 <object class="GtkHBox" id="main_view_hpane">767 <object class="GtkHBox" id="main_view_hpane">
768 <property name="visible">True</property>768 <property name="visible">True</property>
769 <property name="can_focus">True</property>769 <property name="can_focus">True</property>
770 <property name="width-request">350</property>
770 </object>771 </object>
771 <packing>772 <packing>
772 <property name="resize">False</property>773 <property name="resize">False</property>
@@ -1013,15 +1014,460 @@
1013 <property name="can_focus">True</property>1014 <property name="can_focus">True</property>
1014 <property name="use_action_appearance">False</property>1015 <property name="use_action_appearance">False</property>
1015 <property name="active">True</property>1016 <property name="active">True</property>
1016 </object>1017<<<<<<< TREE
1017 </child>1018 </object>
1018 </object>1019 </child>
1019 <packing>1020 </object>
1020 <property name="left_attach">1</property>1021 <packing>
1021 <property name="right_attach">2</property>1022 <property name="left_attach">1</property>
1022 <property name="top_attach">4</property>1023 <property name="right_attach">2</property>
1023 <property name="bottom_attach">5</property>1024 <property name="top_attach">4</property>
1024 <property name="x_options">GTK_FILL</property>1025 <property name="bottom_attach">5</property>
1026 <property name="x_options">GTK_FILL</property>
1027=======
1028 <signal name="notify::active" handler="graph_show_points_toggled_cb"/>
1029 </object>
1030 </child>
1031 </object>
1032 <packing>
1033 <property name="left_attach">1</property>
1034 <property name="right_attach">2</property>
1035 <property name="top_attach">4</property>
1036 <property name="bottom_attach">5</property>
1037 <property name="x_options">GTK_FILL</property>
1038 <property name="y_options">GTK_FILL</property>
1039 </packing>
1040 </child>
1041 </object>
1042 <object class="GtkTable" id="TrackInfoWidget">
1043 <property name="visible">True</property>
1044 <property name="n_rows">11</property>
1045 <property name="n_columns">2</property>
1046 <property name="column_spacing">6</property>
1047 <property name="row_spacing">6</property>
1048 <child>
1049 <object class="GtkLabel" id="distance_title_label">
1050 <property name="visible">True</property>
1051 <property name="xalign">1</property>
1052 <property name="label" translatable="yes">&lt;b&gt;Distance:&lt;/b&gt;</property>
1053 <property name="use_markup">True</property>
1054 </object>
1055 <packing>
1056 <property name="x_options">GTK_FILL</property>
1057 <property name="y_options">GTK_FILL</property>
1058 </packing>
1059 </child>
1060 <child>
1061 <object class="GtkLabel" id="duration_title_label">
1062 <property name="visible">True</property>
1063 <property name="xalign">1</property>
1064 <property name="label" translatable="yes">&lt;b&gt;Duration:&lt;/b&gt;</property>
1065 <property name="use_markup">True</property>
1066 </object>
1067 <packing>
1068 <property name="top_attach">1</property>
1069 <property name="bottom_attach">2</property>
1070 <property name="x_options">GTK_FILL</property>
1071 <property name="y_options">GTK_FILL</property>
1072 </packing>
1073 </child>
1074 <child>
1075 <object class="GtkLabel" id="distance_label">
1076 <property name="visible">True</property>
1077 <property name="xalign">0</property>
1078 <property name="label" translatable="yes">n/a</property>
1079 <property name="ellipsize">end</property>
1080 </object>
1081 <packing>
1082 <property name="left_attach">1</property>
1083 <property name="right_attach">2</property>
1084 <property name="y_options">GTK_FILL</property>
1085 </packing>
1086 </child>
1087 <child>
1088 <object class="GtkLabel" id="duration_label">
1089 <property name="visible">True</property>
1090 <property name="xalign">0</property>
1091 <property name="label" translatable="yes">n/a</property>
1092 <property name="ellipsize">end</property>
1093 </object>
1094 <packing>
1095 <property name="left_attach">1</property>
1096 <property name="right_attach">2</property>
1097 <property name="top_attach">1</property>
1098 <property name="bottom_attach">2</property>
1099 <property name="y_options">GTK_FILL</property>
1100 </packing>
1101 </child>
1102 <child>
1103 <object class="GtkLabel" id="average_title_label">
1104 <property name="visible">True</property>
1105 <property name="xalign">1</property>
1106 <property name="label" translatable="yes">&lt;b&gt;Average:&lt;/b&gt;</property>
1107 <property name="use_markup">True</property>
1108 </object>
1109 <packing>
1110 <property name="top_attach">4</property>
1111 <property name="bottom_attach">5</property>
1112 <property name="x_options">GTK_FILL</property>
1113 <property name="y_options">GTK_FILL</property>
1114 </packing>
1115 </child>
1116 <child>
1117 <object class="GtkLabel" id="moving_average_title_label">
1118 <property name="visible">True</property>
1119 <property name="xalign">1</property>
1120 <property name="label" translatable="yes">&lt;b&gt;Moving average:&lt;/b&gt;</property>
1121 <property name="use_markup">True</property>
1122 </object>
1123 <packing>
1124 <property name="top_attach">5</property>
1125 <property name="bottom_attach">6</property>
1126 <property name="x_options">GTK_FILL</property>
1127 <property name="y_options">GTK_FILL</property>
1128 </packing>
1129 </child>
1130 <child>
1131 <object class="GtkLabel" id="moving_averate_time_title_label">
1132 <property name="visible">True</property>
1133 <property name="xalign">1</property>
1134 <property name="label" translatable="yes">&lt;b&gt;Moving time:&lt;/b&gt;</property>
1135 <property name="use_markup">True</property>
1136 </object>
1137 <packing>
1138 <property name="top_attach">6</property>
1139 <property name="bottom_attach">7</property>
1140 <property name="x_options">GTK_FILL</property>
1141 <property name="y_options">GTK_FILL</property>
1142 </packing>
1143 </child>
1144 <child>
1145 <object class="GtkLabel" id="max_speed_title_label">
1146 <property name="visible">True</property>
1147 <property name="xalign">1</property>
1148 <property name="label" translatable="yes">&lt;b&gt;Max. speed:&lt;/b&gt;</property>
1149 <property name="use_markup">True</property>
1150 </object>
1151 <packing>
1152 <property name="top_attach">7</property>
1153 <property name="bottom_attach">8</property>
1154 <property name="x_options">GTK_FILL</property>
1155 <property name="y_options">GTK_FILL</property>
1156 </packing>
1157 </child>
1158 <child>
1159 <object class="GtkLabel" id="elevation_difference_title_label">
1160 <property name="visible">True</property>
1161 <property name="xalign">1</property>
1162 <property name="label" translatable="yes">&lt;b&gt;Elevation Diff.:&lt;/b&gt;</property>
1163 <property name="use_markup">True</property>
1164 </object>
1165 <packing>
1166 <property name="top_attach">8</property>
1167 <property name="bottom_attach">9</property>
1168 <property name="x_options">GTK_FILL</property>
1169 <property name="y_options">GTK_FILL</property>
1170 </packing>
1171 </child>
1172 <child>
1173 <object class="GtkLabel" id="elevation_total_up_title_label">
1174 <property name="visible">True</property>
1175 <property name="xalign">1</property>
1176 <property name="label" translatable="yes">&lt;b&gt;Acc. Elevation Up:&lt;/b&gt;</property>
1177 <property name="use_markup">True</property>
1178 </object>
1179 <packing>
1180 <property name="top_attach">9</property>
1181 <property name="bottom_attach">10</property>
1182 <property name="x_options">GTK_FILL</property>
1183 <property name="y_options">GTK_FILL</property>
1184 </packing>
1185 </child>
1186 <child>
1187 <object class="GtkLabel" id="elevation_total_down_title_label">
1188 <property name="visible">True</property>
1189 <property name="xalign">1</property>
1190 <property name="label" translatable="yes">&lt;b&gt;Acc. Elevation Down:&lt;/b&gt;</property>
1191 <property name="use_markup">True</property>
1192 </object>
1193 <packing>
1194 <property name="top_attach">10</property>
1195 <property name="bottom_attach">11</property>
1196 <property name="x_options">GTK_FILL</property>
1197 <property name="y_options">GTK_FILL</property>
1198 </packing>
1199 </child>
1200 <child>
1201 <object class="GtkLabel" id="gradient_title_label">
1202 <property name="visible">True</property>
1203 <property name="xalign">1</property>
1204 <property name="label" translatable="yes">&lt;b&gt;Gradient:&lt;/b&gt;</property>
1205 <property name="use_markup">True</property>
1206 </object>
1207 <packing>
1208 <property name="top_attach">11</property>
1209 <property name="bottom_attach">12</property>
1210 <property name="x_options">GTK_FILL</property>
1211 <property name="y_options">GTK_FILL</property>
1212 </packing>
1213 </child>
1214 <child>
1215 <object class="GtkLabel" id="average_label">
1216 <property name="visible">True</property>
1217 <property name="xalign">0</property>
1218 <property name="label" translatable="yes">n/a</property>
1219 <property name="ellipsize">end</property>
1220 </object>
1221 <packing>
1222 <property name="left_attach">1</property>
1223 <property name="right_attach">2</property>
1224 <property name="top_attach">4</property>
1225 <property name="bottom_attach">5</property>
1226 <property name="y_options">GTK_FILL</property>
1227 </packing>
1228 </child>
1229 <child>
1230 <object class="GtkLabel" id="moving_average_label">
1231 <property name="visible">True</property>
1232 <property name="xalign">0</property>
1233 <property name="label" translatable="yes">n/a</property>
1234 <property name="ellipsize">end</property>
1235 </object>
1236 <packing>
1237 <property name="left_attach">1</property>
1238 <property name="right_attach">2</property>
1239 <property name="top_attach">5</property>
1240 <property name="bottom_attach">6</property>
1241 <property name="y_options">GTK_FILL</property>
1242 </packing>
1243 </child>
1244 <child>
1245 <object class="GtkLabel" id="moving_average_time_label">
1246 <property name="visible">True</property>
1247 <property name="xalign">0</property>
1248 <property name="label" translatable="yes">n/a</property>
1249 <property name="ellipsize">end</property>
1250 </object>
1251 <packing>
1252 <property name="left_attach">1</property>
1253 <property name="right_attach">2</property>
1254 <property name="top_attach">6</property>
1255 <property name="bottom_attach">7</property>
1256 <property name="y_options">GTK_FILL</property>
1257 </packing>
1258 </child>
1259 <child>
1260 <object class="GtkLabel" id="max_speed_label">
1261 <property name="visible">True</property>
1262 <property name="xalign">0</property>
1263 <property name="label" translatable="yes">n/a</property>
1264 <property name="ellipsize">end</property>
1265 </object>
1266 <packing>
1267 <property name="left_attach">1</property>
1268 <property name="right_attach">2</property>
1269 <property name="top_attach">7</property>
1270 <property name="bottom_attach">8</property>
1271 <property name="y_options">GTK_FILL</property>
1272 </packing>
1273 </child>
1274 <child>
1275 <object class="GtkLabel" id="elevation_difference_label">
1276 <property name="visible">True</property>
1277 <property name="xalign">0</property>
1278 <property name="label" translatable="yes">n/a</property>
1279 <property name="ellipsize">end</property>
1280 </object>
1281 <packing>
1282 <property name="left_attach">1</property>
1283 <property name="right_attach">2</property>
1284 <property name="top_attach">8</property>
1285 <property name="bottom_attach">9</property>
1286 <property name="y_options">GTK_FILL</property>
1287 </packing>
1288 </child>
1289 <child>
1290 <object class="GtkLabel" id="elevation_total_up_label">
1291 <property name="visible">True</property>
1292 <property name="xalign">0</property>
1293 <property name="label" translatable="yes">n/a</property>
1294 <property name="ellipsize">end</property>
1295 </object>
1296 <packing>
1297 <property name="left_attach">1</property>
1298 <property name="right_attach">2</property>
1299 <property name="top_attach">9</property>
1300 <property name="bottom_attach">10</property>
1301 <property name="y_options">GTK_FILL</property>
1302 </packing>
1303 </child>
1304 <child>
1305 <object class="GtkLabel" id="elevation_total_down_label">
1306 <property name="visible">True</property>
1307 <property name="xalign">0</property>
1308 <property name="label" translatable="yes">n/a</property>
1309 <property name="ellipsize">end</property>
1310 </object>
1311 <packing>
1312 <property name="left_attach">1</property>
1313 <property name="right_attach">2</property>
1314 <property name="top_attach">10</property>
1315 <property name="bottom_attach">11</property>
1316 <property name="y_options">GTK_FILL</property>
1317 </packing>
1318 </child>
1319 <child>
1320 <object class="GtkLabel" id="gradient_label">
1321 <property name="visible">True</property>
1322 <property name="xalign">0</property>
1323 <property name="label" translatable="yes">n/a</property>
1324 <property name="ellipsize">end</property>
1325 </object>
1326 <packing>
1327 <property name="left_attach">1</property>
1328 <property name="right_attach">2</property>
1329 <property name="top_attach">11</property>
1330 <property name="bottom_attach">12</property>
1331 <property name="y_options">GTK_FILL</property>
1332 </packing>
1333 </child>
1334 <child>
1335 <object class="GtkLabel" id="label4">
1336 <property name="visible">True</property>
1337 <property name="xalign">1</property>
1338 <property name="label" translatable="yes">&lt;b&gt;Playback:&lt;/b&gt;</property>
1339 <property name="use_markup">True</property>
1340 </object>
1341 <packing>
1342 <property name="top_attach">12</property>
1343 <property name="bottom_attach">13</property>
1344 <property name="x_options">GTK_FILL</property>
1345 <property name="y_options">GTK_FILL</property>
1346 </packing>
1347 </child>
1348 <child>
1349 <object class="GtkHBox" id="hbox1">
1350 <property name="visible">True</property>
1351 <child>
1352 <object class="GtkEventBox" id="eventbox3">
1353 <property name="visible">True</property>
1354 <property name="visible_window">False</property>
1355 <signal name="button_press_event" handler="playback_play_clicked"/>
1356 <child>
1357 <object class="GtkImage" id="play_button">
1358 <property name="visible">True</property>
1359 <property name="stock">gtk-media-play</property>
1360 <property name="icon-size">1</property>
1361 </object>
1362 </child>
1363 </object>
1364 <packing>
1365 <property name="expand">False</property>
1366 <property name="position">0</property>
1367 </packing>
1368 </child>
1369 <child>
1370 <object class="GtkEventBox" id="eventbox1">
1371 <property name="visible">True</property>
1372 <property name="sensitive">False</property>
1373 <property name="visible_window">False</property>
1374 <signal name="button_press_event" handler="playback_pause_clicked"/>
1375 <child>
1376 <object class="GtkImage" id="pause_clicked">
1377 <property name="visible">True</property>
1378 <property name="stock">gtk-media-pause</property>
1379 <property name="icon-size">1</property>
1380 </object>
1381 </child>
1382 </object>
1383 <packing>
1384 <property name="expand">False</property>
1385 <property name="position">1</property>
1386 </packing>
1387 </child>
1388 <child>
1389 <object class="GtkEventBox" id="eventbox2">
1390 <property name="visible">True</property>
1391 <property name="sensitive">False</property>
1392 <property name="visible_window">False</property>
1393 <signal name="button_press_event" handler="playback_stop_clicked"/>
1394 <child>
1395 <object class="GtkImage" id="image2">
1396 <property name="visible">True</property>
1397 <property name="stock">gtk-media-stop</property>
1398 <property name="icon-size">1</property>
1399 </object>
1400 </child>
1401 </object>
1402 <packing>
1403 <property name="expand">False</property>
1404 <property name="position">2</property>
1405 </packing>
1406 </child>
1407 </object>
1408 <packing>
1409 <property name="left_attach">1</property>
1410 <property name="right_attach">2</property>
1411 <property name="top_attach">12</property>
1412 <property name="bottom_attach">13</property>
1413 <property name="x_options">GTK_FILL</property>
1414 <property name="y_options">GTK_FILL</property>
1415 </packing>
1416 </child>
1417 <child>
1418 <object class="GtkLabel" id="start_time_title_label">
1419 <property name="visible">True</property>
1420 <property name="xalign">1</property>
1421 <property name="label" translatable="yes">&lt;b&gt;Start time:&lt;/b&gt;</property>
1422 <property name="use_markup">True</property>
1423 </object>
1424 <packing>
1425 <property name="top_attach">2</property>
1426 <property name="bottom_attach">3</property>
1427 <property name="x_options">GTK_FILL</property>
1428 <property name="y_options">GTK_FILL</property>
1429 </packing>
1430 </child>
1431 <child>
1432 <object class="GtkLabel" id="stop_time_title_label">
1433 <property name="visible">True</property>
1434 <property name="xalign">1</property>
1435 <property name="label" translatable="yes">&lt;b&gt;Stop time:&lt;/b&gt;</property>
1436 <property name="use_markup">True</property>
1437 </object>
1438 <packing>
1439 <property name="top_attach">3</property>
1440 <property name="bottom_attach">4</property>
1441 <property name="x_options">GTK_FILL</property>
1442 <property name="y_options">GTK_FILL</property>
1443 </packing>
1444 </child>
1445 <child>
1446 <object class="GtkLabel" id="start_time_label">
1447 <property name="visible">True</property>
1448 <property name="xalign">0</property>
1449 <property name="label" translatable="yes">n/a</property>
1450 </object>
1451 <packing>
1452 <property name="left_attach">1</property>
1453 <property name="right_attach">2</property>
1454 <property name="top_attach">2</property>
1455 <property name="bottom_attach">3</property>
1456 <property name="y_options">GTK_FILL</property>
1457 </packing>
1458 </child>
1459 <child>
1460 <object class="GtkLabel" id="stop_time_label">
1461 <property name="visible">True</property>
1462 <property name="xalign">0</property>
1463 <property name="label" translatable="yes">n/a</property>
1464 </object>
1465 <packing>
1466 <property name="left_attach">1</property>
1467 <property name="right_attach">2</property>
1468 <property name="top_attach">3</property>
1469 <property name="bottom_attach">4</property>
1470>>>>>>> MERGE-SOURCE
1025 <property name="y_options">GTK_FILL</property>1471 <property name="y_options">GTK_FILL</property>
1026 </packing>1472 </packing>
1027 </child>1473 </child>
10281474
=== modified file 'src/gpx-graph.vala'
--- src/gpx-graph.vala 2013-10-01 12:54:46 +0000
+++ src/gpx-graph.vala 2013-10-14 21:07:05 +0000
@@ -205,7 +205,7 @@
205 }205 }
206 private bool button_press_event_cb(Gdk.EventButton event)206 private bool button_press_event_cb(Gdk.EventButton event)
207 {207 {
208 if(this.track == null) return false;208 if(this.track == null) return true;
209 Gpx.Point *point = this.get_point_from_position(event.x, event.y);209 Gpx.Point *point = this.get_point_from_position(event.x, event.y);
210 if(point != null) {210 if(point != null) {
211 if(event.button == 1){211 if(event.button == 1){
@@ -215,13 +215,13 @@
215 point_clicked(point);215 point_clicked(point);
216 }216 }
217 }217 }
218 return false;218 return true;
219 }219 }
220220
221 private bool motion_notify_event_cb(Gdk.EventMotion event)221 private bool motion_notify_event_cb(Gdk.EventMotion event)
222 {222 {
223 if(this.track == null) return false;223 if(this.track == null) return true;
224 if(this.start == null) return false;224 if(this.start == null) return true;
225225
226 Gpx.Point *point = this.get_point_from_position(event.x, event.y);226 Gpx.Point *point = this.get_point_from_position(event.x, event.y);
227 if(point != null)227 if(point != null)
@@ -238,16 +238,16 @@
238 } else {238 } else {
239 selection_changed(this.track, stop, start);239 selection_changed(this.track, stop, start);
240 }240 }
241 return false;241 return true;
242 }242 }
243 }243 }
244 selection_changed(this.track, this.track.points.first().data, this.track.points.last().data);244 selection_changed(this.track, this.track.points.first().data, this.track.points.last().data);
245 }245 }
246 return false;246 return true;
247 }247 }
248 private bool button_release_event_cb(Gdk.EventButton event)248 private bool button_release_event_cb(Gdk.EventButton event)
249 {249 {
250 if(this.track == null) return false;250 if(this.track == null) return true;
251 Gpx.Point *point = this.get_point_from_position(event.x, event.y);251 Gpx.Point *point = this.get_point_from_position(event.x, event.y);
252 if(point != null)252 if(point != null)
253 {253 {
@@ -266,13 +266,13 @@
266 } else {266 } else {
267 selection_changed(this.track, stop, start);267 selection_changed(this.track, stop, start);
268 }268 }
269 return false;269 return true;
270 }270 }
271 }271 }
272 selection_changed(this.track, this.track.points.first().data, this.track.points.last().data);272 selection_changed(this.track, this.track.points.first().data, this.track.points.last().data);
273 }273 }
274 }274 }
275 return false;275 return true;
276 }276 }
277 private void size_allocate_cb(Gtk.Allocation alloc)277 private void size_allocate_cb(Gtk.Allocation alloc)
278 {278 {
@@ -437,7 +437,6 @@
437 ctx.stroke();437 ctx.stroke();
438438
439 /* Draw time units. */439 /* Draw time units. */
440 weak List<Point?> iter = track.points.first();
441440
442 fd.set_absolute_size(12*1024);441 fd.set_absolute_size(12*1024);
443 layout.set_font_description(fd);442 layout.set_font_description(fd);
@@ -721,9 +720,9 @@
721 layout.set_font_description(fd);720 layout.set_font_description(fd);
722 string mtext = "";721 string mtext = "";
723 if(_do_miles) {722 if(_do_miles) {
724 mtext = _(this.GraphModeMiles[this._mode]);723 mtext = _(Graph.GraphModeMiles[this._mode]);
725 }else{724 }else{
726 mtext = _(this.GraphModeName[this._mode]);725 mtext = _(Graph.GraphModeName[this._mode]);
727 }726 }
728 if(this._smooth_factor != 1)727 if(this._smooth_factor != 1)
729 {728 {
730729
=== modified file 'src/gpx-parser-xml.vala'
--- src/gpx-parser-xml.vala 2013-10-03 15:34:26 +0000
+++ src/gpx-parser-xml.vala 2013-10-14 21:07:05 +0000
@@ -47,8 +47,8 @@
47 {47 {
48 Point p = new Point();48 Point p = new Point();
49 // TODO: Move parsing into Point class.49 // TODO: Move parsing into Point class.
50 double flat = lat.to_double();50 double flat = double.parse(lat);
51 double flon = lon.to_double();51 double flon = double.parse(lon);
52 p.set_position(flat, flon);52 p.set_position(flat, flon);
53 var info = point->children;53 var info = point->children;
54 while(info != null)54 while(info != null)
@@ -58,7 +58,7 @@
58 {58 {
59 var content = info->get_content();59 var content = info->get_content();
60 if(content != null)60 if(content != null)
61 p.elevation = content.to_double();61 p.elevation = double.parse(content);
62 }62 }
63 else if (info->name == "time")63 else if (info->name == "time")
64 {64 {
@@ -75,7 +75,7 @@
75 {75 {
76 if(ext->name == "hr") {76 if(ext->name == "hr") {
77 var val= ext->get_content();77 var val= ext->get_content();
78 p.tpe.heartrate = val.to_int();78 p.tpe.heartrate = int.parse(val);
79 }79 }
80 } 80 }
81 }81 }
@@ -120,8 +120,8 @@
120 if(lat != null && lon != null)120 if(lat != null && lon != null)
121 {121 {
122 Point p = new Point();122 Point p = new Point();
123 double flat = lat.to_double();123 double flat = double.parse(lat);
124 double flon = lon.to_double();124 double flon = double.parse(lon);
125 p.set_position(flat, flon);125 p.set_position(flat, flon);
126 var info = node->children;126 var info = node->children;
127 while(info != null)127 while(info != null)
@@ -159,8 +159,8 @@
159 if(lat != null && lon != null)159 if(lat != null && lon != null)
160 {160 {
161 Point p = new Point();161 Point p = new Point();
162 double flat = lat.to_double();162 double flat = double.parse(lat);
163 double flon = lon.to_double();163 double flon = double.parse(lon);
164 p.set_position(flat, flon);164 p.set_position(flat, flon);
165 var info = trkseg->children;165 var info = trkseg->children;
166 while(info != null)166 while(info != null)
@@ -170,7 +170,7 @@
170 {170 {
171 var content = info->get_content();171 var content = info->get_content();
172 if(content != null)172 if(content != null)
173 p.elevation = content.to_double();173 p.elevation = double.parse(content);
174 }174 }
175 else if (info->name == "time")175 else if (info->name == "time")
176 {176 {
177177
=== modified file 'src/gpx-parser.vala'
--- src/gpx-parser.vala 2013-10-10 20:18:04 +0000
+++ src/gpx-parser.vala 2013-10-14 21:07:05 +0000
@@ -44,6 +44,7 @@
44 public double distance =0;44 public double distance =0;
45 /* Elevation */45 /* Elevation */
46 public double elevation;46 public double elevation;
47 public double smooth_elevation;
47 /* Time */48 /* Time */
48 public string time;49 public string time;
49 /* The speed (only if part of track */50 /* The speed (only if part of track */
@@ -78,6 +79,7 @@
78 p.lon_dec = this.lon_dec;79 p.lon_dec = this.lon_dec;
79 p.time = this.time;80 p.time = this.time;
80 p.elevation = this.elevation;81 p.elevation = this.elevation;
82 p.smooth_elevation = this.smooth_elevation;
81 p.tpe = this.tpe;83 p.tpe = this.tpe;
82 return p;84 return p;
83 }85 }
@@ -239,13 +241,42 @@
239 if(point.elevation < this.min_elevation) this.min_elevation = point.elevation;241 if(point.elevation < this.min_elevation) this.min_elevation = point.elevation;
240 point.distance = 0;242 point.distance = 0;
241 }243 }
244 // radius in km
245 double radius = 0.2;
246
247 // add current point
248 double elevation_value = point.elevation * radius;
249 double weights = radius;
250
251 // add previous points within the radius
252 unowned List<Point> ?env_iter = iter;
253 int i = 0;
254 while ((env_iter = env_iter.prev) != null) {
255 i++;
256 double mydist = calculate_distance(env_iter.data, point);
257 if (mydist < radius) {
258 elevation_value += (env_iter.data.elevation * (radius - mydist));
259 weights += (radius - mydist);
260 } else break;
261 }
262 // add following points within the radius
263 env_iter = iter;
264 while ((env_iter = env_iter.prev) != null) {
265 i++;
266 double mydist = calculate_distance(env_iter.data, point);
267 if (mydist < radius) {
268 elevation_value += (env_iter.data.elevation * (radius - mydist));
269 weights += (radius - mydist);
270 } else break;
271 }
272 point.smooth_elevation = elevation_value / weights;
273 log(LOG_DOMAIN, LogLevelFlags.LEVEL_DEBUG, "Used %d points in radius of %f m", i, radius * 1000.0);
242 if(point.has_position()) {274 if(point.has_position()) {
243 last = iter;275 last = iter;
244 }276 }
245 }277 }
246 }278 }
247279
248
249 public void add_point (Point point)280 public void add_point (Point point)
250 {281 {
251 /* Make sure this is 0 */282 /* Make sure this is 0 */
@@ -256,7 +287,6 @@
256 var distance = calculate_distance(last, point);287 var distance = calculate_distance(last, point);
257 this.total_distance += distance;288 this.total_distance += distance;
258 point.distance = this.total_distance;289 point.distance = this.total_distance;
259
260 /* Update the 2 bounding box points */290 /* Update the 2 bounding box points */
261 if(top == null || top.lat_dec == 1000 || top.lat_dec < point.lat_dec)291 if(top == null || top.lat_dec == 1000 || top.lat_dec < point.lat_dec)
262 {292 {
@@ -321,7 +351,6 @@
321 iter = iter.next;351 iter = iter.next;
322 }352 }
323 deviation /= num_points; 353 deviation /= num_points;
324 var sqrt_deviation = Math.sqrt(deviation);
325354
326 iter = list_copy.first();355 iter = list_copy.first();
327 uint i =0;356 uint i =0;
@@ -443,6 +472,28 @@
443 return distance/(time/(60.0*60.0));472 return distance/(time/(60.0*60.0));
444 }473 }
445474
475 public void calculate_total_elevation(Gpx.Point start, Gpx.Point stop, out double up, out double down)
476 {
477 up = 0.0;
478 down = 0.0;
479 weak List<Point?> iter = this.points.find(start);
480 weak List<Point?> last = null;
481 if(iter == null) return;
482
483 if((iter)!=null)
484 {
485 do {
486 if (last != null) {
487 if(iter.data.smooth_elevation > last.data.smooth_elevation) {
488 up += (iter.data.smooth_elevation - last.data.smooth_elevation);
489 } else {
490 down += (last.data.smooth_elevation - iter.data.smooth_elevation);
491 }
492 }
493 last = iter;
494 } while((iter = iter.next) != null && iter.prev.data != stop);
495 }
496 }
446 /**497 /**
447 * @param lon_a longitude in radians of point a498 * @param lon_a longitude in radians of point a
448 * @param lat_a latitude in radians of point a499 * @param lat_a latitude in radians of point a
449500
=== modified file 'src/gpx-settings.vala'
--- src/gpx-settings.vala 2013-10-10 20:18:04 +0000
+++ src/gpx-settings.vala 2013-10-14 21:07:05 +0000
@@ -100,7 +100,7 @@
100 object.get_property(sp.name, ref value);100 object.get_property(sp.name, ref value);
101 if(sp.value_type == typeof(int)) {101 if(sp.value_type == typeof(int)) {
102 pref.keyfile.set_integer(t.name(), sp.name, value.get_int());102 pref.keyfile.set_integer(t.name(), sp.name, value.get_int());
103 }else if (sp.value_type.is_a(pref.enum_type)) {103 }else if (sp.value_type.is_a(Settings.enum_type)) {
104 pref.keyfile.set_integer(t.name(), sp.name, (int)value.get_enum());104 pref.keyfile.set_integer(t.name(), sp.name, (int)value.get_enum());
105 }else if (sp.value_type.is_a(typeof(bool))) {105 }else if (sp.value_type.is_a(typeof(bool))) {
106 pref.keyfile.set_boolean(t.name(), sp.name, value.get_boolean());106 pref.keyfile.set_boolean(t.name(), sp.name, value.get_boolean());
107107
=== modified file 'src/gpx-track-treemodel.vala'
--- src/gpx-track-treemodel.vala 2013-07-11 19:50:12 +0000
+++ src/gpx-track-treemodel.vala 2013-10-14 21:07:05 +0000
@@ -56,6 +56,7 @@
5656
57 public bool get_iter (out Gtk.TreeIter iter, Gtk.TreePath path)57 public bool get_iter (out Gtk.TreeIter iter, Gtk.TreePath path)
58 {58 {
59 iter = Gtk.TreeIter();
59 int depth = path.get_depth ();60 int depth = path.get_depth ();
60 assert (depth == 1);61 assert (depth == 1);
61 int n = path.get_indices ()[0];62 int n = path.get_indices ()[0];
@@ -113,6 +114,7 @@
113 * Should never be reached since iter_has_child is never true114 * Should never be reached since iter_has_child is never true
114 */115 */
115 public bool iter_children (out Gtk.TreeIter iter, Gtk.TreeIter? parent){116 public bool iter_children (out Gtk.TreeIter iter, Gtk.TreeIter? parent){
117 iter = Gtk.TreeIter();
116 return false;118 return false;
117 }119 }
118120
@@ -157,6 +159,7 @@
157159
158 public bool iter_nth_child (out Gtk.TreeIter iter, Gtk.TreeIter? parent, int n)160 public bool iter_nth_child (out Gtk.TreeIter iter, Gtk.TreeIter? parent, int n)
159 {161 {
162 iter = Gtk.TreeIter();
160 if (parent == null)163 if (parent == null)
161 return false;164 return false;
162 if (n<0 || n>= this.track.points.length ())165 if (n<0 || n>= this.track.points.length ())
@@ -170,6 +173,7 @@
170 * again, not implemented since this is not a tree173 * again, not implemented since this is not a tree
171 */174 */
172 public bool iter_parent (out Gtk.TreeIter iter, Gtk.TreeIter child){175 public bool iter_parent (out Gtk.TreeIter iter, Gtk.TreeIter child){
176 iter = Gtk.TreeIter();
173 return false;177 return false;
174 }178 }
175179
176180
=== modified file 'src/gpx-viewer.c'
--- src/gpx-viewer.c 2013-10-10 20:18:04 +0000
+++ src/gpx-viewer.c 2013-10-14 21:07:05 +0000
@@ -86,11 +86,12 @@
8686
87} GpxViewerPrivate;87} GpxViewerPrivate;
8888
89GType gpx_viewer_get_type (void);
90#define GPX_TYPE_VIEWER (gpx_viewer_get_type())
91
89G_DEFINE_TYPE (GpxViewer, gpx_viewer, GTK_TYPE_APPLICATION)92G_DEFINE_TYPE (GpxViewer, gpx_viewer, GTK_TYPE_APPLICATION)
90#define GPX_VIEWER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPX_TYPE_VIEWER, GpxViewerPrivate))93#define GPX_VIEWER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPX_TYPE_VIEWER, GpxViewerPrivate))
9194
92#define GPX_TYPE_VIEWER (gpx_viewer_get_type())
93
9495
9596
96static void gpx_viewer_init (GpxViewer *app)97static void gpx_viewer_init (GpxViewer *app)
@@ -479,11 +480,12 @@
479 elevation_diff = 0;480 elevation_diff = 0;
480 if (start && stop)481 if (start && stop)
481 {482 {
482 elevation_diff = stop->elevation - start->elevation;483 elevation_diff = stop->smooth_elevation - start->smooth_elevation;
483 distance_diff = stop->distance - start->distance;484 distance_diff = stop->distance - start->distance;
484 }485 }
485 gv_set_speed_label(label, elevation_diff, ELEVATION);486 gv_set_speed_label(label, elevation_diff, ELEVATION);
486 }487 }
488<<<<<<< TREE
487 /* Average heartrate */489 /* Average heartrate */
488 if(track != NULL) {490 if(track != NULL) {
489 label = (GtkWidget *) gtk_builder_get_object(priv->builder, "heart_rate_label");491 label = (GtkWidget *) gtk_builder_get_object(priv->builder, "heart_rate_label");
@@ -513,6 +515,16 @@
513 label = (GtkWidget *) gtk_builder_get_object(priv->builder, "calories_label");515 label = (GtkWidget *) gtk_builder_get_object(priv->builder, "calories_label");
514 gtk_label_set_text(GTK_LABEL(label), _("n/a"));516 gtk_label_set_text(GTK_LABEL(label), _("n/a"));
515 }517 }
518=======
519 if(track && start && stop) {
520 double up; double down;
521 gpx_track_calculate_total_elevation(track, start, stop, &up, &down);
522 label = (GtkWidget *) gtk_builder_get_object(priv->builder, "elevation_total_up_label");
523 gv_set_speed_label(label, up, ELEVATION);
524 label = (GtkWidget *) gtk_builder_get_object(priv->builder, "elevation_total_down_label");
525 gv_set_speed_label(label, down, ELEVATION);
526 }
527>>>>>>> MERGE-SOURCE
516}528}
517529
518530
@@ -533,7 +545,7 @@
533 //gpx_viewer_path_layer_set_stroke_color(route->path, &normal_track_color);545 //gpx_viewer_path_layer_set_stroke_color(route->path, &normal_track_color);
534 gpx_viewer_path_layer_set_track(route->path,route->track);546 gpx_viewer_path_layer_set_track(route->path,route->track);
535 champlain_view_add_layer(CHAMPLAIN_VIEW(view), CHAMPLAIN_LAYER(route->path));547 champlain_view_add_layer(CHAMPLAIN_VIEW(view), CHAMPLAIN_LAYER(route->path));
536 clutter_actor_set_depth(CLUTTER_ACTOR(route->path), -10);548 clutter_actor_set_z_position(CLUTTER_ACTOR(route->path), -10);
537 if(!route->visible) gpx_viewer_path_layer_set_visible(route->path, FALSE);549 if(!route->visible) gpx_viewer_path_layer_set_visible(route->path, FALSE);
538}550}
539551
@@ -643,7 +655,6 @@
643 if (route->track->top && route->track->bottom)655 if (route->track->top && route->track->bottom)
644 {656 {
645 ChamplainBoundingBox *track_bounding_box;657 ChamplainBoundingBox *track_bounding_box;
646 printf("zet zoom leveland view track\n");
647 champlain_view_set_zoom_level(view,658 champlain_view_set_zoom_level(view,
648 champlain_view_get_max_zoom_level(view));659 champlain_view_get_max_zoom_level(view));
649 track_bounding_box = champlain_bounding_box_new();660 track_bounding_box = champlain_bounding_box_new();
@@ -664,7 +675,6 @@
664675
665 if(route->stop){676 if(route->stop){
666 clutter_actor_show(CLUTTER_ACTOR(route->stop));677 clutter_actor_show(CLUTTER_ACTOR(route->stop));
667 printf("show stop marker\n");
668 }678 }
669679
670 if(route->start)680 if(route->start)
@@ -889,6 +899,7 @@
889 ChamplainView *view = gtk_champlain_embed_get_view(GTK_CHAMPLAIN_EMBED(priv->champlain_view));899 ChamplainView *view = gtk_champlain_embed_get_view(GTK_CHAMPLAIN_EMBED(priv->champlain_view));
890 /* Plot all tracks, and get total bounding box */900 /* Plot all tracks, and get total bounding box */
891 GtkTreeIter liter;901 GtkTreeIter liter;
902 GtkTreeSelection *gts = NULL;
892 GtkTreeModel *model = (GtkTreeModel *) gtk_builder_get_object(priv->builder, "routes_store");903 GtkTreeModel *model = (GtkTreeModel *) gtk_builder_get_object(priv->builder, "routes_store");
893 struct Route *route = g_new0(Route, 1);904 struct Route *route = g_new0(Route, 1);
894 /* Route */905 /* Route */
@@ -900,7 +911,7 @@
900 {911 {
901 route->track = g_object_ref(track);912 route->track = g_object_ref(track);
902 }913 }
903 route->visible = FALSE;914 route->visible = TRUE;
904915
905 /* draw the track */916 /* draw the track */
906 interface_map_plot_route(view, route);917 interface_map_plot_route(view, route);
@@ -956,6 +967,12 @@
956 }967 }
957968
958 priv->routes = g_list_append(priv->routes, route);969 priv->routes = g_list_append(priv->routes, route);
970 gts = gtk_tree_view_get_selection(GTK_TREE_VIEW(gtk_builder_get_object(priv->builder, "TracksTreeView")));
971 if (gts != NULL)
972 {
973 GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &liter);
974 gtk_tree_selection_select_path(gts, path);
975 }
959}976}
960977
961void main_window_size_changed(GtkWindow *win, GtkAllocation *alloc, gpointer data)978void main_window_size_changed(GtkWindow *win, GtkAllocation *alloc, gpointer data)
@@ -1149,8 +1166,16 @@
1149 GFile *afile = g_file_new_for_uri(uri);1166 GFile *afile = g_file_new_for_uri(uri);
1150 GpxFileBase *file;1167 GpxFileBase *file;
1151 /* Try to open the gpx file */1168 /* Try to open the gpx file */
1169<<<<<<< TREE
11521170
1153 file = gpx_file_open(afile, NULL);1171 file = gpx_file_open(afile, NULL);
1172=======
1173 if (g_str_has_suffix(uri, "fit")) {
1174 file = GPX_FILE_BASE(gpx_fit_file_new(afile));
1175 }else {
1176 file = GPX_FILE_BASE(gpx_xml_file_new(afile));
1177 }
1178>>>>>>> MERGE-SOURCE
1154 g_object_unref(afile);1179 g_object_unref(afile);
1155 g_free(uri);1180 g_free(uri);
1156 if(file != NULL) 1181 if(file != NULL)
@@ -1329,7 +1354,6 @@
1329 gint w,h;1354 gint w,h;
1330 GtkRecentFilter *grf;1355 GtkRecentFilter *grf;
1331 GtkWidget *dock;1356 GtkWidget *dock;
1332 GtkWidget *map_dock_item, *graph_dock_item;
13331357
1334 /* Open UI description file */1358 /* Open UI description file */
1335 priv->builder = gtk_builder_new();1359 priv->builder = gtk_builder_new();
@@ -1496,6 +1520,9 @@
1496 "File and track list",1520 "File and track list",
1497 GDL_DOCK_ITEM_BEH_CANT_CLOSE1521 GDL_DOCK_ITEM_BEH_CANT_CLOSE
1498 |GDL_DOCK_ITEM_BEH_CANT_ICONIFY1522 |GDL_DOCK_ITEM_BEH_CANT_ICONIFY
1523 |GDL_DOCK_ITEM_BEH_NEVER_FLOATING
1524 |GDL_DOCK_ITEM_BEH_NO_GRIP
1525 |GDL_DOCK_ITEM_BEH_LOCKED
1499 );1526 );
1500 gtk_container_add(GTK_CONTAINER(item), flw);1527 gtk_container_add(GTK_CONTAINER(item), flw);
1501 gdl_dock_add_item(GDL_DOCK(dock), GDL_DOCK_ITEM(item), GDL_DOCK_LEFT);1528 gdl_dock_add_item(GDL_DOCK(dock), GDL_DOCK_ITEM(item), GDL_DOCK_LEFT);
@@ -1507,6 +1534,9 @@
1507 "Detailed track information",1534 "Detailed track information",
1508 GDL_DOCK_ITEM_BEH_CANT_CLOSE1535 GDL_DOCK_ITEM_BEH_CANT_CLOSE
1509 |GDL_DOCK_ITEM_BEH_CANT_ICONIFY1536 |GDL_DOCK_ITEM_BEH_CANT_ICONIFY
1537 |GDL_DOCK_ITEM_BEH_NEVER_FLOATING
1538 |GDL_DOCK_ITEM_BEH_NO_GRIP
1539 |GDL_DOCK_ITEM_BEH_LOCKED
1510 );1540 );
1511 gtk_container_add(GTK_CONTAINER(item), tiw);1541 gtk_container_add(GTK_CONTAINER(item), tiw);
1512 gdl_dock_add_item(GDL_DOCK(dock), GDL_DOCK_ITEM(item), GDL_DOCK_CENTER);1542 gdl_dock_add_item(GDL_DOCK(dock), GDL_DOCK_ITEM(item), GDL_DOCK_CENTER);
@@ -1518,6 +1548,9 @@
1518 "Map and graph settings",1548 "Map and graph settings",
1519 GDL_DOCK_ITEM_BEH_CANT_CLOSE1549 GDL_DOCK_ITEM_BEH_CANT_CLOSE
1520 |GDL_DOCK_ITEM_BEH_CANT_ICONIFY1550 |GDL_DOCK_ITEM_BEH_CANT_ICONIFY
1551 |GDL_DOCK_ITEM_BEH_NEVER_FLOATING
1552 |GDL_DOCK_ITEM_BEH_NO_GRIP
1553 |GDL_DOCK_ITEM_BEH_LOCKED
1521 );1554 );
1522 gtk_container_add(GTK_CONTAINER(item), swi);1555 gtk_container_add(GTK_CONTAINER(item), swi);
1523 gdl_dock_add_item(GDL_DOCK(dock), GDL_DOCK_ITEM(item), GDL_DOCK_CENTER);1556 gdl_dock_add_item(GDL_DOCK(dock), GDL_DOCK_ITEM(item), GDL_DOCK_CENTER);
@@ -1531,7 +1564,7 @@
1531 */1564 */
1532 gtk_box_pack_end(GTK_BOX(gtk_builder_get_object(priv->builder, "main_view_hpane")), dock, TRUE, TRUE, 0);1565 gtk_box_pack_end(GTK_BOX(gtk_builder_get_object(priv->builder, "main_view_hpane")), dock, TRUE, TRUE, 0);
15331566
1534 priv->dock_layout = gdl_dock_layout_new(GDL_DOCK(dock));1567 priv->dock_layout = gdl_dock_layout_new(G_OBJECT(dock));
1535 restore_layout(gtk_app);1568 restore_layout(gtk_app);
15361569
1537 }1570 }
@@ -1614,8 +1647,18 @@
1614 GFile *afile = g_file_new_for_uri((gchar*)iter->data);1647 GFile *afile = g_file_new_for_uri((gchar*)iter->data);
1615 /* Add entry to recent manager */1648 /* Add entry to recent manager */
1616 gtk_recent_manager_add_item(GTK_RECENT_MANAGER(priv->recent_man), (gchar *)iter->data);1649 gtk_recent_manager_add_item(GTK_RECENT_MANAGER(priv->recent_man), (gchar *)iter->data);
1650<<<<<<< TREE
16171651
1618 file = gpx_file_open(afile, NULL);1652 file = gpx_file_open(afile, NULL);
1653=======
1654 /* Try to open the gpx file */
1655 if (g_str_has_suffix(iter->data, "fit")) {
1656 file = GPX_FILE_BASE(gpx_fit_file_new(afile));
1657 }else {
1658 file = GPX_FILE_BASE(gpx_xml_file_new(afile));
1659 }
1660 priv->files = g_list_append(priv->files, file);
1661>>>>>>> MERGE-SOURCE
1619 g_object_unref(afile);1662 g_object_unref(afile);
1620 if(file != NULL)1663 if(file != NULL)
1621 { 1664 {
@@ -1759,6 +1802,7 @@
1759 /* Try to open the gpx file */1802 /* Try to open the gpx file */
1760 //file = gpx_xml_file_new(input_files[i]);1803 //file = gpx_xml_file_new(input_files[i]);
1761 filename = g_file_get_uri(input_files[i]);1804 filename = g_file_get_uri(input_files[i]);
1805<<<<<<< TREE
17621806
1763 file = gpx_file_open(input_files[i], NULL);1807 file = gpx_file_open(input_files[i], NULL);
1764 if(file != NULL) { 1808 if(file != NULL) {
@@ -1792,6 +1836,12 @@
1792 }1836 }
1793 }1837 }
1794 interface_create_fake_master_track(file, &liter, app);1838 interface_create_fake_master_track(file, &liter, app);
1839=======
1840 if (g_str_has_suffix(filename, "fit")) {
1841 file = GPX_FILE_BASE(gpx_fit_file_new(input_files[i]));
1842 }else {
1843 file = GPX_FILE_BASE(gpx_xml_file_new(input_files[i]));
1844>>>>>>> MERGE-SOURCE
1795 }1845 }
1796 g_free(filename);1846 g_free(filename);
1797 }1847 }
@@ -1835,8 +1885,10 @@
1835 bind_textdomain_codeset(PACKAGE, "UTF-8");1885 bind_textdomain_codeset(PACKAGE, "UTF-8");
1836 textdomain(PACKAGE);1886 textdomain(PACKAGE);
1837 setlocale (LC_ALL, "");1887 setlocale (LC_ALL, "");
18381888
1839 gtk_clutter_init(&argc, &argv);1889 if ((retv = gtk_clutter_init(&argc, &argv)) != CLUTTER_INIT_SUCCESS) {
1890 return retv;
1891 }
18401892
1841 /* Add own icon structure to the theme engine search */1893 /* Add own icon structure to the theme engine search */
1842 path = g_build_filename(DATA_DIR, "icons", NULL);1894 path = g_build_filename(DATA_DIR, "icons", NULL);
18431895
=== modified file 'src/gpx-viewer.h'
--- src/gpx-viewer.h 2012-06-07 16:29:54 +0000
+++ src/gpx-viewer.h 2013-10-14 21:07:05 +0000
@@ -36,6 +36,7 @@
36void gpx_viewer_show_preferences_dialog(GtkWidget *menu_item, gpointer user_data);36void gpx_viewer_show_preferences_dialog(GtkWidget *menu_item, gpointer user_data);
37void show_vertical_speed(GtkMenuItem *item, gpointer user_data);37void show_vertical_speed(GtkMenuItem *item, gpointer user_data);
38void show_acceleration_h(GtkMenuItem *item, gpointer user_data);38void show_acceleration_h(GtkMenuItem *item, gpointer user_data);
39void show_heartrate(GtkMenuItem *item, gpointer user_data);
3940
40enum _SpeedFormat41enum _SpeedFormat
41{42{

Subscribers

People subscribed via source and target branches