summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-04-21 22:00:00 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-04-21 22:00:00 (GMT)
commit8eb95d316f7b6fbad0ff798abfe7f70f89e812d2 (patch)
tree4f310c7ffdb94d48fff236e63c7e6f0ed9f1dee1 /src/main.c
parent315146a49b5570294ca20beca720c4e3f74a86bd (diff)
Improved the way file formats are detected and loaded.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 19b0544..626cae8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -418,18 +418,21 @@ static gboolean load_last_project(GGenConfig *cfg)
static int open_binaries(char **files, int count)
{
int result; /* Bilan à retourner */
+ GStudyProject *project; /* Projet courant à compléter */
int i; /* Boucle de parcours */
GBinContent *content; /* Contenu binaire à charger */
result = EXIT_SUCCESS;
+ project = get_current_project();
+
for (i = 0; i < count && result == EXIT_SUCCESS; i++)
{
content = g_file_content_new(files[i]);
if (content != NULL)
{
- qck_study_new_content(content, PCS_ROOT);
+ g_study_project_discover_binary_content(project, content);
g_object_unref(G_OBJECT(content));
}
@@ -438,6 +441,8 @@ static int open_binaries(char **files, int count)
}
+ g_object_unref(G_OBJECT(project));
+
return result;
}