// File: eiskalteschatten[P]developersnotebook/src/views/ProjectsView.cpp
// Function: ProjectsView::setup_list_view()
void ProjectsView::setup_list_view() {
    setup_list_store();

    list_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(list_store));

    list_scrolled_window = gtk_scrolled_window_new(NULL, NULL);
    g_object_set(list_scrolled_window, "hexpand", TRUE, NULL);
    g_object_set(list_scrolled_window, "vexpand", TRUE, NULL);
    gtk_widget_set_halign(list_scrolled_window, GTK_ALIGN_FILL);
    gtk_widget_set_valign(list_scrolled_window, GTK_ALIGN_FILL);
    gtk_container_add(GTK_CONTAINER(list_scrolled_window), list_view);

    GtkCellRenderer *text_renderer = gtk_cell_renderer_text_new();
    GtkCellRenderer *toggle_renderer = gtk_cell_renderer_toggle_new();

    // ID Column
    {
        GtkTreeViewColumn *id_column = gtk_tree_view_column_new_with_attributes("Id", text_renderer, "text", ID_COLUMN, NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), id_column);
        gtk_tree_view_column_set_visible(id_column, FALSE);
    }

    // Is Complete Column
    {
        GtkTreeViewColumn *is_complete_column = gtk_tree_view_column_new_with_attributes("", toggle_renderer, "active", IS_COMPLETE_COLUMN, NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), is_complete_column);
        gtk_tree_view_column_set_sort_column_id(is_complete_column, SORT_IS_COMPLETE_COLUMN);
        gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(list_store), SORT_IS_COMPLETE_COLUMN, sort_by_boolean, GINT_TO_POINTER(IS_COMPLETE_COLUMN), NULL);
    }

    // Name Column
    {
        GtkTreeViewColumn *name_column = gtk_tree_view_column_new_with_attributes("Name", text_renderer, "text", NAME_COLUMN, NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), name_column);
        gtk_tree_view_column_set_sort_column_id(name_column, SORT_NAME_COLUMN);
        gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(list_store), SORT_NAME_COLUMN, sort_by_string, GINT_TO_POINTER(NAME_COLUMN), NULL);
    }

    // Start Date Column
    {
        GtkTreeViewColumn *start_date_column = gtk_tree_view_column_new_with_attributes("Start Date", text_renderer, "text", START_DATE_COLUMN, NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), start_date_column);
        gtk_tree_view_column_set_sort_column_id(start_date_column, SORT_START_DATE_COLUMN);
        gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(list_store), SORT_START_DATE_COLUMN, sort_by_date, GINT_TO_POINTER(START_DATE_COLUMN), NULL);
    }

    // End Date Column
    {
        GtkTreeViewColumn *end_date_column = gtk_tree_view_column_new_with_attributes("End Date", text_renderer, "text", END_DATE_COLUMN, NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), end_date_column);
        gtk_tree_view_column_set_sort_column_id(end_date_column, SORT_END_DATE_COLUMN);
        gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(list_store), SORT_END_DATE_COLUMN, sort_by_date, GINT_TO_POINTER(END_DATE_COLUMN), NULL);
    }

    // Date Completed Column
    {
        GtkTreeViewColumn *date_completed_column = gtk_tree_view_column_new_with_attributes("Completion Date", text_renderer, "text", DATE_COMPLETED_COLUMN, NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), date_completed_column);
        gtk_tree_view_column_set_sort_column_id(date_completed_column, SORT_DATE_COMPLETED_COLUMN);
        gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(list_store), SORT_DATE_COMPLETED_COLUMN, sort_by_date, GINT_TO_POINTER(DATE_COMPLETED_COLUMN), NULL);
    }

    // URL Column
    {
        GtkTreeViewColumn *url_column = gtk_tree_view_column_new_with_attributes("URL", text_renderer, "text", URL_COLUMN, NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), url_column);
        gtk_tree_view_column_set_sort_column_id(url_column, SORT_URL_COLUMN);
        gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(list_store), SORT_URL_COLUMN, sort_by_string, GINT_TO_POINTER(URL_COLUMN), NULL);
    }

    // Notes Column
    {
        GtkTreeViewColumn *notes_column = gtk_tree_view_column_new_with_attributes("Notes", text_renderer, "text", NOTES_COLUMN, NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), notes_column);
        gtk_tree_view_column_set_sort_column_id(notes_column, SORT_NOTES_COLUMN);
        gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(list_store), SORT_NOTES_COLUMN, sort_by_string, GINT_TO_POINTER(NOTES_COLUMN), NULL);
    }

    gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(list_store), SORT_IS_COMPLETE_COLUMN, GTK_SORT_ASCENDING);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x18bc0
