#include "gtkmm2ext/utils.h"
#include "gtkmm2ext/window_title.h"
#include "gtkmm2ext/tearoff.h"
+#include "gtkmm2ext/cairo_packer.h"
#include "pbd/file_utils.h"
#include "pbd/fpu.h"
#include "utils.h"
#include "window_proxy.h"
#include "global_port_matrix.h"
+#include "location_ui.h"
#include <gtkmm2ext/application.h>
ARDOUR_UI::install_actions ()
{
Glib::RefPtr<ActionGroup> main_actions = ActionGroup::create (X_("Main"));
+ Glib::RefPtr<ActionGroup> main_menu_actions = ActionGroup::create (X_("Main_menu"));
Glib::RefPtr<Action> act;
/* menus + submenus that need action items */
- ActionManager::register_action (main_actions, X_("Session"), _("Session"));
- act = ActionManager::register_action (main_actions, X_("Cleanup"), _("Clean-up"));
+ ActionManager::register_action (main_menu_actions, X_("Session"), _("Session"));
+ act = ActionManager::register_action (main_menu_actions, X_("Cleanup"), _("Clean-up"));
ActionManager::write_sensitive_actions.push_back (act);
- ActionManager::register_action (main_actions, X_("Sync"), _("Sync"));
- ActionManager::register_action (main_actions, X_("TransportOptions"), _("Options"));
- ActionManager::register_action (main_actions, X_("Help"), _("Help"));
- ActionManager::register_action (main_actions, X_("KeyMouseActions"), _("Misc. Shortcuts"));
- ActionManager::register_action (main_actions, X_("AudioFileFormat"), _("Audio File Format"));
- ActionManager::register_action (main_actions, X_("AudioFileFormatHeader"), _("File Type"));
- ActionManager::register_action (main_actions, X_("AudioFileFormatData"), _("Sample Format"));
- ActionManager::register_action (main_actions, X_("ControlSurfaces"), _("Control Surfaces"));
- ActionManager::register_action (main_actions, X_("Plugins"), _("Plugins"));
- ActionManager::register_action (main_actions, X_("Metering"), _("Metering"));
- ActionManager::register_action (main_actions, X_("MeteringFallOffRate"), _("Fall Off Rate"));
- ActionManager::register_action (main_actions, X_("MeteringHoldTime"), _("Hold Time"));
- ActionManager::register_action (main_actions, X_("Denormals"), _("Denormal Handling"));
+ ActionManager::register_action (main_menu_actions, X_("Sync"), _("Sync"));
+ ActionManager::register_action (main_menu_actions, X_("TransportOptions"), _("Options"));
+ ActionManager::register_action (main_menu_actions, X_("WindowMenu"), _("Window"));
+ ActionManager::register_action (main_menu_actions, X_("Help"), _("Help"));
+ ActionManager::register_action (main_menu_actions, X_("KeyMouseActions"), _("Misc. Shortcuts"));
+ ActionManager::register_action (main_menu_actions, X_("AudioFileFormat"), _("Audio File Format"));
+ ActionManager::register_action (main_menu_actions, X_("AudioFileFormatHeader"), _("File Type"));
+ ActionManager::register_action (main_menu_actions, X_("AudioFileFormatData"), _("Sample Format"));
+ ActionManager::register_action (main_menu_actions, X_("ControlSurfaces"), _("Control Surfaces"));
+ ActionManager::register_action (main_menu_actions, X_("Plugins"), _("Plugins"));
+ ActionManager::register_action (main_menu_actions, X_("Metering"), _("Metering"));
+ ActionManager::register_action (main_menu_actions, X_("MeteringFallOffRate"), _("Fall Off Rate"));
+ ActionManager::register_action (main_menu_actions, X_("MeteringHoldTime"), _("Hold Time"));
+ ActionManager::register_action (main_menu_actions, X_("Denormals"), _("Denormal Handling"));
/* the real actions */
/* these actions are intended to be shared across all windows */
common_actions = ActionGroup::create (X_("Common"));
- ActionManager::register_action (main_actions, X_("WindowMenu"), _("Window"));
ActionManager::register_action (common_actions, X_("Quit"), _("Quit"), (hide_return (sigc::mem_fun(*this, &ARDOUR_UI::finish))));
/* windows visibility actions */
act = ActionManager::register_toggle_action (common_actions, X_("KeepTearoffs"), _("Toolbars when Maximised"), mem_fun (*this, &ARDOUR_UI::toggle_keep_tearoffs));
ActionManager::session_sensitive_actions.push_back (act);
- ActionManager::register_toggle_action (common_actions, X_("toggle-mixer"), _("Mixer"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_mixer_window));
+ ActionManager::register_toggle_action (common_actions, X_("toggle-mixer"), S_("Window|Mixer"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_mixer_window));
ActionManager::register_toggle_action (common_actions, X_("toggle-mixer-on-top"), _("Mixer on Top"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_mixer_on_top));
ActionManager::register_toggle_action (common_actions, X_("ToggleRCOptionsEditor"), _("Preferences"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_rc_options_window));
ActionManager::register_toggle_action (common_actions, X_("ToggleSessionOptionsEditor"), _("Properties"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_session_options_window));
act = ActionManager::register_action (common_actions, X_("Save"), _("Save"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::save_state), string(""), false));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::write_sensitive_actions.push_back (act);
- act = ActionManager::register_action (common_actions, X_("RemoveLastCapture"), _("Remove Last Capture"), sigc::mem_fun(*this, &ARDOUR_UI::remove_last_capture));
- ActionManager::session_sensitive_actions.push_back (act);
Glib::RefPtr<ActionGroup> transport_actions = ActionGroup::create (X_("Transport"));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::transport_sensitive_actions.push_back (act);
+ act = ActionManager::register_toggle_action (transport_actions, X_("AlwaysPlayRange"), _("Always Play Range"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_always_play_range));
+ ActionManager::session_sensitive_actions.push_back (act);
+ ActionManager::transport_sensitive_actions.push_back (act);
+
act = ActionManager::register_action (transport_actions, X_("ToggleRoll"), _("Start/Stop"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::toggle_roll), false, false));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::transport_sensitive_actions.push_back (act);
ActionManager::add_action_group (jack_actions);
ActionManager::add_action_group (transport_actions);
ActionManager::add_action_group (main_actions);
+ ActionManager::add_action_group (main_menu_actions);
ActionManager::add_action_group (common_actions);
ActionManager::add_action_group (midi_actions);
}
EventBox* ev = manage (new EventBox);
ev->show ();
- HBox* hbox = manage (new HBox);
+ CairoHPacker* hbox = manage (new CairoHPacker);
hbox->show ();
-
- ev->add (*hbox);
+ hbox->set_border_width (3);
- wall_clock_box.add (wall_clock_label);
- wall_clock_box.set_name ("WallClock");
- wall_clock_label.set_name ("WallClock");
+ VBox* vbox = manage (new VBox);
+ vbox->pack_start (*hbox, true, false);
+ vbox->show();
+
+ ev->add (*vbox);
- disk_space_box.add (disk_space_label);
- disk_space_box.set_name ("WallClock");
+ wall_clock_label.set_name ("WallClock");
+ wall_clock_label.set_use_markup ();
disk_space_label.set_name ("WallClock");
disk_space_label.set_use_markup ();
-
- cpu_load_box.add (cpu_load_label);
- cpu_load_box.set_name ("CPULoad");
cpu_load_label.set_name ("CPULoad");
cpu_load_label.set_use_markup ();
-
- buffer_load_box.add (buffer_load_label);
- buffer_load_box.set_name ("BufferLoad");
buffer_load_label.set_name ("BufferLoad");
buffer_load_label.set_use_markup ();
-
- sample_rate_box.add (sample_rate_label);
- sample_rate_box.set_name ("SampleRate");
sample_rate_label.set_name ("SampleRate");
sample_rate_label.set_use_markup ();
-
- format_box.add (format_label);
- format_box.set_name ("Format");
format_label.set_name ("Format");
format_label.set_use_markup ();
disk_space = true;
}
- hbox->pack_end (wall_clock_box, false, false, 2);
- hbox->pack_end (disk_space_box, false, false, 4);
- hbox->pack_end (cpu_load_box, false, false, 4);
- hbox->pack_end (buffer_load_box, false, false, 4);
- hbox->pack_end (sample_rate_box, false, false, 4);
- hbox->pack_end (format_box, false, false, 4);
+ hbox->pack_end (wall_clock_label, false, false, 2);
+ hbox->pack_end (disk_space_label, false, false, 4);
+ hbox->pack_end (cpu_load_label, false, false, 4);
+ hbox->pack_end (buffer_load_label, false, false, 4);
+ hbox->pack_end (sample_rate_label, false, false, 4);
+ hbox->pack_end (format_label, false, false, 4);
- menu_hbox.pack_end (*ev, false, false);
+ menu_hbox.pack_end (*ev, false, false, 6);
menu_bar_base.set_name ("MainMenuBar");
menu_bar_base.add (menu_hbox);
- _status_bar_visibility.add (&wall_clock_box, X_("WallClock"), _("Wall Clock"), wall_clock);
- _status_bar_visibility.add (&disk_space_box, X_("Disk"), _("Disk Space"), disk_space);
- _status_bar_visibility.add (&cpu_load_box, X_("DSP"), _("DSP"), true);
- _status_bar_visibility.add (&buffer_load_box, X_("Buffers"), _("Buffers"), true);
- _status_bar_visibility.add (&sample_rate_box, X_("JACK"), _("JACK Sampling Rate and Latency"), true);
- _status_bar_visibility.add (&format_box, X_("Format"), _("File Format"), true);
+ _status_bar_visibility.add (&wall_clock_label, X_("WallClock"), _("Wall Clock"), wall_clock);
+ _status_bar_visibility.add (&disk_space_label, X_("Disk"), _("Disk Space"), disk_space);
+ _status_bar_visibility.add (&cpu_load_label, X_("DSP"), _("DSP"), true);
+ _status_bar_visibility.add (&buffer_load_label, X_("Buffers"), _("Buffers"), true);
+ _status_bar_visibility.add (&sample_rate_label, X_("JACK"), _("JACK Sampling Rate and Latency"), true);
+ _status_bar_visibility.add (&format_label, X_("Format"), _("File Format"), true);
ev->signal_button_press_event().connect (sigc::mem_fun (_status_bar_visibility, &VisibilityGroup::button_press_event));
}
}
void
-ARDOUR_UI::big_clock_size_allocate (Gtk::Allocation& alloc)
+ARDOUR_UI::big_clock_size_allocate (Gtk::Allocation&)
{
if (!big_clock_resize_in_progress) {
Glib::signal_idle().connect (sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::idle_big_clock_text_resizer), 0, 0));
if (_session) {
_session->add_instant_xml (enode);
_session->add_instant_xml (mnode);
+ if (location_ui->get ()) {
+ _session->add_instant_xml (location_ui->get()->ui().get_state ());
+ }
} else {
Config->add_instant_xml (enode);
Config->add_instant_xml (mnode);
+ if (location_ui->get ()) {
+ Config->add_instant_xml (location_ui->get()->ui().get_state ());
+ }
}
Keyboard::save_keybindings ();