summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-07-14 11:54:46 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-07-14 11:54:46 (GMT)
commit24d7c72a124df20339a50bb61e66385352e68a1b (patch)
treebe215cb28b1ee8e146d7ec6e86401fd792ce61a7 /src/main.c
parentc9465acd65e197e48da8648eb8d1ef602d6772ed (diff)
Loaded the last project at startup.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@92 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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();