movq -0x68(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0xf0(%rbp)
callq 0xa6d0
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
callq 0xb3d0
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x20(%rax)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0xab80
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rax), %rdi
leaq 0x3beb5(%rip), %rsi     # 0x53459
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0xb230
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x3be9e(%rip), %rsi     # 0x53461
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0xb230
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0xaff0
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0xb190
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xe8(%rbp)
callq 0xac10
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x68(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xb1e0
callq 0xa4b0
movq %rax, -0x10(%rbp)
callq 0xa980
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq 0x3be28(%rip), %rdi     # 0x53469
leaq 0x3be24(%rip), %rdx     # 0x5346c
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xae30
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xe0(%rbp)
callq 0xb0e0
movq -0xe0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0xad90
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xadf0
movq -0x18(%rbp), %rsi
leaq 0x3c583(%rip), %rdi     # 0x53c25
leaq 0x3bdc8(%rip), %rdx     # 0x53471
movl $0x6, %ecx
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xae30
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xd8(%rbp)
callq 0xb0e0
movq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0xad90
movq -0x28(%rbp), %rdi
movl $0x5, %esi
callq 0xab60
movq -0x68(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0xd0(%rbp)
callq 0xa310
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movl $0x5, %esi
leaq 0x3670(%rip), %rdx      # 0x1ada0
movl $0x6, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xade0
movq -0x10(%rbp), %rsi
leaq 0x3bc48(%rip), %rdi     # 0x53392
leaq 0x3bd1b(%rip), %rdx     # 0x5346c
movl $0x1, %ecx
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xae30
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xc8(%rbp)
callq 0xb0e0
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0xad90
movq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xab60
movq -0x68(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0xc0(%rbp)
callq 0xa310
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
xorl %esi, %esi
leaq 0x34fe(%rip), %rdx      # 0x1acd0
movl $0x1, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xade0
movq -0x10(%rbp), %rsi
leaq 0x3bc8c(%rip), %rdi     # 0x53478
leaq 0x3bc79(%rip), %rdx     # 0x5346c
movl $0x2, %ecx
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xae30
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xb8(%rbp)
callq 0xb0e0
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x38(%rbp), %rsi
callq 0xad90
movq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0xab60
movq -0x68(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0xb0(%rbp)
callq 0xa310
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movl $0x1, %esi
leaq 0x35c6(%rip), %rdx      # 0x1ae40
movl $0x2, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xade0
movq -0x10(%rbp), %rsi
leaq 0x3bbef(%rip), %rdi     # 0x53483
leaq 0x3bbd1(%rip), %rdx     # 0x5346c
movl $0x3, %ecx
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xae30
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xa8(%rbp)
callq 0xb0e0
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0xad90
movq -0x40(%rbp), %rdi
movl $0x2, %esi
callq 0xab60
movq -0x68(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0xa0(%rbp)
callq 0xa310
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movl $0x2, %esi
leaq 0x351e(%rip), %rdx      # 0x1ae40
movl $0x3, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xade0
movq -0x10(%rbp), %rsi
leaq 0x3bb50(%rip), %rdi     # 0x5348c
leaq 0x3bb29(%rip), %rdx     # 0x5346c
movl $0x7, %ecx
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xae30
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x48(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x98(%rbp)
callq 0xb0e0
movq -0x98(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x48(%rbp), %rsi
callq 0xad90
movq -0x48(%rbp), %rdi
movl $0x6, %esi
callq 0xab60
movq -0x68(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x90(%rbp)
callq 0xa310
movq -0x90(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movl $0x6, %esi
leaq 0x3476(%rip), %rdx      # 0x1ae40
movl $0x7, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xade0
movq -0x10(%rbp), %rsi
leaq 0x3bab8(%rip), %rdi     # 0x5349c
leaq 0x3ba81(%rip), %rdx     # 0x5346c
movl $0x4, %ecx
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xae30
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x88(%rbp)
callq 0xb0e0
movq -0x88(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x50(%rbp), %rsi
callq 0xad90
movq -0x50(%rbp), %rdi
movl $0x3, %esi
callq 0xab60
movq -0x68(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x80(%rbp)
callq 0xa310
movq -0x80(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movl $0x3, %esi
leaq 0x3264(%rip), %rdx      # 0x1acd0
movl $0x4, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xade0
movq -0x10(%rbp), %rsi
leaq 0x3be4e(%rip), %rdi     # 0x538d4
leaq 0x3b9df(%rip), %rdx     # 0x5346c
movl $0x5, %ecx
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xae30
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x58(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x78(%rbp)
callq 0xb0e0
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x58(%rbp), %rsi
callq 0xad90
movq -0x58(%rbp), %rdi
movl $0x4, %esi
callq 0xab60
movq -0x68(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x70(%rbp)
callq 0xa310
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movl $0x4, %esi
leaq 0x31c8(%rip), %rdx      # 0x1acd0
movl $0x5, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xade0
movq -0x68(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x60(%rbp)
callq 0xa310
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movl $0x5, %esi
xorl %edx, %edx
callq 0xa850
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)