diff options
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(); |