// File: /workspace/github_cpp_makefile_star2_O2/eiskalteschatten[P]developersnotebook/src/views/DashboardView.cpp
// Function: DashboardView::setup_projects_ending_soon()
void DashboardView::setup_projects_ending_soon() {
    projects_ending_soon_list_store = gtk_list_store_new(N_COLUMNS,
                                                         G_TYPE_STRING,
                                                         G_TYPE_STRING,
                                                         G_TYPE_STRING);

    projects_ending_soon_tree_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(projects_ending_soon_list_store));

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

    GtkCellRenderer *text_renderer = gtk_cell_renderer_text_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(projects_ending_soon_tree_view), id_column);
        gtk_tree_view_column_set_visible(id_column, FALSE);
    }

    // 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(projects_ending_soon_tree_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(projects_ending_soon_list_store), SORT_NAME_COLUMN, sort_by_string, GINT_TO_POINTER(NAME_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(projects_ending_soon_tree_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(projects_ending_soon_list_store), SORT_END_DATE_COLUMN, sort_by_date, GINT_TO_POINTER(END_DATE_COLUMN), NULL);
    }

    gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(projects_ending_soon_list_store), SORT_END_DATE_COLUMN, GTK_SORT_ASCENDING);

    g_signal_connect(projects_ending_soon_tree_view, "row-activated", G_CALLBACK(projects_ending_soon_row_activated), this);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x3
popq %rdi
pushq $0x40
popq %rcx
movq %rcx, %rsi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x8920
movq %rax, %r14
movq %rax, 0x20(%rbx)
callq 0x8550
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
callq 0x90d0
movq %rax, 0x10(%rbx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x8960
movq %rax, 0x18(%rbx)
leaq 0x12d40(%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 0x12d2c(%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 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x8f20
callq 0x8370
movq %rax, %r14
leaq 0x12ce4(%rip), %rdi     # 0x22236
leaq 0x12ce0(%rip), %r15     # 0x22239
movq %rax, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8bf0
movq %rax, %r13
movq 0x10(%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 0x12bbe(%rip), %rdi     # 0x2215f
movq %r14, %rsi
movq %r15, %rdx
pushq $0x1
popq %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8bf0
movq %rax, %r13
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r13, %rsi
callq 0x8b60
movq %r13, %rdi
xorl %esi, %esi
callq 0x8940
movq 0x20(%rbx), %rbp
callq 0x8240
movq %rax, %r13
movq %rbp, %rdi
movq %rax, %rsi
callq 0x8150
leaq -0xd40(%rip), %rdx      # 0xe8b6
pushq $0x1
popq %rcx
movq %rax, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x8ba0
leaq 0x12c43(%rip), %rdi     # 0x22250
pushq $0x2
popq %rcx
movq %r14, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8bf0
movq %rax, %r14
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r14, %rsi
callq 0x8b60
movq %r14, %rdi
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x8940
movq 0x20(%rbx), %rdi
movq %r13, %rsi
callq 0x8150
leaq -0xc7c(%rip), %rdx      # 0xe9de
pushq $0x2
popq %rcx
movq %rax, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
callq 0x8ba0
movq 0x20(%rbx), %rdi
movq %r13, %rsi
callq 0x8150
movq %rax, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x8680
movq 0x10(%rbx), %rdi
leaq 0x12e3d(%rip), %rsi     # 0x224ca
leaq -0x6d4(%rip), %rdx      # 0xefc0
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x82b0