diff options
Diffstat (limited to 'src/gui/menus')
-rw-r--r-- | src/gui/menus/project.c | 6 |
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); } |