cleanup menus/actions mess exposed on OS X; remove video items from OS X menus (for now)
This commit is contained in:
parent
a70192adff
commit
4cd27e4733
|
@ -63,13 +63,18 @@ vector<RefPtr<Gtk::Action> > ActionManager::jack_opposite_sensitive_actions;
|
|||
vector<RefPtr<Gtk::Action> > ActionManager::transport_sensitive_actions;
|
||||
vector<RefPtr<Gtk::Action> > ActionManager::edit_point_in_region_sensitive_actions;
|
||||
|
||||
static Glib::RefPtr<UIManager> ui_manager;
|
||||
|
||||
void
|
||||
ActionManager::init ()
|
||||
{
|
||||
std::string ui_file;
|
||||
|
||||
ui_manager = UIManager::create ();
|
||||
}
|
||||
|
||||
void
|
||||
ActionManager::load_menus ()
|
||||
{
|
||||
std::string ui_file;
|
||||
|
||||
find_file_in_search_path (ardour_config_search_path(), "ardour.menus", ui_file);
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ namespace ActionManager {
|
|||
/* Ardour specific */
|
||||
|
||||
extern void init ();
|
||||
extern void load_menus ();
|
||||
|
||||
extern std::vector<Glib::RefPtr<Gtk::Action> > session_sensitive_actions;
|
||||
extern std::vector<Glib::RefPtr<Gtk::Action> > write_sensitive_actions;
|
||||
|
|
|
@ -35,9 +35,10 @@
|
|||
<menuitem action='addExistingAudioFiles'/>
|
||||
<!--menuitem action='importFromSession'/-->
|
||||
|
||||
#ifndef GTKOSX
|
||||
<menuitem action='OpenVideo'/>
|
||||
<menuitem action='CloseVideo'/>
|
||||
|
||||
#endif
|
||||
<menu name='Export' action='Export'>
|
||||
<menuitem action='ExportAudio'/>
|
||||
<menuitem action='StemExport'/>
|
||||
|
@ -47,16 +48,16 @@
|
|||
<menuitem action='CleanupUnused'/>
|
||||
<menuitem action='FlushWastebasket'/>
|
||||
</menu>
|
||||
<separator/>
|
||||
<menuitem action='toggle-session-options-editor'/>
|
||||
#ifdef GTKOSX
|
||||
<menuitem action='toggle-about'/>
|
||||
<menuitem action='toggle-rc-options-editor'/>
|
||||
#endif
|
||||
#ifndef GTKOSX
|
||||
<separator/>
|
||||
#endif
|
||||
<menuitem action='toggle-session-options-editor'/>
|
||||
#ifdef GTKOSX
|
||||
<menuitem action='toggle-rc-options-editor'/>
|
||||
<menuitem action='toggle-about'/>
|
||||
#endif
|
||||
<separator/>
|
||||
<menuitem action='Quit'/>
|
||||
#endif
|
||||
</menu>
|
||||
|
||||
<menu name='Transport' action='Transport'>
|
||||
|
@ -281,7 +282,9 @@
|
|||
<menuitem action='snap-regions-to-grid'/>
|
||||
<menuitem action='toggle-region-lock'/>
|
||||
<menuitem action='toggle-region-lock-style'/>
|
||||
#ifndef GTKOSX
|
||||
<menuitem action='toggle-region-video-lock'/>
|
||||
#endif
|
||||
<menuitem action='set-region-sync-position'/>
|
||||
<menuitem action='remove-region-sync'/>
|
||||
<menuitem action='nudge-forward'/>
|
||||
|
@ -434,7 +437,9 @@
|
|||
<menuitem action="toggle-cd-marker-ruler"/>
|
||||
<menuitem action="toggle-marker-ruler"/>
|
||||
<separator/>
|
||||
#ifndef GTKOSX
|
||||
<menuitem action="toggle-video-ruler"/>
|
||||
#endif
|
||||
</menu>
|
||||
<menu action="VideoMonitorMenu">
|
||||
<menuitem action="zoom-vmon-100"/>
|
||||
|
@ -552,8 +557,10 @@
|
|||
<menuitem action="toggle-marker-ruler"/>
|
||||
<menuitem action="toggle-cd-marker-ruler"/>
|
||||
<menuitem action="toggle-loop-punch-ruler"/>
|
||||
<separator/>
|
||||
<menuitem action="toggle-video-ruler"/>
|
||||
#ifndef GTKOSX
|
||||
<separator/>
|
||||
<menuitem action="toggle-video-ruler"/>
|
||||
#endif
|
||||
</popup>
|
||||
|
||||
<popup name='ProcessorMenu'>
|
||||
|
@ -649,7 +656,9 @@
|
|||
<menuitem action='naturalize-region'/>
|
||||
<menuitem action='toggle-region-lock'/>
|
||||
<menuitem action='toggle-region-lock-style'/>
|
||||
#ifndef GTKOSX
|
||||
<menuitem action='toggle-region-video-lock'/>
|
||||
#endif
|
||||
<menuitem action='snap-regions-to-grid'/>
|
||||
<menuitem action='set-region-sync-position'/>
|
||||
<menuitem action='remove-region-sync'/>
|
||||
|
|
|
@ -319,7 +319,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
|
||||
TimeAxisViewItem::set_constant_heights ();
|
||||
|
||||
/* load up the UI manager */
|
||||
/* Set this up so that our window proxies can register actions */
|
||||
|
||||
ActionManager::init ();
|
||||
|
||||
|
@ -426,6 +426,8 @@ ARDOUR_UI::post_engine ()
|
|||
|
||||
_tooltips.enable();
|
||||
|
||||
ActionManager::load_menus ();
|
||||
|
||||
if (setup_windows ()) {
|
||||
throw failed_constructor ();
|
||||
}
|
||||
|
|
|
@ -573,7 +573,10 @@ ARDOUR_UI::use_menubar_as_top_menubar ()
|
|||
Gtk::Widget* widget;
|
||||
Application* app = Application::instance ();
|
||||
|
||||
/* Quit will be taken of separately */
|
||||
/* the addresses ("/ui/Main...") used below are based on the menu definitions in the menus file
|
||||
*/
|
||||
|
||||
/* Quit will be taken care of separately */
|
||||
|
||||
if ((widget = ActionManager::get_widget ("/ui/Main/Session/Quit"))) {
|
||||
widget->hide ();
|
||||
|
@ -585,13 +588,13 @@ ARDOUR_UI::use_menubar_as_top_menubar ()
|
|||
|
||||
GtkApplicationMenuGroup* group = app->add_app_menu_group ();
|
||||
|
||||
if ((widget = ActionManager::get_widget ("/ui/Windows/toggle-about"))) {
|
||||
if ((widget = ActionManager::get_widget ("/ui/Main/Session/toggle-about"))) {
|
||||
app->add_app_menu_item (group, dynamic_cast<MenuItem*>(widget));
|
||||
}
|
||||
}
|
||||
|
||||
if ((widget = ActionManager::get_widget ("/ui/Windows/toggle-rc-options-editor"))) {
|
||||
if ((widget = ActionManager::get_widget ("/ui/Main/Session/toggle-rc-options-editor"))) {
|
||||
app->add_app_menu_item (group, dynamic_cast<MenuItem*>(widget));
|
||||
}
|
||||
}
|
||||
|
||||
app->set_menu_bar (*menu_bar);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue