diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2009-07-14 11:54:46 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2009-07-14 11:54:46 (GMT) |
commit | 24d7c72a124df20339a50bb61e66385352e68a1b (patch) | |
tree | be215cb28b1ee8e146d7ec6e86401fd792ce61a7 /src/main.c | |
parent | c9465acd65e197e48da8648eb8d1ef602d6772ed (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.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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(); |