diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-06-02 18:28:02 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-02 23:59:29 -0700 |
commit | d95d1735b5f0fec2941696a4bb1720eb00a6f59c (patch) | |
tree | eae15bb2c25d051150292de7b17429d074c65d36 /dive.h | |
parent | 13e8aba7daee2104c859e17de3363a24c5a885c0 (diff) | |
download | subsurface-d95d1735b5f0fec2941696a4bb1720eb00a6f59c.tar.gz |
Break picture handling code from C++ to C.
This commit breaks the loading of images that were done in the divelist
into smaller bits. A bit of code refactor was done in order to correct the
placement of a few methods.
ShiftTimesDialog::EpochFromExiv got moved to Exif::epoch dive_add_picture
is now used instead of add_event picture_load_exif_data got implemented
using the old listview code. dive_set_geodata_from_picture got
implemented using the old listview code.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -286,16 +286,21 @@ struct dive { struct picture { char *filename; time_t timestamp; + degrees_t latitude; + degrees_t longitude; struct picture *next; }; #define FOR_EACH_PICTURE( DIVE ) \ for(struct picture *picture = DIVE->picture_list; picture; picture = picture->next) -extern struct picture *dive_add_picture(struct dive *d, char *picture); -extern void dive_remove_picture(struct dive *d, char *picture); + +extern struct picture *alloc_picture(); +extern void dive_add_picture(struct dive *d, struct picture *pic); +extern void dive_remove_picture(struct dive *d, struct picture *pic); extern uint dive_get_picture_count(struct dive *d); extern void picture_load_exif_data(struct picture *p); +extern void dive_set_geodata_from_picture(struct dive *d, struct picture *pic); static inline int dive_has_gps_location(struct dive *dive) |