summaryrefslogtreecommitdiff
path: root/src/gui/menus
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/gui/menus
parent315146a49b5570294ca20beca720c4e3f74a86bd (diff)
Improved the way file formats are detected and loaded.
Diffstat (limited to 'src/gui/menus')
-rw-r--r--src/gui/menus/project.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/menus/project.c b/src/gui/menus/project.c
index 424a506..5a28a7e 100644
--- a/src/gui/menus/project.c
+++ b/src/gui/menus/project.c
@@ -286,8 +286,6 @@ static void mcb_project_add_binary_file(GtkMenuItem *menuitem, GMenuBar *bar)
free(dir);
}
- g_object_unref(G_OBJECT(project));
-
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
{
filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
@@ -296,7 +294,7 @@ static void mcb_project_add_binary_file(GtkMenuItem *menuitem, GMenuBar *bar)
if (content != NULL)
{
- qck_study_new_content(content, PCS_ROOT);
+ g_study_project_discover_binary_content(project, content);
g_object_unref(G_OBJECT(content));
}
@@ -304,6 +302,8 @@ static void mcb_project_add_binary_file(GtkMenuItem *menuitem, GMenuBar *bar)
}
+ g_object_unref(G_OBJECT(project));
+
gtk_widget_destroy(dialog);
}