From 8677721e85a344e29782cfc2ab838edb8da9215b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 3 May 2013 11:04:51 -0700 Subject: Remove the majority of the Gtk related code - rip all Gtk code from qt-gui.cpp - don't compile Gtk specific files - don't link against Gtk libraries - don't compile modules we don't use at all (yet) - use #if USE_GTK_UI on the remaining files to disable Gtk related parts - disable the non-functional Cochran support while I'm at it Signed-off-by: Dirk Hohndel --- main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 40492a7e1..424750d28 100644 --- a/main.c +++ b/main.c @@ -99,7 +99,11 @@ static void parse_argument(const char *arg) if (strcmp(arg,"--import") == 0) { /* mark the dives so far as the base, * everything after is imported */ +#if USE_GTK_UI report_dives(FALSE, FALSE); +#else + process_dives(FALSE, FALSE); +#endif imported = TRUE; return; } @@ -119,6 +123,7 @@ static void parse_argument(const char *arg) void update_dive(struct dive *new_dive) { +#if USE_GTK_UI static struct dive *buffered_dive; struct dive *old_dive = buffered_dive; @@ -129,6 +134,7 @@ void update_dive(struct dive *new_dive) show_dive_equipment(new_dive, W_IDX_PRIMARY); show_dive_stats(new_dive); buffered_dive = new_dive; +#endif } void renumber_dives(int nr) @@ -138,7 +144,9 @@ void renumber_dives(int nr) for (i = 0; i < dive_table.nr; i++) { struct dive *dive = dive_table.dives[i]; dive->number = nr + i; +#if USE_GTK_UI flush_divelist(dive); +#endif } mark_divelist_changed(TRUE); } @@ -229,7 +237,9 @@ int main(int argc, char **argv) } if (error != NULL) { +#if USE_GTK_UI report_error(error); +#endif g_error_free(error); error = NULL; } @@ -242,9 +252,13 @@ int main(int argc, char **argv) sure we remember this as the filename in use */ set_filename(filename, FALSE); } +#if USE_GTK_UI report_dives(imported, FALSE); if (dive_table.nr == 0) show_dive_info(NULL); +#else + process_dives(imported, FALSE); +#endif parse_xml_exit(); subsurface_command_line_exit(&argc, &argv); -- cgit v1.2.3-70-g09d2