Merge lp:~chkr/gpx-viewer/gpx-viewer into lp:gpx-viewer
- gpx-viewer
- Merge into main
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 |
Related bugs: |
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
Description of the change
- 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/ TrackPointExten sion/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
1 | === modified file 'Makefile.am' |
2 | --- Makefile.am 2013-10-03 18:20:08 +0000 |
3 | +++ Makefile.am 2013-10-14 21:07:05 +0000 |
4 | @@ -89,14 +89,15 @@ |
5 | -I$(top_builddir)/src |
6 | |
7 | if MAINTAINER_MODE |
8 | -AM_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-enum |
9 | +AM_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 |
10 | endif |
11 | |
12 | EXTRA_DIST+=\ |
13 | vapi/config.vapi\ |
14 | + vapi/gpx-viewer.vapi\ |
15 | vapi/champlain-0.12.vapi\ |
16 | vapi/champlain-gtk-0.12.vapi\ |
17 | - src/gpx-viewer-path-layer.h\ |
18 | + src/gpx-viewer-path-layer.h\ |
19 | src/gpx-viewer.h |
20 | |
21 | ## |
22 | |
23 | === modified file 'configure.ac' |
24 | --- configure.ac 2013-10-04 09:24:26 +0000 |
25 | +++ configure.ac 2013-10-14 21:07:05 +0000 |
26 | @@ -60,8 +60,12 @@ |
27 | gdl-3.0 |
28 | ]) |
29 | PKG_CHECK_MODULES([champlain], [ |
30 | - champlain-gtk-0.12 >= 0.12.4 |
31 | - champlain-0.12 >= 0.12.4 |
32 | + champlain-gtk-0.12 >= 0.12.3 |
33 | + champlain-0.12 >= 0.12.3 |
34 | +]) |
35 | + |
36 | +PKG_CHECK_MODULES([clutter], [ |
37 | + clutter-gtk-1.0 >= 1.1.2 |
38 | ]) |
39 | |
40 | |
41 | |
42 | === modified file 'data/gpx-viewer.ui' |
43 | --- data/gpx-viewer.ui 2013-10-10 20:18:04 +0000 |
44 | +++ data/gpx-viewer.ui 2013-10-14 21:07:05 +0000 |
45 | @@ -767,6 +767,7 @@ |
46 | <object class="GtkHBox" id="main_view_hpane"> |
47 | <property name="visible">True</property> |
48 | <property name="can_focus">True</property> |
49 | + <property name="width-request">350</property> |
50 | </object> |
51 | <packing> |
52 | <property name="resize">False</property> |
53 | @@ -1013,15 +1014,460 @@ |
54 | <property name="can_focus">True</property> |
55 | <property name="use_action_appearance">False</property> |
56 | <property name="active">True</property> |
57 | - </object> |
58 | - </child> |
59 | - </object> |
60 | - <packing> |
61 | - <property name="left_attach">1</property> |
62 | - <property name="right_attach">2</property> |
63 | - <property name="top_attach">4</property> |
64 | - <property name="bottom_attach">5</property> |
65 | - <property name="x_options">GTK_FILL</property> |
66 | +<<<<<<< TREE |
67 | + </object> |
68 | + </child> |
69 | + </object> |
70 | + <packing> |
71 | + <property name="left_attach">1</property> |
72 | + <property name="right_attach">2</property> |
73 | + <property name="top_attach">4</property> |
74 | + <property name="bottom_attach">5</property> |
75 | + <property name="x_options">GTK_FILL</property> |
76 | +======= |
77 | + <signal name="notify::active" handler="graph_show_points_toggled_cb"/> |
78 | + </object> |
79 | + </child> |
80 | + </object> |
81 | + <packing> |
82 | + <property name="left_attach">1</property> |
83 | + <property name="right_attach">2</property> |
84 | + <property name="top_attach">4</property> |
85 | + <property name="bottom_attach">5</property> |
86 | + <property name="x_options">GTK_FILL</property> |
87 | + <property name="y_options">GTK_FILL</property> |
88 | + </packing> |
89 | + </child> |
90 | + </object> |
91 | + <object class="GtkTable" id="TrackInfoWidget"> |
92 | + <property name="visible">True</property> |
93 | + <property name="n_rows">11</property> |
94 | + <property name="n_columns">2</property> |
95 | + <property name="column_spacing">6</property> |
96 | + <property name="row_spacing">6</property> |
97 | + <child> |
98 | + <object class="GtkLabel" id="distance_title_label"> |
99 | + <property name="visible">True</property> |
100 | + <property name="xalign">1</property> |
101 | + <property name="label" translatable="yes"><b>Distance:</b></property> |
102 | + <property name="use_markup">True</property> |
103 | + </object> |
104 | + <packing> |
105 | + <property name="x_options">GTK_FILL</property> |
106 | + <property name="y_options">GTK_FILL</property> |
107 | + </packing> |
108 | + </child> |
109 | + <child> |
110 | + <object class="GtkLabel" id="duration_title_label"> |
111 | + <property name="visible">True</property> |
112 | + <property name="xalign">1</property> |
113 | + <property name="label" translatable="yes"><b>Duration:</b></property> |
114 | + <property name="use_markup">True</property> |
115 | + </object> |
116 | + <packing> |
117 | + <property name="top_attach">1</property> |
118 | + <property name="bottom_attach">2</property> |
119 | + <property name="x_options">GTK_FILL</property> |
120 | + <property name="y_options">GTK_FILL</property> |
121 | + </packing> |
122 | + </child> |
123 | + <child> |
124 | + <object class="GtkLabel" id="distance_label"> |
125 | + <property name="visible">True</property> |
126 | + <property name="xalign">0</property> |
127 | + <property name="label" translatable="yes">n/a</property> |
128 | + <property name="ellipsize">end</property> |
129 | + </object> |
130 | + <packing> |
131 | + <property name="left_attach">1</property> |
132 | + <property name="right_attach">2</property> |
133 | + <property name="y_options">GTK_FILL</property> |
134 | + </packing> |
135 | + </child> |
136 | + <child> |
137 | + <object class="GtkLabel" id="duration_label"> |
138 | + <property name="visible">True</property> |
139 | + <property name="xalign">0</property> |
140 | + <property name="label" translatable="yes">n/a</property> |
141 | + <property name="ellipsize">end</property> |
142 | + </object> |
143 | + <packing> |
144 | + <property name="left_attach">1</property> |
145 | + <property name="right_attach">2</property> |
146 | + <property name="top_attach">1</property> |
147 | + <property name="bottom_attach">2</property> |
148 | + <property name="y_options">GTK_FILL</property> |
149 | + </packing> |
150 | + </child> |
151 | + <child> |
152 | + <object class="GtkLabel" id="average_title_label"> |
153 | + <property name="visible">True</property> |
154 | + <property name="xalign">1</property> |
155 | + <property name="label" translatable="yes"><b>Average:</b></property> |
156 | + <property name="use_markup">True</property> |
157 | + </object> |
158 | + <packing> |
159 | + <property name="top_attach">4</property> |
160 | + <property name="bottom_attach">5</property> |
161 | + <property name="x_options">GTK_FILL</property> |
162 | + <property name="y_options">GTK_FILL</property> |
163 | + </packing> |
164 | + </child> |
165 | + <child> |
166 | + <object class="GtkLabel" id="moving_average_title_label"> |
167 | + <property name="visible">True</property> |
168 | + <property name="xalign">1</property> |
169 | + <property name="label" translatable="yes"><b>Moving average:</b></property> |
170 | + <property name="use_markup">True</property> |
171 | + </object> |
172 | + <packing> |
173 | + <property name="top_attach">5</property> |
174 | + <property name="bottom_attach">6</property> |
175 | + <property name="x_options">GTK_FILL</property> |
176 | + <property name="y_options">GTK_FILL</property> |
177 | + </packing> |
178 | + </child> |
179 | + <child> |
180 | + <object class="GtkLabel" id="moving_averate_time_title_label"> |
181 | + <property name="visible">True</property> |
182 | + <property name="xalign">1</property> |
183 | + <property name="label" translatable="yes"><b>Moving time:</b></property> |
184 | + <property name="use_markup">True</property> |
185 | + </object> |
186 | + <packing> |
187 | + <property name="top_attach">6</property> |
188 | + <property name="bottom_attach">7</property> |
189 | + <property name="x_options">GTK_FILL</property> |
190 | + <property name="y_options">GTK_FILL</property> |
191 | + </packing> |
192 | + </child> |
193 | + <child> |
194 | + <object class="GtkLabel" id="max_speed_title_label"> |
195 | + <property name="visible">True</property> |
196 | + <property name="xalign">1</property> |
197 | + <property name="label" translatable="yes"><b>Max. speed:</b></property> |
198 | + <property name="use_markup">True</property> |
199 | + </object> |
200 | + <packing> |
201 | + <property name="top_attach">7</property> |
202 | + <property name="bottom_attach">8</property> |
203 | + <property name="x_options">GTK_FILL</property> |
204 | + <property name="y_options">GTK_FILL</property> |
205 | + </packing> |
206 | + </child> |
207 | + <child> |
208 | + <object class="GtkLabel" id="elevation_difference_title_label"> |
209 | + <property name="visible">True</property> |
210 | + <property name="xalign">1</property> |
211 | + <property name="label" translatable="yes"><b>Elevation Diff.:</b></property> |
212 | + <property name="use_markup">True</property> |
213 | + </object> |
214 | + <packing> |
215 | + <property name="top_attach">8</property> |
216 | + <property name="bottom_attach">9</property> |
217 | + <property name="x_options">GTK_FILL</property> |
218 | + <property name="y_options">GTK_FILL</property> |
219 | + </packing> |
220 | + </child> |
221 | + <child> |
222 | + <object class="GtkLabel" id="elevation_total_up_title_label"> |
223 | + <property name="visible">True</property> |
224 | + <property name="xalign">1</property> |
225 | + <property name="label" translatable="yes"><b>Acc. Elevation Up:</b></property> |
226 | + <property name="use_markup">True</property> |
227 | + </object> |
228 | + <packing> |
229 | + <property name="top_attach">9</property> |
230 | + <property name="bottom_attach">10</property> |
231 | + <property name="x_options">GTK_FILL</property> |
232 | + <property name="y_options">GTK_FILL</property> |
233 | + </packing> |
234 | + </child> |
235 | + <child> |
236 | + <object class="GtkLabel" id="elevation_total_down_title_label"> |
237 | + <property name="visible">True</property> |
238 | + <property name="xalign">1</property> |
239 | + <property name="label" translatable="yes"><b>Acc. Elevation Down:</b></property> |
240 | + <property name="use_markup">True</property> |
241 | + </object> |
242 | + <packing> |
243 | + <property name="top_attach">10</property> |
244 | + <property name="bottom_attach">11</property> |
245 | + <property name="x_options">GTK_FILL</property> |
246 | + <property name="y_options">GTK_FILL</property> |
247 | + </packing> |
248 | + </child> |
249 | + <child> |
250 | + <object class="GtkLabel" id="gradient_title_label"> |
251 | + <property name="visible">True</property> |
252 | + <property name="xalign">1</property> |
253 | + <property name="label" translatable="yes"><b>Gradient:</b></property> |
254 | + <property name="use_markup">True</property> |
255 | + </object> |
256 | + <packing> |
257 | + <property name="top_attach">11</property> |
258 | + <property name="bottom_attach">12</property> |
259 | + <property name="x_options">GTK_FILL</property> |
260 | + <property name="y_options">GTK_FILL</property> |
261 | + </packing> |
262 | + </child> |
263 | + <child> |
264 | + <object class="GtkLabel" id="average_label"> |
265 | + <property name="visible">True</property> |
266 | + <property name="xalign">0</property> |
267 | + <property name="label" translatable="yes">n/a</property> |
268 | + <property name="ellipsize">end</property> |
269 | + </object> |
270 | + <packing> |
271 | + <property name="left_attach">1</property> |
272 | + <property name="right_attach">2</property> |
273 | + <property name="top_attach">4</property> |
274 | + <property name="bottom_attach">5</property> |
275 | + <property name="y_options">GTK_FILL</property> |
276 | + </packing> |
277 | + </child> |
278 | + <child> |
279 | + <object class="GtkLabel" id="moving_average_label"> |
280 | + <property name="visible">True</property> |
281 | + <property name="xalign">0</property> |
282 | + <property name="label" translatable="yes">n/a</property> |
283 | + <property name="ellipsize">end</property> |
284 | + </object> |
285 | + <packing> |
286 | + <property name="left_attach">1</property> |
287 | + <property name="right_attach">2</property> |
288 | + <property name="top_attach">5</property> |
289 | + <property name="bottom_attach">6</property> |
290 | + <property name="y_options">GTK_FILL</property> |
291 | + </packing> |
292 | + </child> |
293 | + <child> |
294 | + <object class="GtkLabel" id="moving_average_time_label"> |
295 | + <property name="visible">True</property> |
296 | + <property name="xalign">0</property> |
297 | + <property name="label" translatable="yes">n/a</property> |
298 | + <property name="ellipsize">end</property> |
299 | + </object> |
300 | + <packing> |
301 | + <property name="left_attach">1</property> |
302 | + <property name="right_attach">2</property> |
303 | + <property name="top_attach">6</property> |
304 | + <property name="bottom_attach">7</property> |
305 | + <property name="y_options">GTK_FILL</property> |
306 | + </packing> |
307 | + </child> |
308 | + <child> |
309 | + <object class="GtkLabel" id="max_speed_label"> |
310 | + <property name="visible">True</property> |
311 | + <property name="xalign">0</property> |
312 | + <property name="label" translatable="yes">n/a</property> |
313 | + <property name="ellipsize">end</property> |
314 | + </object> |
315 | + <packing> |
316 | + <property name="left_attach">1</property> |
317 | + <property name="right_attach">2</property> |
318 | + <property name="top_attach">7</property> |
319 | + <property name="bottom_attach">8</property> |
320 | + <property name="y_options">GTK_FILL</property> |
321 | + </packing> |
322 | + </child> |
323 | + <child> |
324 | + <object class="GtkLabel" id="elevation_difference_label"> |
325 | + <property name="visible">True</property> |
326 | + <property name="xalign">0</property> |
327 | + <property name="label" translatable="yes">n/a</property> |
328 | + <property name="ellipsize">end</property> |
329 | + </object> |
330 | + <packing> |
331 | + <property name="left_attach">1</property> |
332 | + <property name="right_attach">2</property> |
333 | + <property name="top_attach">8</property> |
334 | + <property name="bottom_attach">9</property> |
335 | + <property name="y_options">GTK_FILL</property> |
336 | + </packing> |
337 | + </child> |
338 | + <child> |
339 | + <object class="GtkLabel" id="elevation_total_up_label"> |
340 | + <property name="visible">True</property> |
341 | + <property name="xalign">0</property> |
342 | + <property name="label" translatable="yes">n/a</property> |
343 | + <property name="ellipsize">end</property> |
344 | + </object> |
345 | + <packing> |
346 | + <property name="left_attach">1</property> |
347 | + <property name="right_attach">2</property> |
348 | + <property name="top_attach">9</property> |
349 | + <property name="bottom_attach">10</property> |
350 | + <property name="y_options">GTK_FILL</property> |
351 | + </packing> |
352 | + </child> |
353 | + <child> |
354 | + <object class="GtkLabel" id="elevation_total_down_label"> |
355 | + <property name="visible">True</property> |
356 | + <property name="xalign">0</property> |
357 | + <property name="label" translatable="yes">n/a</property> |
358 | + <property name="ellipsize">end</property> |
359 | + </object> |
360 | + <packing> |
361 | + <property name="left_attach">1</property> |
362 | + <property name="right_attach">2</property> |
363 | + <property name="top_attach">10</property> |
364 | + <property name="bottom_attach">11</property> |
365 | + <property name="y_options">GTK_FILL</property> |
366 | + </packing> |
367 | + </child> |
368 | + <child> |
369 | + <object class="GtkLabel" id="gradient_label"> |
370 | + <property name="visible">True</property> |
371 | + <property name="xalign">0</property> |
372 | + <property name="label" translatable="yes">n/a</property> |
373 | + <property name="ellipsize">end</property> |
374 | + </object> |
375 | + <packing> |
376 | + <property name="left_attach">1</property> |
377 | + <property name="right_attach">2</property> |
378 | + <property name="top_attach">11</property> |
379 | + <property name="bottom_attach">12</property> |
380 | + <property name="y_options">GTK_FILL</property> |
381 | + </packing> |
382 | + </child> |
383 | + <child> |
384 | + <object class="GtkLabel" id="label4"> |
385 | + <property name="visible">True</property> |
386 | + <property name="xalign">1</property> |
387 | + <property name="label" translatable="yes"><b>Playback:</b></property> |
388 | + <property name="use_markup">True</property> |
389 | + </object> |
390 | + <packing> |
391 | + <property name="top_attach">12</property> |
392 | + <property name="bottom_attach">13</property> |
393 | + <property name="x_options">GTK_FILL</property> |
394 | + <property name="y_options">GTK_FILL</property> |
395 | + </packing> |
396 | + </child> |
397 | + <child> |
398 | + <object class="GtkHBox" id="hbox1"> |
399 | + <property name="visible">True</property> |
400 | + <child> |
401 | + <object class="GtkEventBox" id="eventbox3"> |
402 | + <property name="visible">True</property> |
403 | + <property name="visible_window">False</property> |
404 | + <signal name="button_press_event" handler="playback_play_clicked"/> |
405 | + <child> |
406 | + <object class="GtkImage" id="play_button"> |
407 | + <property name="visible">True</property> |
408 | + <property name="stock">gtk-media-play</property> |
409 | + <property name="icon-size">1</property> |
410 | + </object> |
411 | + </child> |
412 | + </object> |
413 | + <packing> |
414 | + <property name="expand">False</property> |
415 | + <property name="position">0</property> |
416 | + </packing> |
417 | + </child> |
418 | + <child> |
419 | + <object class="GtkEventBox" id="eventbox1"> |
420 | + <property name="visible">True</property> |
421 | + <property name="sensitive">False</property> |
422 | + <property name="visible_window">False</property> |
423 | + <signal name="button_press_event" handler="playback_pause_clicked"/> |
424 | + <child> |
425 | + <object class="GtkImage" id="pause_clicked"> |
426 | + <property name="visible">True</property> |
427 | + <property name="stock">gtk-media-pause</property> |
428 | + <property name="icon-size">1</property> |
429 | + </object> |
430 | + </child> |
431 | + </object> |
432 | + <packing> |
433 | + <property name="expand">False</property> |
434 | + <property name="position">1</property> |
435 | + </packing> |
436 | + </child> |
437 | + <child> |
438 | + <object class="GtkEventBox" id="eventbox2"> |
439 | + <property name="visible">True</property> |
440 | + <property name="sensitive">False</property> |
441 | + <property name="visible_window">False</property> |
442 | + <signal name="button_press_event" handler="playback_stop_clicked"/> |
443 | + <child> |
444 | + <object class="GtkImage" id="image2"> |
445 | + <property name="visible">True</property> |
446 | + <property name="stock">gtk-media-stop</property> |
447 | + <property name="icon-size">1</property> |
448 | + </object> |
449 | + </child> |
450 | + </object> |
451 | + <packing> |
452 | + <property name="expand">False</property> |
453 | + <property name="position">2</property> |
454 | + </packing> |
455 | + </child> |
456 | + </object> |
457 | + <packing> |
458 | + <property name="left_attach">1</property> |
459 | + <property name="right_attach">2</property> |
460 | + <property name="top_attach">12</property> |
461 | + <property name="bottom_attach">13</property> |
462 | + <property name="x_options">GTK_FILL</property> |
463 | + <property name="y_options">GTK_FILL</property> |
464 | + </packing> |
465 | + </child> |
466 | + <child> |
467 | + <object class="GtkLabel" id="start_time_title_label"> |
468 | + <property name="visible">True</property> |
469 | + <property name="xalign">1</property> |
470 | + <property name="label" translatable="yes"><b>Start time:</b></property> |
471 | + <property name="use_markup">True</property> |
472 | + </object> |
473 | + <packing> |
474 | + <property name="top_attach">2</property> |
475 | + <property name="bottom_attach">3</property> |
476 | + <property name="x_options">GTK_FILL</property> |
477 | + <property name="y_options">GTK_FILL</property> |
478 | + </packing> |
479 | + </child> |
480 | + <child> |
481 | + <object class="GtkLabel" id="stop_time_title_label"> |
482 | + <property name="visible">True</property> |
483 | + <property name="xalign">1</property> |
484 | + <property name="label" translatable="yes"><b>Stop time:</b></property> |
485 | + <property name="use_markup">True</property> |
486 | + </object> |
487 | + <packing> |
488 | + <property name="top_attach">3</property> |
489 | + <property name="bottom_attach">4</property> |
490 | + <property name="x_options">GTK_FILL</property> |
491 | + <property name="y_options">GTK_FILL</property> |
492 | + </packing> |
493 | + </child> |
494 | + <child> |
495 | + <object class="GtkLabel" id="start_time_label"> |
496 | + <property name="visible">True</property> |
497 | + <property name="xalign">0</property> |
498 | + <property name="label" translatable="yes">n/a</property> |
499 | + </object> |
500 | + <packing> |
501 | + <property name="left_attach">1</property> |
502 | + <property name="right_attach">2</property> |
503 | + <property name="top_attach">2</property> |
504 | + <property name="bottom_attach">3</property> |
505 | + <property name="y_options">GTK_FILL</property> |
506 | + </packing> |
507 | + </child> |
508 | + <child> |
509 | + <object class="GtkLabel" id="stop_time_label"> |
510 | + <property name="visible">True</property> |
511 | + <property name="xalign">0</property> |
512 | + <property name="label" translatable="yes">n/a</property> |
513 | + </object> |
514 | + <packing> |
515 | + <property name="left_attach">1</property> |
516 | + <property name="right_attach">2</property> |
517 | + <property name="top_attach">3</property> |
518 | + <property name="bottom_attach">4</property> |
519 | +>>>>>>> MERGE-SOURCE |
520 | <property name="y_options">GTK_FILL</property> |
521 | </packing> |
522 | </child> |
523 | |
524 | === modified file 'src/gpx-graph.vala' |
525 | --- src/gpx-graph.vala 2013-10-01 12:54:46 +0000 |
526 | +++ src/gpx-graph.vala 2013-10-14 21:07:05 +0000 |
527 | @@ -205,7 +205,7 @@ |
528 | } |
529 | private bool button_press_event_cb(Gdk.EventButton event) |
530 | { |
531 | - if(this.track == null) return false; |
532 | + if(this.track == null) return true; |
533 | Gpx.Point *point = this.get_point_from_position(event.x, event.y); |
534 | if(point != null) { |
535 | if(event.button == 1){ |
536 | @@ -215,13 +215,13 @@ |
537 | point_clicked(point); |
538 | } |
539 | } |
540 | - return false; |
541 | + return true; |
542 | } |
543 | |
544 | private bool motion_notify_event_cb(Gdk.EventMotion event) |
545 | { |
546 | - if(this.track == null) return false; |
547 | - if(this.start == null) return false; |
548 | + if(this.track == null) return true; |
549 | + if(this.start == null) return true; |
550 | |
551 | Gpx.Point *point = this.get_point_from_position(event.x, event.y); |
552 | if(point != null) |
553 | @@ -238,16 +238,16 @@ |
554 | } else { |
555 | selection_changed(this.track, stop, start); |
556 | } |
557 | - return false; |
558 | + return true; |
559 | } |
560 | } |
561 | selection_changed(this.track, this.track.points.first().data, this.track.points.last().data); |
562 | } |
563 | - return false; |
564 | + return true; |
565 | } |
566 | private bool button_release_event_cb(Gdk.EventButton event) |
567 | { |
568 | - if(this.track == null) return false; |
569 | + if(this.track == null) return true; |
570 | Gpx.Point *point = this.get_point_from_position(event.x, event.y); |
571 | if(point != null) |
572 | { |
573 | @@ -266,13 +266,13 @@ |
574 | } else { |
575 | selection_changed(this.track, stop, start); |
576 | } |
577 | - return false; |
578 | + return true; |
579 | } |
580 | } |
581 | selection_changed(this.track, this.track.points.first().data, this.track.points.last().data); |
582 | } |
583 | } |
584 | - return false; |
585 | + return true; |
586 | } |
587 | private void size_allocate_cb(Gtk.Allocation alloc) |
588 | { |
589 | @@ -437,7 +437,6 @@ |
590 | ctx.stroke(); |
591 | |
592 | /* Draw time units. */ |
593 | - weak List<Point?> iter = track.points.first(); |
594 | |
595 | fd.set_absolute_size(12*1024); |
596 | layout.set_font_description(fd); |
597 | @@ -721,9 +720,9 @@ |
598 | layout.set_font_description(fd); |
599 | string mtext = ""; |
600 | if(_do_miles) { |
601 | - mtext = _(this.GraphModeMiles[this._mode]); |
602 | + mtext = _(Graph.GraphModeMiles[this._mode]); |
603 | }else{ |
604 | - mtext = _(this.GraphModeName[this._mode]); |
605 | + mtext = _(Graph.GraphModeName[this._mode]); |
606 | } |
607 | if(this._smooth_factor != 1) |
608 | { |
609 | |
610 | === modified file 'src/gpx-parser-xml.vala' |
611 | --- src/gpx-parser-xml.vala 2013-10-03 15:34:26 +0000 |
612 | +++ src/gpx-parser-xml.vala 2013-10-14 21:07:05 +0000 |
613 | @@ -47,8 +47,8 @@ |
614 | { |
615 | Point p = new Point(); |
616 | // TODO: Move parsing into Point class. |
617 | - double flat = lat.to_double(); |
618 | - double flon = lon.to_double(); |
619 | + double flat = double.parse(lat); |
620 | + double flon = double.parse(lon); |
621 | p.set_position(flat, flon); |
622 | var info = point->children; |
623 | while(info != null) |
624 | @@ -58,7 +58,7 @@ |
625 | { |
626 | var content = info->get_content(); |
627 | if(content != null) |
628 | - p.elevation = content.to_double(); |
629 | + p.elevation = double.parse(content); |
630 | } |
631 | else if (info->name == "time") |
632 | { |
633 | @@ -75,7 +75,7 @@ |
634 | { |
635 | if(ext->name == "hr") { |
636 | var val= ext->get_content(); |
637 | - p.tpe.heartrate = val.to_int(); |
638 | + p.tpe.heartrate = int.parse(val); |
639 | } |
640 | } |
641 | } |
642 | @@ -120,8 +120,8 @@ |
643 | if(lat != null && lon != null) |
644 | { |
645 | Point p = new Point(); |
646 | - double flat = lat.to_double(); |
647 | - double flon = lon.to_double(); |
648 | + double flat = double.parse(lat); |
649 | + double flon = double.parse(lon); |
650 | p.set_position(flat, flon); |
651 | var info = node->children; |
652 | while(info != null) |
653 | @@ -159,8 +159,8 @@ |
654 | if(lat != null && lon != null) |
655 | { |
656 | Point p = new Point(); |
657 | - double flat = lat.to_double(); |
658 | - double flon = lon.to_double(); |
659 | + double flat = double.parse(lat); |
660 | + double flon = double.parse(lon); |
661 | p.set_position(flat, flon); |
662 | var info = trkseg->children; |
663 | while(info != null) |
664 | @@ -170,7 +170,7 @@ |
665 | { |
666 | var content = info->get_content(); |
667 | if(content != null) |
668 | - p.elevation = content.to_double(); |
669 | + p.elevation = double.parse(content); |
670 | } |
671 | else if (info->name == "time") |
672 | { |
673 | |
674 | === modified file 'src/gpx-parser.vala' |
675 | --- src/gpx-parser.vala 2013-10-10 20:18:04 +0000 |
676 | +++ src/gpx-parser.vala 2013-10-14 21:07:05 +0000 |
677 | @@ -44,6 +44,7 @@ |
678 | public double distance =0; |
679 | /* Elevation */ |
680 | public double elevation; |
681 | + public double smooth_elevation; |
682 | /* Time */ |
683 | public string time; |
684 | /* The speed (only if part of track */ |
685 | @@ -78,6 +79,7 @@ |
686 | p.lon_dec = this.lon_dec; |
687 | p.time = this.time; |
688 | p.elevation = this.elevation; |
689 | + p.smooth_elevation = this.smooth_elevation; |
690 | p.tpe = this.tpe; |
691 | return p; |
692 | } |
693 | @@ -239,13 +241,42 @@ |
694 | if(point.elevation < this.min_elevation) this.min_elevation = point.elevation; |
695 | point.distance = 0; |
696 | } |
697 | + // radius in km |
698 | + double radius = 0.2; |
699 | + |
700 | + // add current point |
701 | + double elevation_value = point.elevation * radius; |
702 | + double weights = radius; |
703 | + |
704 | + // add previous points within the radius |
705 | + unowned List<Point> ?env_iter = iter; |
706 | + int i = 0; |
707 | + while ((env_iter = env_iter.prev) != null) { |
708 | + i++; |
709 | + double mydist = calculate_distance(env_iter.data, point); |
710 | + if (mydist < radius) { |
711 | + elevation_value += (env_iter.data.elevation * (radius - mydist)); |
712 | + weights += (radius - mydist); |
713 | + } else break; |
714 | + } |
715 | + // add following points within the radius |
716 | + env_iter = iter; |
717 | + while ((env_iter = env_iter.prev) != null) { |
718 | + i++; |
719 | + double mydist = calculate_distance(env_iter.data, point); |
720 | + if (mydist < radius) { |
721 | + elevation_value += (env_iter.data.elevation * (radius - mydist)); |
722 | + weights += (radius - mydist); |
723 | + } else break; |
724 | + } |
725 | + point.smooth_elevation = elevation_value / weights; |
726 | + log(LOG_DOMAIN, LogLevelFlags.LEVEL_DEBUG, "Used %d points in radius of %f m", i, radius * 1000.0); |
727 | if(point.has_position()) { |
728 | last = iter; |
729 | } |
730 | } |
731 | } |
732 | |
733 | - |
734 | public void add_point (Point point) |
735 | { |
736 | /* Make sure this is 0 */ |
737 | @@ -256,7 +287,6 @@ |
738 | var distance = calculate_distance(last, point); |
739 | this.total_distance += distance; |
740 | point.distance = this.total_distance; |
741 | - |
742 | /* Update the 2 bounding box points */ |
743 | if(top == null || top.lat_dec == 1000 || top.lat_dec < point.lat_dec) |
744 | { |
745 | @@ -321,7 +351,6 @@ |
746 | iter = iter.next; |
747 | } |
748 | deviation /= num_points; |
749 | - var sqrt_deviation = Math.sqrt(deviation); |
750 | |
751 | iter = list_copy.first(); |
752 | uint i =0; |
753 | @@ -443,6 +472,28 @@ |
754 | return distance/(time/(60.0*60.0)); |
755 | } |
756 | |
757 | + public void calculate_total_elevation(Gpx.Point start, Gpx.Point stop, out double up, out double down) |
758 | + { |
759 | + up = 0.0; |
760 | + down = 0.0; |
761 | + weak List<Point?> iter = this.points.find(start); |
762 | + weak List<Point?> last = null; |
763 | + if(iter == null) return; |
764 | + |
765 | + if((iter)!=null) |
766 | + { |
767 | + do { |
768 | + if (last != null) { |
769 | + if(iter.data.smooth_elevation > last.data.smooth_elevation) { |
770 | + up += (iter.data.smooth_elevation - last.data.smooth_elevation); |
771 | + } else { |
772 | + down += (last.data.smooth_elevation - iter.data.smooth_elevation); |
773 | + } |
774 | + } |
775 | + last = iter; |
776 | + } while((iter = iter.next) != null && iter.prev.data != stop); |
777 | + } |
778 | + } |
779 | /** |
780 | * @param lon_a longitude in radians of point a |
781 | * @param lat_a latitude in radians of point a |
782 | |
783 | === modified file 'src/gpx-settings.vala' |
784 | --- src/gpx-settings.vala 2013-10-10 20:18:04 +0000 |
785 | +++ src/gpx-settings.vala 2013-10-14 21:07:05 +0000 |
786 | @@ -100,7 +100,7 @@ |
787 | object.get_property(sp.name, ref value); |
788 | if(sp.value_type == typeof(int)) { |
789 | pref.keyfile.set_integer(t.name(), sp.name, value.get_int()); |
790 | - }else if (sp.value_type.is_a(pref.enum_type)) { |
791 | + }else if (sp.value_type.is_a(Settings.enum_type)) { |
792 | pref.keyfile.set_integer(t.name(), sp.name, (int)value.get_enum()); |
793 | }else if (sp.value_type.is_a(typeof(bool))) { |
794 | pref.keyfile.set_boolean(t.name(), sp.name, value.get_boolean()); |
795 | |
796 | === modified file 'src/gpx-track-treemodel.vala' |
797 | --- src/gpx-track-treemodel.vala 2013-07-11 19:50:12 +0000 |
798 | +++ src/gpx-track-treemodel.vala 2013-10-14 21:07:05 +0000 |
799 | @@ -56,6 +56,7 @@ |
800 | |
801 | public bool get_iter (out Gtk.TreeIter iter, Gtk.TreePath path) |
802 | { |
803 | + iter = Gtk.TreeIter(); |
804 | int depth = path.get_depth (); |
805 | assert (depth == 1); |
806 | int n = path.get_indices ()[0]; |
807 | @@ -113,6 +114,7 @@ |
808 | * Should never be reached since iter_has_child is never true |
809 | */ |
810 | public bool iter_children (out Gtk.TreeIter iter, Gtk.TreeIter? parent){ |
811 | + iter = Gtk.TreeIter(); |
812 | return false; |
813 | } |
814 | |
815 | @@ -157,6 +159,7 @@ |
816 | |
817 | public bool iter_nth_child (out Gtk.TreeIter iter, Gtk.TreeIter? parent, int n) |
818 | { |
819 | + iter = Gtk.TreeIter(); |
820 | if (parent == null) |
821 | return false; |
822 | if (n<0 || n>= this.track.points.length ()) |
823 | @@ -170,6 +173,7 @@ |
824 | * again, not implemented since this is not a tree |
825 | */ |
826 | public bool iter_parent (out Gtk.TreeIter iter, Gtk.TreeIter child){ |
827 | + iter = Gtk.TreeIter(); |
828 | return false; |
829 | } |
830 | |
831 | |
832 | === modified file 'src/gpx-viewer.c' |
833 | --- src/gpx-viewer.c 2013-10-10 20:18:04 +0000 |
834 | +++ src/gpx-viewer.c 2013-10-14 21:07:05 +0000 |
835 | @@ -86,11 +86,12 @@ |
836 | |
837 | } GpxViewerPrivate; |
838 | |
839 | +GType gpx_viewer_get_type (void); |
840 | +#define GPX_TYPE_VIEWER (gpx_viewer_get_type()) |
841 | + |
842 | G_DEFINE_TYPE (GpxViewer, gpx_viewer, GTK_TYPE_APPLICATION) |
843 | #define GPX_VIEWER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPX_TYPE_VIEWER, GpxViewerPrivate)) |
844 | |
845 | -#define GPX_TYPE_VIEWER (gpx_viewer_get_type()) |
846 | - |
847 | |
848 | |
849 | static void gpx_viewer_init (GpxViewer *app) |
850 | @@ -479,11 +480,12 @@ |
851 | elevation_diff = 0; |
852 | if (start && stop) |
853 | { |
854 | - elevation_diff = stop->elevation - start->elevation; |
855 | + elevation_diff = stop->smooth_elevation - start->smooth_elevation; |
856 | distance_diff = stop->distance - start->distance; |
857 | } |
858 | gv_set_speed_label(label, elevation_diff, ELEVATION); |
859 | } |
860 | +<<<<<<< TREE |
861 | /* Average heartrate */ |
862 | if(track != NULL) { |
863 | label = (GtkWidget *) gtk_builder_get_object(priv->builder, "heart_rate_label"); |
864 | @@ -513,6 +515,16 @@ |
865 | label = (GtkWidget *) gtk_builder_get_object(priv->builder, "calories_label"); |
866 | gtk_label_set_text(GTK_LABEL(label), _("n/a")); |
867 | } |
868 | +======= |
869 | + if(track && start && stop) { |
870 | + double up; double down; |
871 | + gpx_track_calculate_total_elevation(track, start, stop, &up, &down); |
872 | + label = (GtkWidget *) gtk_builder_get_object(priv->builder, "elevation_total_up_label"); |
873 | + gv_set_speed_label(label, up, ELEVATION); |
874 | + label = (GtkWidget *) gtk_builder_get_object(priv->builder, "elevation_total_down_label"); |
875 | + gv_set_speed_label(label, down, ELEVATION); |
876 | + } |
877 | +>>>>>>> MERGE-SOURCE |
878 | } |
879 | |
880 | |
881 | @@ -533,7 +545,7 @@ |
882 | //gpx_viewer_path_layer_set_stroke_color(route->path, &normal_track_color); |
883 | gpx_viewer_path_layer_set_track(route->path,route->track); |
884 | champlain_view_add_layer(CHAMPLAIN_VIEW(view), CHAMPLAIN_LAYER(route->path)); |
885 | - clutter_actor_set_depth(CLUTTER_ACTOR(route->path), -10); |
886 | + clutter_actor_set_z_position(CLUTTER_ACTOR(route->path), -10); |
887 | if(!route->visible) gpx_viewer_path_layer_set_visible(route->path, FALSE); |
888 | } |
889 | |
890 | @@ -643,7 +655,6 @@ |
891 | if (route->track->top && route->track->bottom) |
892 | { |
893 | ChamplainBoundingBox *track_bounding_box; |
894 | - printf("zet zoom leveland view track\n"); |
895 | champlain_view_set_zoom_level(view, |
896 | champlain_view_get_max_zoom_level(view)); |
897 | track_bounding_box = champlain_bounding_box_new(); |
898 | @@ -664,7 +675,6 @@ |
899 | |
900 | if(route->stop){ |
901 | clutter_actor_show(CLUTTER_ACTOR(route->stop)); |
902 | - printf("show stop marker\n"); |
903 | } |
904 | |
905 | if(route->start) |
906 | @@ -889,6 +899,7 @@ |
907 | ChamplainView *view = gtk_champlain_embed_get_view(GTK_CHAMPLAIN_EMBED(priv->champlain_view)); |
908 | /* Plot all tracks, and get total bounding box */ |
909 | GtkTreeIter liter; |
910 | + GtkTreeSelection *gts = NULL; |
911 | GtkTreeModel *model = (GtkTreeModel *) gtk_builder_get_object(priv->builder, "routes_store"); |
912 | struct Route *route = g_new0(Route, 1); |
913 | /* Route */ |
914 | @@ -900,7 +911,7 @@ |
915 | { |
916 | route->track = g_object_ref(track); |
917 | } |
918 | - route->visible = FALSE; |
919 | + route->visible = TRUE; |
920 | |
921 | /* draw the track */ |
922 | interface_map_plot_route(view, route); |
923 | @@ -956,6 +967,12 @@ |
924 | } |
925 | |
926 | priv->routes = g_list_append(priv->routes, route); |
927 | + gts = gtk_tree_view_get_selection(GTK_TREE_VIEW(gtk_builder_get_object(priv->builder, "TracksTreeView"))); |
928 | + if (gts != NULL) |
929 | + { |
930 | + GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &liter); |
931 | + gtk_tree_selection_select_path(gts, path); |
932 | + } |
933 | } |
934 | |
935 | void main_window_size_changed(GtkWindow *win, GtkAllocation *alloc, gpointer data) |
936 | @@ -1149,8 +1166,16 @@ |
937 | GFile *afile = g_file_new_for_uri(uri); |
938 | GpxFileBase *file; |
939 | /* Try to open the gpx file */ |
940 | +<<<<<<< TREE |
941 | |
942 | file = gpx_file_open(afile, NULL); |
943 | +======= |
944 | + if (g_str_has_suffix(uri, "fit")) { |
945 | + file = GPX_FILE_BASE(gpx_fit_file_new(afile)); |
946 | + }else { |
947 | + file = GPX_FILE_BASE(gpx_xml_file_new(afile)); |
948 | + } |
949 | +>>>>>>> MERGE-SOURCE |
950 | g_object_unref(afile); |
951 | g_free(uri); |
952 | if(file != NULL) |
953 | @@ -1329,7 +1354,6 @@ |
954 | gint w,h; |
955 | GtkRecentFilter *grf; |
956 | GtkWidget *dock; |
957 | - GtkWidget *map_dock_item, *graph_dock_item; |
958 | |
959 | /* Open UI description file */ |
960 | priv->builder = gtk_builder_new(); |
961 | @@ -1496,6 +1520,9 @@ |
962 | "File and track list", |
963 | GDL_DOCK_ITEM_BEH_CANT_CLOSE |
964 | |GDL_DOCK_ITEM_BEH_CANT_ICONIFY |
965 | + |GDL_DOCK_ITEM_BEH_NEVER_FLOATING |
966 | + |GDL_DOCK_ITEM_BEH_NO_GRIP |
967 | + |GDL_DOCK_ITEM_BEH_LOCKED |
968 | ); |
969 | gtk_container_add(GTK_CONTAINER(item), flw); |
970 | gdl_dock_add_item(GDL_DOCK(dock), GDL_DOCK_ITEM(item), GDL_DOCK_LEFT); |
971 | @@ -1507,6 +1534,9 @@ |
972 | "Detailed track information", |
973 | GDL_DOCK_ITEM_BEH_CANT_CLOSE |
974 | |GDL_DOCK_ITEM_BEH_CANT_ICONIFY |
975 | + |GDL_DOCK_ITEM_BEH_NEVER_FLOATING |
976 | + |GDL_DOCK_ITEM_BEH_NO_GRIP |
977 | + |GDL_DOCK_ITEM_BEH_LOCKED |
978 | ); |
979 | gtk_container_add(GTK_CONTAINER(item), tiw); |
980 | gdl_dock_add_item(GDL_DOCK(dock), GDL_DOCK_ITEM(item), GDL_DOCK_CENTER); |
981 | @@ -1518,6 +1548,9 @@ |
982 | "Map and graph settings", |
983 | GDL_DOCK_ITEM_BEH_CANT_CLOSE |
984 | |GDL_DOCK_ITEM_BEH_CANT_ICONIFY |
985 | + |GDL_DOCK_ITEM_BEH_NEVER_FLOATING |
986 | + |GDL_DOCK_ITEM_BEH_NO_GRIP |
987 | + |GDL_DOCK_ITEM_BEH_LOCKED |
988 | ); |
989 | gtk_container_add(GTK_CONTAINER(item), swi); |
990 | gdl_dock_add_item(GDL_DOCK(dock), GDL_DOCK_ITEM(item), GDL_DOCK_CENTER); |
991 | @@ -1531,7 +1564,7 @@ |
992 | */ |
993 | gtk_box_pack_end(GTK_BOX(gtk_builder_get_object(priv->builder, "main_view_hpane")), dock, TRUE, TRUE, 0); |
994 | |
995 | - priv->dock_layout = gdl_dock_layout_new(GDL_DOCK(dock)); |
996 | + priv->dock_layout = gdl_dock_layout_new(G_OBJECT(dock)); |
997 | restore_layout(gtk_app); |
998 | |
999 | } |
1000 | @@ -1614,8 +1647,18 @@ |
1001 | GFile *afile = g_file_new_for_uri((gchar*)iter->data); |
1002 | /* Add entry to recent manager */ |
1003 | gtk_recent_manager_add_item(GTK_RECENT_MANAGER(priv->recent_man), (gchar *)iter->data); |
1004 | +<<<<<<< TREE |
1005 | |
1006 | file = gpx_file_open(afile, NULL); |
1007 | +======= |
1008 | + /* Try to open the gpx file */ |
1009 | + if (g_str_has_suffix(iter->data, "fit")) { |
1010 | + file = GPX_FILE_BASE(gpx_fit_file_new(afile)); |
1011 | + }else { |
1012 | + file = GPX_FILE_BASE(gpx_xml_file_new(afile)); |
1013 | + } |
1014 | + priv->files = g_list_append(priv->files, file); |
1015 | +>>>>>>> MERGE-SOURCE |
1016 | g_object_unref(afile); |
1017 | if(file != NULL) |
1018 | { |
1019 | @@ -1759,6 +1802,7 @@ |
1020 | /* Try to open the gpx file */ |
1021 | //file = gpx_xml_file_new(input_files[i]); |
1022 | filename = g_file_get_uri(input_files[i]); |
1023 | +<<<<<<< TREE |
1024 | |
1025 | file = gpx_file_open(input_files[i], NULL); |
1026 | if(file != NULL) { |
1027 | @@ -1792,6 +1836,12 @@ |
1028 | } |
1029 | } |
1030 | interface_create_fake_master_track(file, &liter, app); |
1031 | +======= |
1032 | + if (g_str_has_suffix(filename, "fit")) { |
1033 | + file = GPX_FILE_BASE(gpx_fit_file_new(input_files[i])); |
1034 | + }else { |
1035 | + file = GPX_FILE_BASE(gpx_xml_file_new(input_files[i])); |
1036 | +>>>>>>> MERGE-SOURCE |
1037 | } |
1038 | g_free(filename); |
1039 | } |
1040 | @@ -1835,8 +1885,10 @@ |
1041 | bind_textdomain_codeset(PACKAGE, "UTF-8"); |
1042 | textdomain(PACKAGE); |
1043 | setlocale (LC_ALL, ""); |
1044 | - |
1045 | - gtk_clutter_init(&argc, &argv); |
1046 | + |
1047 | + if ((retv = gtk_clutter_init(&argc, &argv)) != CLUTTER_INIT_SUCCESS) { |
1048 | + return retv; |
1049 | + } |
1050 | |
1051 | /* Add own icon structure to the theme engine search */ |
1052 | path = g_build_filename(DATA_DIR, "icons", NULL); |
1053 | |
1054 | === modified file 'src/gpx-viewer.h' |
1055 | --- src/gpx-viewer.h 2012-06-07 16:29:54 +0000 |
1056 | +++ src/gpx-viewer.h 2013-10-14 21:07:05 +0000 |
1057 | @@ -36,6 +36,7 @@ |
1058 | void gpx_viewer_show_preferences_dialog(GtkWidget *menu_item, gpointer user_data); |
1059 | void show_vertical_speed(GtkMenuItem *item, gpointer user_data); |
1060 | void show_acceleration_h(GtkMenuItem *item, gpointer user_data); |
1061 | +void show_heartrate(GtkMenuItem *item, gpointer user_data); |
1062 | |
1063 | enum _SpeedFormat |
1064 | { |