| 5691 | // GTK-OSX-APPLICATION |
| 5692 | GtkosxApplication *theApp = g_object_new (GTKOSX_TYPE_APPLICATION, NULL); |
| 5693 | GtkWidget *osx_menubar, *osx_help, *osx_about, *osx_preferences, *osx_quit; |
| 5694 | |
| 5695 | // Define objects from gnumeric |
| 5696 | osx_menubar = gtk_ui_manager_get_widget (wbcg->ui, "/ui/menubar"); |
| 5697 | osx_help = gtk_ui_manager_get_widget (wbcg->ui, "/menubar/Help/Help"); |
| 5698 | osx_about = gtk_ui_manager_get_widget (wbcg->ui, "/menubar/Help/HelpAbout"); |
| 5699 | osx_preferences = gtk_ui_manager_get_widget (wbcg->ui, "/menubar/Edit/EditPreferences"); |
| 5700 | osx_quit = gtk_ui_manager_get_widget (wbcg->ui, "/menubar/File/FileQuit"); |
| 5701 | |
| 5702 | // Make the OS X menu bar object |
| 5703 | gtkosx_application_set_menu_bar (theApp, GTK_MENU_SHELL (osx_menubar)); |
| 5704 | gtkosx_application_set_help_menu (theApp, GTK_MENU_ITEM (osx_help)); |
| 5705 | gtkosx_application_set_use_quartz_accelerators (theApp, TRUE); |
| 5706 | |
| 5707 | // Rearange certain menu items the way OS X users expect to see them |
| 5708 | gtkosx_application_insert_app_menu_item (theApp, osx_about, 1); |
| 5709 | gtkosx_application_insert_app_menu_item (theApp, gtk_separator_menu_item_new (), 2); |
| 5710 | gtkosx_application_insert_app_menu_item (theApp, osx_preferences, 3); |
| 5711 | gtkosx_application_insert_app_menu_item (theApp, gtk_separator_menu_item_new (), 4); |
| 5712 | |
| 5713 | // Hide the original menu items, but Window menu doesn't work... |
| 5714 | gtk_widget_hide (osx_menubar); |
| 5715 | gtk_widget_hide (osx_quit); |
| 5716 | |
| 5717 | // Tell OS X to show the menu bar |
| 5718 | gtkosx_application_ready (theApp); |
| 5719 | //END GTK-OSX-APPLICATION |
| 5720 | |