// File: eiskalteschatten[P]developersnotebook/src/windows/MenuBar.cpp
// Function: MenuBar::setup_view_menu()
void MenuBar::setup_view_menu() {
    GtkWidget *view_menu = gtk_menu_new();
    GtkWidget *view_mi   = gtk_menu_item_new_with_label("View");

    dashboard_mi = gtk_menu_item_new_with_label("Dashboard");
    projects_mi  = gtk_menu_item_new_with_label("Projects");

    // Setup submenu
    gtk_menu_item_set_submenu(GTK_MENU_ITEM(view_mi), view_menu);

    // Setup menu items

    // Dashboard
    {
        gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), dashboard_mi);
        gtk_widget_add_accelerator(dashboard_mi, "activate", accel_group, GDK_KEY_1, primary_mask_key, GTK_ACCEL_VISIBLE);
        g_signal_connect(G_OBJECT(dashboard_mi), "activate", G_CALLBACK(switch_stack_dashboard), this);
    }

    // Projects
    {
        gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), projects_mi);
        gtk_widget_add_accelerator(projects_mi, "activate", accel_group, GDK_KEY_2, primary_mask_key, GTK_ACCEL_VISIBLE);
        g_signal_connect(G_OBJECT(projects_mi), "activate", G_CALLBACK(switch_stack_projects), this);
    }

    #ifdef __APPLE__
        GtkWidget *separator_mi_1 = gtk_separator_menu_item_new();
        gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), separator_mi_1);
    #endif

    // Add the menu to the menu shell
    gtk_menu_shell_append(GTK_MENU_SHELL(menubar), view_mi);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0xa9f0
movq %rax, -0x10(%rbp)
leaq 0x328d2(%rip), %rdi     # 0x53906
callq 0xb090
movq %rax, -0x18(%rbp)
leaq 0x3285f(%rip), %rdi     # 0x538a3
callq 0xb090
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x40(%rax)
leaq 0x32852(%rip), %rdi     # 0x538ad
callq 0xb090
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0xa4a0
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0xace0
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0xa350
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rsi
callq 0xaa90
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rdi
movq 0x18(%rax), %rdx
movl 0x10(%rax), %r8d
leaq 0x32046(%rip), %rsi     # 0x53116
movl $0x31, %ecx
movl $0x1, %r9d
callq 0xabd0
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rdi
movl $0x50, %esi
callq 0xa190
movq -0x28(%rbp), %rcx
movq %rax, %rdi
leaq 0x32016(%rip), %rsi     # 0x53116
leaq -0x4f7(%rip), %rdx      # 0x20c10
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0xa380
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0xa350
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0xaa90
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq 0x18(%rax), %rdx
movl 0x10(%rax), %r8d
leaq 0x31fc2(%rip), %rsi     # 0x53116
movl $0x32, %ecx
movl $0x1, %r9d
callq 0xabd0
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movl $0x50, %esi
callq 0xa190
movq -0x28(%rbp), %rcx
movq %rax, %rdi
leaq 0x31f92(%rip), %rsi     # 0x53116
leaq -0x54b(%rip), %rdx      # 0x20c40
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0xa380
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
callq 0xa350
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0xaa90
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)