if using a top-menubar (e.g. OS X), don't quit when editor window is closed via WM close button

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4248 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-11-25 00:58:05 +00:00
parent f6b5444ebf
commit ba3a704d7b
2 changed files with 9 additions and 1 deletions

View File

@ -9,6 +9,8 @@
(gtk_accel_path "<Actions>/Transport/ToggleRollForgetCapture" "<%PRIMARY%>period")
(gtk_accel_path "<Actions>/Transport/record-roll" "<%PRIMARY%>space")
(gtk_accel_path "<Actions>/Common/ToggleOptionsEditor" "<%PRIMARY%>,")
(gtk_accel_path "<Actions>/Editor/align-regions-end" "<%PRIMARY%><%SECONDARY%>less")
(gtk_accel_path "<Actions>/Editor/align-regions-end-relative" "<%PRIMARY%>less")
(gtk_accel_path "<Actions>/Editor/align-regions-start" "<%LEVEL4%><%SECONDARY%>less")
@ -61,7 +63,6 @@
(gtk_accel_path "<Actions>/Editor/insert-region" "i")
(gtk_accel_path "<Actions>/Editor/addExistingAudioFiles" "<%PRIMARY%>i")
(gtk_accel_path "<Actions>/Editor/invert-selection" "<%TERTIARY%>i")
(gtk_accel_path "<Actions>/Common/ToggleOptionsEditor" "<%SECONDARY%>o")
(gtk_accel_path "<Actions>/Main/Open" "<%PRIMARY%>o")
(gtk_accel_path "<Actions>/Main/Recent" "<%PRIMARY%><%TERTIARY%>o")
(gtk_accel_path "<Actions>/Editor/naturalize-region" "<%LEVEL4%>o")

View File

@ -125,6 +125,13 @@ ARDOUR_UI::toggle_editor_mixer_on_top ()
gint
ARDOUR_UI::exit_on_main_window_close (GdkEventAny *ev)
{
#ifdef TOP_MENUBAR
/* just hide the window, and return - the top menu stays up */
editor->hide ();
return TRUE;
#else
/* time to get out of here */
finish();
return TRUE;
#endif
}