session_name = basename_nosuffix (string (predetermined_path));
+ cerr << "set name to " << session_name << " path to " << session_path << endl;
+
new_session_dialog->set_session_name (session_name);
new_session_dialog->set_session_folder (session_path);
new_session_dialog->set_modal (true);
if (session_name[0] == '/' ||
(session_name.length() > 2 && session_name[0] == '.' && session_name[1] == '/') ||
(session_name.length() > 3 && session_name[0] == '.' && session_name[1] == '.' && session_name[2] == '/')) {
+
+ cerr << "A\n";
+
if (load_session (Glib::path_get_dirname (session_name), session_name)) {
response = Gtk::RESPONSE_NONE;
goto try_again;
} else {
session_path = new_session_dialog->session_folder();
+ cerr << "B\n";
if (load_session (session_path, session_name)) {
response = Gtk::RESPONSE_NONE;
goto try_again;
if (!should_be_new) {
+ cerr << "C\n";
if (load_session (session_path, session_name)) {
response = Gtk::RESPONSE_NONE;
goto try_again;
new_session_dialog->hide ();
goto_editor_window ();
flush_pending ();
+ cerr << "D\n";
if (load_session (session_path, session_name)) {
response = Gtk::RESPONSE_NONE;
goto try_again;
goto_editor_window ();
flush_pending ();
+ cerr << "F\n";
if (load_session (session_path, session_name, template_name)) {
response = Gtk::RESPONSE_NONE;
goto try_again;
int unload_status;
int retval = -1;
+ cerr << "load session with path = " << path << " name = " << snap_name << endl;
+
session_loaded = false;
if (!check_audioengine()) {
}
}
-void
-Editor::tie_vertical_scrolling ()
-{
- double y1 = vertical_adjustment.get_value();
-
- playhead_cursor->set_y_axis (y1);
- if (logo_item) {
- logo_item->property_y() = y1;
- }
-
- controls_layout.get_vadjustment()->set_value (y1);
-}
-
void
Editor::instant_save ()
{
reset_scrolling_region ();
if (playhead_cursor) playhead_cursor->set_length (canvas_height);
+
+ double y1 = vertical_adjustment.get_value ();
for (MarkerSelection::iterator x = selection->markers.begin(); x != selection->markers.end(); ++x) {
- (*x)->set_line_length (full_canvas_height);
+ (*x)->set_line_vpos (y1, canvas_height);
}
- range_marker_drag_rect->property_y2() = full_canvas_height;
- transport_loop_range_rect->property_y2() = full_canvas_height;
- transport_punch_range_rect->property_y2() = full_canvas_height;
- transport_punchin_line->property_y2() = full_canvas_height;
- transport_punchout_line->property_y2() = full_canvas_height;
+ range_marker_drag_rect->property_y1() = y1;
+ range_marker_drag_rect->property_y2() = y1 + canvas_height;
+ transport_loop_range_rect->property_y1() = y1;
+ transport_loop_range_rect->property_y2() = y1 + canvas_height;
+ transport_punch_range_rect->property_y1() = y1;
+ transport_punch_range_rect->property_y2() = y1 + canvas_height;
+ transport_punchin_line->property_y1() = y1;
+ transport_punchin_line->property_y2() = y1 + canvas_height;
+ transport_punchout_line->property_y1() = y1;
+ transport_punchout_line->property_y2() = y1 + canvas_height;
update_fixed_rulers();
redisplay_tempo (true);
- if (logo_item) {
- // logo_item->property_height() = full_canvas_height;
- // logo_item->property_width() = canvas_width;
- }
-
Resized (); /* EMIT_SIGNAL */
return false;
return FALSE;
}
+void
+Editor::tie_vertical_scrolling ()
+{
+ double y1 = vertical_adjustment.get_value();
+
+ playhead_cursor->set_y_axis (y1);
+
+ range_marker_drag_rect->property_y1() = y1;
+ range_marker_drag_rect->property_y2() = y1 + canvas_height;
+ transport_loop_range_rect->property_y1() = y1;
+ transport_loop_range_rect->property_y2() = y1 + canvas_height;
+ transport_punch_range_rect->property_y1() = y1;
+ transport_punch_range_rect->property_y2() = y1 + canvas_height;
+ transport_punchin_line->property_y1() = y1;
+ transport_punchin_line->property_y2() = y1 + canvas_height;
+ transport_punchout_line->property_y1() = y1;
+ transport_punchout_line->property_y2() = y1 + canvas_height;
+
+ if (!selection->markers.empty()) {
+ for (MarkerSelection::iterator x = selection->markers.begin(); x != selection->markers.end(); ++x) {
+ (*x)->set_line_vpos (y1, canvas_height);
+ }
+ }
+
+ if (logo_item) {
+ logo_item->property_y() = y1;
+ }
+
+ /* this will do an immediate redraw */
+
+ controls_layout.get_vadjustment()->set_value (y1);
+}
void
Editor::canvas_horizontally_scrolled ()
}
for (MarkerSelection::iterator x = selection->markers.begin(); x != selection->markers.end(); ++x) {
- (*x)->add_line (cursor_group, full_canvas_height);
+ (*x)->add_line (cursor_group, canvas_height);
(*x)->show_line ();
}
#include "utils.h"
#include "canvas_impl.h"
#include "ardour_ui.h"
+#include "simpleline.h"
#include "i18n.h"
}
line = 0;
- line_points = 0;
}
if (line) {
delete line;
- delete line_points;
}
}
_parent = &parent;
}
+
void
-Marker::set_line_length (double len)
+Marker::set_line_vpos (double pos, double height)
{
if (line) {
- line_points->back().set_y (len);
- line->property_points() = *line_points;
+ line->property_y1() = pos;
+ line->property_y2() = pos + height;
}
}
{
if (!line) {
- line_points = new ArdourCanvas::Points ();
- line_points->push_back (Gnome::Art::Point (unit_position + shift, 0.0));
- line_points->push_back (Gnome::Art::Point (unit_position + shift, initial_height));
-
- line = new ArdourCanvas::Line (*group);
- line->property_width_pixels() = 1;
- line->property_points() = *line_points;
- line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_EditPoint.get();
-#if 0
- line->property_first_arrowhead() = TRUE;
- line->property_last_arrowhead() = TRUE;
- line->property_arrow_shape_a() = 11.0;
- line->property_arrow_shape_b() = 0.0;
- line->property_arrow_shape_c() = 9.0;
-#endif
+ line = new ArdourCanvas::SimpleLine (*group);
+ line->property_color_rgba() = ARDOUR_UI::config()->canvasvar_EditPoint.get();
+ line->property_x1() = unit_position + shift;
+ line->property_y1() = 0.0;
+ line->property_x2() = unit_position + shift;
+ line->property_y2() = initial_height;
+
line->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
}
unit_position = new_unit_position;
if (line) {
- (*line_points)[0].set_x (unit_position + shift);
- (*line_points)[1].set_x (unit_position + shift);
- line->property_points() = *line_points;
+ line->property_x1() = unit_position + shift;
+ line->property_x2() = unit_position + shift;
}
}
void add_line (ArdourCanvas::Group*, double initial_height);
void show_line ();
void hide_line ();
- void set_line_length (double);
+ void set_line_vpos (double y_origin, double height);
void set_position (nframes_t);
void set_name (const string&);
ArdourCanvas::Polygon *mark;
ArdourCanvas::Text *text;
ArdourCanvas::Points *points;
- ArdourCanvas::Line *line;
+ ArdourCanvas::SimpleLine *line;
ArdourCanvas::Points *line_points;
double unit_position;
#else
if (!Glib::file_test (dir, Glib::FILE_TEST_IS_DIR)) {
realdir = Glib::path_get_dirname (realdir);
+ cerr << "didn't exist, use " << realdir << endl;
}
if ((res = canonicalize_file_name (realdir.c_str())) != 0) {
+ cerr << "canonical, use " << res << endl;
m_folder->set_current_folder (res);
free (res);
}
case NewPage:
return Glib::filename_from_utf8(m_folder->get_filename());
+ case EnginePage:
+ if (page_set == EnginePage) {
+ /* just engine page, nothing else : use m_folder since it should be set */
+ return Glib::filename_from_utf8(m_folder->get_filename());
+ }
+ break;
+
default:
break;
}