summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 0d51fa9..cc78897 100644
--- a/src/main.c
+++ b/src/main.c
@@ -30,6 +30,7 @@
#include "editor.h"
#include "params.h"
+#include "project.h"
#include "arch/processor.h"
#include "format/exe_format.h"
#include "format/mangling/demangler.h"
@@ -55,8 +56,11 @@ int main(int argc, char **argv)
{
configuration *config; /* Configuration principale */
GtkWidget *editor; /* FenĂȘtre graphique */
+ const char *filename; /* Chemin du dernier projet */
+ openida_project *project; /* Nouveau projet courant */
config = load_configuration("main", main_params, MPT_COUNT);
+ set_main_configuration(config);
setlocale(LC_ALL, "");
/*
@@ -93,6 +97,19 @@ int main(int argc, char **argv)
init_all_plugins(G_OBJECT(editor));
+ /* Charge le dernier projet */
+
+ filename = get_string_config_value(config, MPT_RECENT_PROJECT_1);
+
+ if (filename == NULL) project = create_empty_openida_project();
+ else project = g_openida_project_new_from_xml(filename);
+
+ set_current_openida_project(project);
+
+ display_openida_project(project, G_OBJECT(editor));
+
+ /* Exécution du programme */
+
gdk_threads_enter();
gtk_main();
gdk_threads_leave();