*/
+/* Note: public Editor methods are documented in public_editor.h */
+
#include <unistd.h>
#include <cstdlib>
#include <cmath>
#include "i18n.h"
-/* <CMT Additions> */
+#ifdef WITH_CMT
#include "imageframe_socket_handler.h"
-/* </CMT Additions> */
+#endif
using namespace std;
using namespace sigc;
N_("Left"),
N_("Right"),
N_("Center"),
- N_("Playhead"),
- N_("Edit Cursor"),
+ N_("Play"),
+ N_("Edit"),
0
};
automation_mode_button (_("mode")),
global_automation_button (_("automation")),
- /* <CMT Additions> */
+#ifdef WITH_CMT
image_socket_listener(0),
- /* </CMT Additions> */
+#endif
/* nudge */
_dragging_playhead = false;
_dragging_hscrollbar = false;
- location_marker_color = color_map[cLocationMarker];
- location_range_color = color_map[cLocationRange];
- location_cd_marker_color = color_map[cLocationCDMarker];
- location_loop_color = color_map[cLocationLoop];
- location_punch_color = color_map[cLocationPunch];
+ location_marker_color = Config->canvasvar_LocationMarker.get();
+ location_range_color = Config->canvasvar_LocationRange.get();
+ location_cd_marker_color = Config->canvasvar_LocationCDMarker.get();
+ location_loop_color = Config->canvasvar_LocationLoop.get();
+ location_punch_color = Config->canvasvar_LocationPunch.get();
range_marker_drag_rect = 0;
marker_drag_line = 0;
edit_packer.attach (edit_vscrollbar, 3, 4, 1, 2, FILL, FILL|EXPAND, 0, 0);
edit_packer.attach (time_button_frame, 0, 2, 0, 1, FILL, FILL, 0, 0);
- edit_packer.attach (time_canvas_event_box, 2, 3, 0, 1, FILL|EXPAND, FILL, 0, 0);
+ edit_packer.attach (time_canvas_event_box, 2, 4, 0, 1, FILL|EXPAND, FILL, 0, 0);
edit_packer.attach (controls_layout, 1, 2, 1, 2, FILL, FILL|EXPAND, 0, 0);
edit_packer.attach (track_canvas_event_box, 2, 3, 1, 2, FILL|EXPAND, FILL|EXPAND, 0, 0);
nlabel = manage (new Label (_("Regions")));
nlabel->set_angle (-90);
- the_notebook.append_page (region_list_scroller, *nlabel);
+ the_notebook.append_page (region_list_scroller, *nlabel);
nlabel = manage (new Label (_("Tracks/Busses")));
nlabel->set_angle (-90);
- the_notebook.append_page (route_list_scroller, *nlabel);
+ the_notebook.append_page (route_list_scroller, *nlabel);
nlabel = manage (new Label (_("Snapshots")));
nlabel->set_angle (-90);
the_notebook.append_page (snapshot_display_scroller, *nlabel);
Editor::~Editor()
{
- /* <CMT Additions> */
+#ifdef WITH_CMT
if(image_socket_listener)
{
if(image_socket_listener->is_connected())
delete image_socket_listener ;
image_socket_listener = 0 ;
}
- /* </CMT Additions> */
+#endif
}
void
{
show_all ();
present ();
+
+ /* re-hide editor list if necessary */
+ editor_list_button_toggled ();
/* now reset all audio_time_axis heights, because widgets might need
to be re-hidden
}
if (session) {
- session->add_instant_xml(get_state(), session->path());
+ session->add_instant_xml(get_state());
} else {
- Config->add_instant_xml(get_state(), get_user_ardour_path());
+ Config->add_instant_xml(get_state());
}
}
items.push_back (MenuElem (_("Lock"), bind (mem_fun (*this, &Editor::set_region_lock), true)));
items.push_back (MenuElem (_("Unlock"), bind (mem_fun (*this, &Editor::set_region_lock), false)));
+ items.push_back (MenuElem (_("Lock Position"), bind (mem_fun (*this, &Editor::set_region_position_lock), true)));
+ items.push_back (MenuElem (_("Unlock Position"), bind (mem_fun (*this, &Editor::set_region_position_lock), false)));
items.push_back (MenuElem (_("Mute"), bind (mem_fun (*this, &Editor::set_region_mute), true)));
items.push_back (MenuElem (_("Unmute"), bind (mem_fun (*this, &Editor::set_region_mute), false)));
items.push_back (MenuElem (_("Opaque"), bind (mem_fun (*this, &Editor::set_region_opaque), true)));
items.push_back (MenuElem (_("Transparent"), bind (mem_fun (*this, &Editor::set_region_opaque), false)));
/* We allow "Original position" if at least one region is not at its
- natural position */
+ natural position
+ */
RegionSelection::iterator i = selection->regions.begin();
while (i != selection->regions.end() && (*i)->region()->at_natural_position() == true) {
++i;
tact->set_active (yn);
}
}
+
+ if ((prop = node.property ("show-editor-list"))) {
+
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-list"));
+ assert(act);
+ if (act) {
+
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ bool yn = (prop->value() == X_("yes"));
+
+ /* do it twice to force the change */
+
+ tact->set_active (!yn);
+ tact->set_active (yn);
+ }
+ }
return 0;
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
node->add_property (X_("show-editor-mixer"), tact->get_active() ? "yes" : "no");
}
+
+ act = ActionManager::get_action (X_("Editor"), X_("show-editor-list"));
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ node->add_property (X_("show-editor-list"), tact->get_active() ? "yes" : "no");
+ }
return *node;
}
}
void
-Editor::snap_to (nframes_t& start, int32_t direction, bool for_mark)
+Editor::snap_to (nframes64_t& start, int32_t direction, bool for_mark)
{
Location* before = 0;
Location* after = 0;
return;
}
- const nframes_t one_second = session->frame_rate();
- const nframes_t one_minute = session->frame_rate() * 60;
- const nframes_t one_smpte_second = (nframes_t)(rint(session->smpte_frames_per_second()) * session->frames_per_smpte_frame());
- nframes_t one_smpte_minute = (nframes_t)(rint(session->smpte_frames_per_second()) * session->frames_per_smpte_frame() * 60);
- nframes_t presnap = start;
+ const nframes64_t one_second = session->frame_rate();
+ const nframes64_t one_minute = session->frame_rate() * 60;
+ const nframes64_t one_smpte_second = (nframes64_t)(rint(session->smpte_frames_per_second()) * session->frames_per_smpte_frame());
+ nframes64_t one_smpte_minute = (nframes64_t)(rint(session->smpte_frames_per_second()) * session->frames_per_smpte_frame() * 60);
+ nframes64_t presnap = start;
switch (snap_type) {
case SnapToFrame:
ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_full_button, _("Zoom to Session"));
zoom_focus_selector.set_name ("ZoomFocusSelector");
- Gtkmm2ext::set_size_request_to_display_given_text (zoom_focus_selector, "Edit Cursor", FUDGE, 0);
+ Gtkmm2ext::set_size_request_to_display_given_text (zoom_focus_selector, "Center", FUDGE, 0);
set_popdown_strings (zoom_focus_selector, zoom_focus_strings);
zoom_focus_selector.signal_changed().connect (mem_fun(*this, &Editor::zoom_focus_selection_done));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_focus_selector, _("Zoom focus"));
focus_type = ZoomFocusRight;
} else if (choice == _("Center")) {
focus_type = ZoomFocusCenter;
- } else if (choice == _("Playhead")) {
+ } else if (choice == _("Play")) {
focus_type = ZoomFocusPlayhead;
- } else if (choice == _("Edit Cursor")) {
+ } else if (choice == _("Edit")) {
focus_type = ZoomFocusEdit;
}
return edit_cursor->current_frame;
}
+