// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xe040
movq 0x38(%rbx), %r14
callq 0x8550
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
callq 0x90d0
movq %rax, 0x20(%rbx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x8960
movq %rax, 0x18(%rbx)
leaq 0x1505b(%rip), %rsi     # 0x22226
pushq $0x1
popq %rbp
movq %rax, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f60
movq 0x18(%rbx), %rdi
leaq 0x15047(%rip), %rsi     # 0x2222e
movl %ebp, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f60
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0x8d60
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0x8ec0
movq 0x18(%rbx), %r14
callq 0x89e0
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
movq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x8f20
callq 0x8370
movq %rax, %r14
callq 0x8790
movq %rax, %r15
leaq 0x14ff7(%rip), %rdi     # 0x22236
leaq 0x14ff3(%rip), %rdx     # 0x22239
movq %r14, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8bf0
movq %rax, %r13
movq 0x20(%rbx), %rbp
callq 0x8e20
movq %rax, %r12
movq %rbp, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
movq %r13, %rsi
callq 0x8b60
movq %r13, %rdi
xorl %esi, %esi
callq 0x8bb0
leaq 0x156da(%rip), %rdi     # 0x22965
leaq 0x14fac(%rip), %rdx     # 0x2223e
pushq $0x6
popq %rcx
movq %r15, %rsi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8bf0
movq %rax, %r15
movq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r15, %rsi
callq 0x8b60
pushq $0x5
popq %rbp
movq %r15, %rdi
movl %ebp, %esi
callq 0x8940
movq 0x38(%rbx), %r15
callq 0x8240
movq %rax, %r13
movq %r15, %rdi
movq %rax, %rsi
callq 0x8150
leaq 0x1677(%rip), %rdx      # 0xe95e
pushq $0x6
popq %rcx
movq %rax, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
callq 0x8ba0
leaq 0x14e61(%rip), %rdi     # 0x2215f
movq %r14, %rsi
leaq 0x14f31(%rip), %rbp     # 0x22239
movq %rbp, %rdx
pushq $0x1
popq %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8bf0
movq %rax, %r15
movq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r15, %rsi
callq 0x8b60
movq %r15, %rdi
xorl %esi, %esi
callq 0x8940
movq 0x38(%rbx), %rdi
movq %r13, %rsi
callq 0x8150
leaq 0x1567(%rip), %rdx      # 0xe8b6
pushq $0x1
popq %rcx
movq %rax, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x8ba0
leaq 0x14edf(%rip), %rdi     # 0x22245
pushq $0x2
popq %rcx
movq %r14, %rsi
movq %rbp, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8bf0
movq %rax, %r15
movq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r15, %rsi
callq 0x8b60
movq %r15, %rdi
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x8940
movq 0x38(%rbx), %rdi
movq %r13, %rsi
callq 0x8150
leaq 0x162b(%rip), %rdx      # 0xe9de
pushq $0x2
popq %rcx
movq %rax, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
callq 0x8ba0
leaq 0x14e86(%rip), %rdi     # 0x22250
pushq $0x3
popq %rcx
movq %r14, %rsi
leaq 0x14e62(%rip), %rbp     # 0x22239
movq %rbp, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8bf0
movq %rax, %r15
movq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r15, %rsi
callq 0x8b60
movq %r15, %rdi
pushq $0x2
popq %r15
movl %r15d, %esi
callq 0x8940
movq 0x38(%rbx), %rdi
movq %r13, %rsi
callq 0x8150
pushq $0x3
popq %rcx
movq %rax, %rdi
movl %r15d, %esi
leaq 0x15b5(%rip), %rdx      # 0xe9de
xorl %r8d, %r8d
callq 0x8ba0
leaq 0x14e21(%rip), %rdi     # 0x22259
pushq $0x7
popq %rcx
movq %r14, %rsi
movq %rbp, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8bf0
movq %rax, %r15
movq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r15, %rsi
callq 0x8b60
movq %r15, %rdi
pushq $0x6
popq %rbp
movl %ebp, %esi
callq 0x8940
movq 0x38(%rbx), %rdi
movq %r13, %rsi
callq 0x8150
pushq $0x7
popq %rcx
movq %rax, %rdi
movl %ebp, %esi
leaq 0x1551(%rip), %rdx      # 0xe9de
xorl %r8d, %r8d
callq 0x8ba0
leaq 0x14dcd(%rip), %rdi     # 0x22269
pushq $0x4
popq %rcx
movq %r14, %rsi
leaq 0x14d90(%rip), %rdx     # 0x22239
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8bf0
movq %rax, %r15
movq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r15, %rsi
callq 0x8b60
movq %r15, %rdi
pushq $0x3
popq %rbp
movl %ebp, %esi
callq 0x8940
movq 0x38(%rbx), %rdi
movq %r13, %rsi
callq 0x8150
pushq $0x4
popq %rcx
movq %rax, %rdi
movl %ebp, %esi
leaq 0x13c1(%rip), %rbp      # 0xe8b6
movq %rbp, %rdx
xorl %r8d, %r8d
callq 0x8ba0
leaq 0x1519d(%rip), %rdi     # 0x226a4
movq %r14, %rsi
leaq 0x14d28(%rip), %rdx     # 0x22239
pushq $0x5
popq %r15
movl %r15d, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8bf0
movq %rax, %r14
movq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r14, %rsi
callq 0x8b60
movq %r14, %rdi
pushq $0x4
popq %r14
movl %r14d, %esi
callq 0x8940
movq 0x38(%rbx), %rdi
movq %r13, %rsi
callq 0x8150
pushq $0x5
popq %rcx
movq %rax, %rdi
movl %r14d, %esi
movq %rbp, %rdx
xorl %r8d, %r8d
callq 0x8ba0
movq 0x38(%rbx), %rdi
movq %r13, %rsi
callq 0x8150
movq %rax, %rdi
movl %r15d, %esi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8680