2 Copyright (C) 2007 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 #include <Carbon/Carbon.h>
20 #undef check // stupid, stupid carbon
22 #include "ardour_ui.h"
24 #include "sync-menu.h"
26 /* Called for clicks on the dock icon. Can be used to unminimize or
27 * create a new window for example.
31 handle_reopen_application (const AppleEvent *inAppleEvent,
32 AppleEvent *outAppleEvent,
35 cerr << "reopen app\n";
40 handle_quit_application (const AppleEvent *inAppleEvent,
41 AppleEvent *outAppleEvent,
45 ARDOUR_UI::instance()->quit ();
51 ARDOUR_UI::platform_specific ()
53 AEInstallEventHandler (kCoreEventClass, kAEReopenApplication,
54 handle_reopen_application, 0, true);
56 AEInstallEventHandler (kCoreEventClass, kAEQuitApplication,
57 handle_quit_application, 0, true);
59 Gtk::Widget* widget = ActionManager::get_widget ("/ui/Main/Session/Quit");
61 ige_mac_menu_set_quit_menu_item ((GtkMenuItem*) widget->gobj());
64 IgeMacMenuGroup* group = ige_mac_menu_add_app_menu_group ();
66 widget = ActionManager::get_widget ("/ui/Main/Session/About");
68 ige_mac_menu_add_app_menu_item (group, (GtkMenuItem*) widget->gobj(), 0);
70 widget = ActionManager::get_widget ("/ui/Main/Session/ToggleOptionsEditor");
72 ige_mac_menu_add_app_menu_item (group, (GtkMenuItem*) widget->gobj(), 0);