Skip to content
Snippets Groups Projects
Commit 7b53491b authored by Antoine Fontaine's avatar Antoine Fontaine :8ball:
Browse files

Course element are now added where they should

parent deb50ee8
Branches
Tags
1 merge request!11Added folder support
......@@ -75,11 +75,11 @@ static void
open_folder_cb (gpointer ptr, struct FolderContent content)
{
GuiResource *self = ptr;
GtkContainer *list = GTK_CONTAINER (self->parent);
gtk_container_remove (list, GTK_WIDGET (self));
guint start_index = gtk_list_box_row_get_index (GTK_LIST_BOX_ROW (self));
gtk_container_remove (GTK_CONTAINER (self->parent), GTK_WIDGET (self));
for (guint i=0; i<content.resource_count; i++) {
GuiResource *resource = gui_resource_new (content.resources[i], self->parent);
gtk_container_add (list, GTK_WIDGET (resource));
gtk_list_box_insert (self->parent, GTK_WIDGET (resource), start_index+i);
}
}
......
......@@ -58,7 +58,7 @@ update_files (GuiWeek* self)
{
for (guint i=0; i<self->resource_count; i++) {
GuiResource* file = gui_resource_new (self->resources[i], self->week_content);
gtk_list_box_insert (self->week_content, GTK_WIDGET (file), i+1);
gtk_container_add (GTK_CONTAINER (self->week_content), GTK_WIDGET (file));
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment