mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 21:20:19 +00:00
96d1cc570e
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 <tcanabrava@kde.org>
25 lines
412 B
C
25 lines
412 B
C
#ifndef SUBSURFACESTARTUP_H
|
|
#define SUBSURFACESTARTUP_H
|
|
|
|
#include "dive.h"
|
|
#include "divelist.h"
|
|
#include "libdivecomputer.h"
|
|
#include "version.h"
|
|
#include <stdbool.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
extern struct preferences prefs;
|
|
extern struct preferences default_prefs;
|
|
extern bool imported;
|
|
|
|
void setup_system_prefs(void);
|
|
void parse_argument(const char *arg);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|