From 96d1cc570e31396039e4970d2bf75d5f00f1e550 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 9 Sep 2013 05:59:03 -0300 Subject: Use the same code for command line and gui for file handling. The Command line execution of Subsurface happened before the GUI was created, this leaded to various bugs by me(tm) over time. This patch seems to fix all of those, by reusing the same code for GUI interaction and CommandLine interaction. I had to rework how the main.c worked, it used to be C code calling C++ code, and this is non desirable, since C doesn't really understand C++. I Moved all of C-related code to 'subsurfacestartup.c/h' and created a tiny wrapper to call it, so all of the C code is still C code, and the new main.cpp calls the mainwindow->loadFiles and mainWindow->importFiles to get rid of the bugs that happened before. Signed-off-by: Tomaz Canabrava --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6728a89d2..17c553f3c 100644 --- a/Makefile +++ b/Makefile @@ -68,9 +68,10 @@ SOURCES = \ equipment.c \ file.c \ info.c \ - main.c \ + main.cpp \ parse-xml.c \ planner.c \ + subsurfacestartup.c \ profile.c \ save-xml.c \ sha1.c \ -- cgit v1.2.3-70-g09d2