// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x40, %esi
movl $0x40, %edx
movl $0x40, %ecx
movl $0x3, %edi
xorl %eax, %eax
callq 0x88e0
movq %rax, %r14
movq %rax, 0x20(%rbx)
callq 0x8520
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
callq 0x9080
movq %rax, 0x10(%rbx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x8920
movq %rax, 0x18(%rbx)
leaq 0x168ae(%rip), %rsi     # 0x29226
movq %rax, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0x18(%rbx), %rdi
leaq 0x1689a(%rip), %rsi     # 0x2922e
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0x8d10
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0x8e90
movq 0x18(%rbx), %r14
callq 0x89c0
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x8ef0
callq 0x8360
movq %rax, %r14
leaq 0x1684f(%rip), %rdi     # 0x29236
leaq 0x1684b(%rip), %r15     # 0x29239
movq %rax, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8ba0
movq %rax, %r13
movq 0x10(%rbx), %rbp
callq 0x8de0
movq %rax, %r12
movq %rbp, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
movq %r13, %rsi
callq 0x8b10
movq %r13, %rdi
xorl %esi, %esi
callq 0x8b60
leaq 0x16729(%rip), %rdi     # 0x2915f
movq %r14, %rsi
movq %r15, %rdx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8ba0
movq %rax, %r13
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r13, %rsi
callq 0x8b10
movq %r13, %rdi
xorl %esi, %esi
callq 0x8900
movq 0x20(%rbx), %rbp
callq 0x8230
movq %rax, %r13
movq %rbp, %rdi
movq %rax, %rsi
callq 0x8150
leaq -0xeb3(%rip), %rdx      # 0x11bda
movl $0x1, %ecx
movq %rax, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x8b50
leaq 0x167aa(%rip), %rdi     # 0x29250
movq %r14, %rsi
movq %r15, %rdx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8ba0
movq %rax, %r14
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r14, %rsi
callq 0x8b10
movq %r14, %rdi
movl $0x1, %esi
callq 0x8900
movq 0x20(%rbx), %rdi
movq %r13, %rsi
callq 0x8150
leaq -0xded(%rip), %rdx      # 0x11d08
movl $0x2, %ecx
movq %rax, %rdi
movl $0x1, %esi
xorl %r8d, %r8d
callq 0x8b50
movq 0x20(%rbx), %rdi
movq %r13, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x8650
movq 0x10(%rbx), %rdi
leaq 0x1699a(%rip), %rsi     # 0x294ca
leaq -0x743(%rip), %rdx      # 0x123f4
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 0x82a0
nop