// File: /workspace/github_cpp_makefile_star2_O2/eiskalteschatten[P]developersnotebook/src/windows/ReleaseNotesWindow.cpp
// Function: ReleaseNotesWindow::activate(_GtkWidget*, void*)
void ReleaseNotesWindow::activate(GtkWidget *menu_item, void *main_window_obj) {
    MainWindow *mw                  = (MainWindow*)main_window_obj;
    std::string path_to_exec_str    = mw->get_path_to_exec();
    GtkWidget *release_notes_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

    gtk_window_set_position(GTK_WINDOW(release_notes_window), GTK_WIN_POS_CENTER);
    gtk_window_set_default_size(GTK_WINDOW(release_notes_window), 800, 500);
    gtk_window_set_title(GTK_WINDOW(release_notes_window), "Release Notes");

    #ifndef __APPLE__
        Image logo("icon", "svg", path_to_exec_str, 32, 32);
        std::string path = logo.get_path();
        gtk_window_set_icon_from_file(GTK_WINDOW(release_notes_window), path.c_str(), NULL);
    #endif

    GtkWidget *release_notes_text_view = gtk_text_view_new();
    gtk_text_view_set_editable(GTK_TEXT_VIEW(release_notes_text_view), false);
    gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(release_notes_text_view), GTK_WRAP_WORD);

    GtkWidget *release_notes_scrolled_window = gtk_scrolled_window_new(NULL, NULL);
    gtk_container_add(GTK_CONTAINER(release_notes_scrolled_window), release_notes_text_view);

    GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(release_notes_text_view));

    ReleaseNotesWindow rnw(path_to_exec_str);
    rnw.fill_release_notes(buffer);

    gtk_container_add(GTK_CONTAINER(release_notes_window), release_notes_scrolled_window);

    gtk_widget_show_all(release_notes_window);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
leaq 0x48(%rsp), %rdi
callq 0x86e0
xorl %edi, %edi
callq 0x8d80
movq %rax, %rbx
callq 0x8f80
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8150
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x87c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x320, %esi            # imm = 0x320
movl $0x1f4, %edx            # imm = 0x1F4
callq 0x8df0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8150
leaq 0x117d3(%rip), %rsi     # 0x2269c
movq %rax, %rdi
callq 0x82c0
leaq 0x11763(%rip), %rsi     # 0x2263b
leaq 0xc8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0xb078
leaq 0x11150(%rip), %rsi     # 0x22041
leaq 0xa8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xb078
leaq 0x88(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x86e0
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
leaq 0x88(%rsp), %rcx
pushq $0x20
popq %r8
movl %r8d, %r9d
callq 0xb2cc
leaq 0x88(%rsp), %rdi
callq 0x9120
leaq 0xa8(%rsp), %rdi
callq 0x9120
leaq 0xc8(%rsp), %rdi
callq 0x9120
leaq 0x148(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x86e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8150
movq 0x28(%rsp), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x8a20
callq 0x9000
movq %rax, %r15
callq 0x88d0
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
xorl %esi, %esi
callq 0x8dc0
movq %r15, %rdi
movq %r12, %rsi
callq 0x8150
pushq $0x2
popq %rsi
movq %rax, %rdi
callq 0x8e40
xorl %edi, %edi
xorl %esi, %esi
callq 0x8960
movq %rax, %r14
callq 0x89e0
movq %rax, %r13
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
movq %r15, %rsi
callq 0x8f20
movq %r15, %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
callq 0x8330
movq %rax, %r15
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x86e0
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x112f0
leaq 0x68(%rsp), %rdi
callq 0x9120
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x1112e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x8150
movq %rax, %rdi
movq %r14, %rsi
callq 0x8f20
movq %rbx, %rdi
callq 0x8cc0
leaq 0x8(%rsp), %rdi
callq 0x9120
leaq 0x28(%rsp), %rdi
callq 0x9120
leaq 0xe8(%rsp), %rdi
callq 0xb3c8
leaq 0x48(%rsp), %rdi
callq 0x9120
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x110f5
jmp 0x110fc
movq %rax, %rbx
jmp 0x11109
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x9120
jmp 0x110c4
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x9120
jmp 0x110d6
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x9120
jmp 0x1111b
jmp 0x11118
jmp 0x110fc
jmp 0x110fc
jmp 0x110fc
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x9120
jmp 0x110ff
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x9120
leaq 0xe8(%rsp), %rdi
callq 0xb3c8
jmp 0x1111b
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x9120
movq %rbx, %rdi
callq 0x87f0
nop