From 4c73c70ecb30ab412248e0eff4285a6a59af30fa Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 14 Apr 2013 11:31:26 -0700 Subject: Separate Gtk related code from core logic: info Surprisingly straight forward, just a couple of places where we really mix significant logic with UI code (for example setting the window title). I had to move amount_selected from display-gtk.h to display.h - I guess the number of dives that are selected is UI independent. But I wonder if we still will track this as a global variable in a Qt UI (since the Gtk selection logic is the main reason this existed in the first place). Added a new info.h files for the necessary declarations. This should make no difference to functionality. Signed-off-by: Dirk Hohndel --- info.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 info.h (limited to 'info.h') diff --git a/info.h b/info.h new file mode 100644 index 000000000..a27373d89 --- /dev/null +++ b/info.h @@ -0,0 +1,20 @@ +/* + * info.h + * + * logic functions used from info-gtk.c + */ +#ifndef INFO_H +#define INFO_H + +extern gboolean gps_changed(struct dive *dive, struct dive *master, const char *gps_text); +extern void print_gps_coordinates(char *buffer, int len, int lat, int lon); +extern void save_equipment_data(struct dive *dive); +extern void update_equipment_data(struct dive *dive, struct dive *master); +extern void update_time_depth(struct dive *dive, struct dive *edited); +extern const char *get_window_title(struct dive *dive); +extern char *evaluate_string_change(const char *newstring, char **textp, const char *master); +extern int text_changed(const char *old, const char *new); +extern gboolean parse_gps_text(const char *gps_text, double *latitude, double *longitude); +extern int divename(char *buf, size_t size, struct dive *dive, char *trailer); + +#endif -- cgit v1.2.3-70-g09d2