"finalmunge" patch from nick, plus work on editor region list and actions infrastructure from me
git-svn-id: svn://localhost/trunk/ardour2@52 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4c50965622
commit
c38fdbc64c
|
@ -157,6 +157,10 @@ regionview.cc
|
|||
route_params_ui.cc
|
||||
""")
|
||||
|
||||
mtest_files=Split("""
|
||||
mtest.cc
|
||||
""")
|
||||
|
||||
extra_sources = []
|
||||
vst_files = [ 'vst_pluginui.cc' ]
|
||||
|
||||
|
@ -176,6 +180,7 @@ gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
|
|||
executable = 'ardour.bin'
|
||||
|
||||
ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
|
||||
mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
|
||||
|
||||
Default(ardour)
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include "ardour_ui.h"
|
||||
#include "public_editor.h"
|
||||
#include "audio_clock.h"
|
||||
#include "extra_bind.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
@ -102,7 +101,7 @@ ARDOUR_UI::setup_adjustables ()
|
|||
online_control_button = new GlobalClickBox ("CONTROL",
|
||||
online_control_strings);
|
||||
|
||||
online_control_button->adjustment.value_changed.connect(mem_fun(*this,&ARDOUR_UI::control_methods_adjusted));
|
||||
online_control_button->adjustment.signal_value_changed().connect(mem_fun(*this,&ARDOUR_UI::control_methods_adjusted));
|
||||
|
||||
mmc_id_strings.push_back ("1");
|
||||
mmc_id_strings.push_back ("2");
|
||||
|
@ -116,10 +115,10 @@ ARDOUR_UI::setup_adjustables ()
|
|||
|
||||
mmc_id_button = new GlobalClickBox (_("MMC ID"), mmc_id_strings);
|
||||
|
||||
mmc_id_button->adjustment.value_changed.connect (mem_fun(*this,&ARDOUR_UI::mmc_device_id_adjusted));
|
||||
mmc_id_button->adjustment.signal_value_changed().connect (mem_fun(*this,&ARDOUR_UI::mmc_device_id_adjusted));
|
||||
|
||||
adjuster_table.attach (*online_control_button, 0, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, 0, 5, 5);
|
||||
adjuster_table.attach (*mmc_id_button, 2, 3, 1, 2, 0, 0, 5, 5);
|
||||
adjuster_table.attach (*online_control_button, 0, 2, 1, 2, FILL|EXPAND, FILL, 5, 5);
|
||||
adjuster_table.attach (*mmc_id_button, 2, 3, 1, 2, FILL, FILL, 5, 5);
|
||||
}
|
||||
|
||||
#include "transport_xpms"
|
||||
|
@ -204,13 +203,14 @@ ARDOUR_UI::setup_transport ()
|
|||
static_cast<Gtk::Widget*> (&transport_frame), 1));
|
||||
|
||||
|
||||
goto_start_button.add (*(manage (new Gtk::Image (start_xpm))));
|
||||
goto_end_button.add (*(manage (new Gtk::Image (end_xpm))));
|
||||
roll_button.add (*(manage (new Gtk::Image (arrow_xpm))));
|
||||
stop_button.add (*(manage (new Gtk::Image (stop_xpm))));
|
||||
play_selection_button.add (*(manage (new Gtk::Image (play_selection_xpm))));
|
||||
rec_button.add (*(manage (new Gtk::Image (rec_xpm))));
|
||||
auto_loop_button.add (*(manage (new Gtk::Image (loop_xpm))));
|
||||
goto_start_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(start_xpm)))));
|
||||
goto_end_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(end_xpm)))));
|
||||
roll_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(arrow_xpm)))));
|
||||
|
||||
stop_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(stop_xpm)))));
|
||||
play_selection_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(play_selection_xpm)))));
|
||||
rec_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(rec_xpm)))));
|
||||
auto_loop_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(loop_xpm)))));
|
||||
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (roll_button, _("Play from playhead"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (stop_button, _("Stop playback"));
|
||||
|
@ -230,8 +230,8 @@ ARDOUR_UI::setup_transport ()
|
|||
ARDOUR_UI::instance()->tooltips().set_tip (shuttle_style_button, _("Select sprung or wheel behaviour"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (speed_display_box, _("Current transport speed"));
|
||||
|
||||
shuttle_box.set_flags (Gtk::CAN_FOCUS);
|
||||
shuttle_box.signal_set_event()s (shuttle_box.signal_get_event()s() | GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::POINTER_MOTION_MASK);
|
||||
shuttle_box.set_flags (CAN_FOCUS);
|
||||
shuttle_box.set_events (shuttle_box.get_events() | Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::POINTER_MOTION_MASK);
|
||||
shuttle_box.set_size_request (100, 15);
|
||||
|
||||
shuttle_box.set_name ("TransportButton");
|
||||
|
@ -265,20 +265,20 @@ ARDOUR_UI::setup_transport ()
|
|||
click_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
follow_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
|
||||
goto_start_button.signal_set_event()s (goto_start_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
goto_end_button.signal_set_event()s (goto_end_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
roll_button.signal_set_event()s (roll_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
stop_button.signal_set_event()s (stop_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
play_selection_button.signal_set_event()s (play_selection_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
rec_button.signal_set_event()s (rec_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
auto_loop_button.signal_set_event()s (auto_loop_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
auto_return_button.signal_set_event()s (auto_return_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
auto_play_button.signal_set_event()s (auto_play_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
auto_input_button.signal_set_event()s (auto_input_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
click_button.signal_set_event()s (click_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
follow_button.signal_set_event()s (click_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
punch_in_button.signal_set_event()s (punch_in_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
punch_out_button.signal_set_event()s (punch_out_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
goto_start_button.set_events (goto_start_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
goto_end_button.set_events (goto_end_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
roll_button.set_events (roll_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
stop_button.set_events (stop_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
play_selection_button.set_events (play_selection_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
rec_button.set_events (rec_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
auto_loop_button.set_events (auto_loop_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
auto_return_button.set_events (auto_return_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
auto_play_button.set_events (auto_play_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
auto_input_button.set_events (auto_input_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
click_button.set_events (click_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
follow_button.set_events (click_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
punch_in_button.set_events (punch_in_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
punch_out_button.set_events (punch_out_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
|
||||
goto_start_button.signal_clicked().connect (mem_fun(*this,&ARDOUR_UI::transport_goto_start));
|
||||
goto_end_button.signal_clicked().connect (mem_fun(*this,&ARDOUR_UI::transport_goto_end));
|
||||
|
@ -314,20 +314,20 @@ ARDOUR_UI::setup_transport ()
|
|||
|
||||
/* options */
|
||||
|
||||
auto_return_button.toggled.connect (mem_fun(*this,&ARDOUR_UI::toggle_auto_return));
|
||||
auto_play_button.toggled.connect (mem_fun(*this,&ARDOUR_UI::toggle_auto_play));
|
||||
auto_input_button.toggled.connect (mem_fun(*this,&ARDOUR_UI::toggle_auto_input));
|
||||
click_button.toggled.connect (mem_fun(*this,&ARDOUR_UI::toggle_click));
|
||||
follow_button.toggled.connect (mem_fun(*this,&ARDOUR_UI::toggle_follow));
|
||||
punch_in_button.toggled.connect (mem_fun(*this,&ARDOUR_UI::toggle_punch_in));
|
||||
punch_out_button.toggled.connect (mem_fun(*this,&ARDOUR_UI::toggle_punch_out));
|
||||
auto_return_button.signal_toggled().connect (mem_fun(*this,&ARDOUR_UI::toggle_auto_return));
|
||||
auto_play_button.signal_toggled().connect (mem_fun(*this,&ARDOUR_UI::toggle_auto_play));
|
||||
auto_input_button.signal_toggled().connect (mem_fun(*this,&ARDOUR_UI::toggle_auto_input));
|
||||
click_button.signal_toggled().connect (mem_fun(*this,&ARDOUR_UI::toggle_click));
|
||||
follow_button.signal_toggled().connect (mem_fun(*this,&ARDOUR_UI::toggle_follow));
|
||||
punch_in_button.signal_toggled().connect (mem_fun(*this,&ARDOUR_UI::toggle_punch_in));
|
||||
punch_out_button.signal_toggled().connect (mem_fun(*this,&ARDOUR_UI::toggle_punch_out));
|
||||
|
||||
preroll_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
preroll_button.signal_set_event()s (preroll_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
preroll_button.set_events (preroll_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
preroll_button.set_name ("TransportButton");
|
||||
|
||||
postroll_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
postroll_button.signal_set_event()s (postroll_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
postroll_button.set_events (postroll_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
postroll_button.set_name ("TransportButton");
|
||||
|
||||
preroll_clock.set_mode (AudioClock::MinSec);
|
||||
|
@ -340,9 +340,9 @@ ARDOUR_UI::setup_transport ()
|
|||
/* CANNOT bind these to clicked or toggled, must use pressed or released */
|
||||
|
||||
solo_alert_button.set_name ("TransportSoloAlert");
|
||||
solo_alert_button.pressed.connect (mem_fun(*this,&ARDOUR_UI::solo_alert_toggle));
|
||||
solo_alert_button.signal_pressed().connect (mem_fun(*this,&ARDOUR_UI::solo_alert_toggle));
|
||||
auditioning_alert_button.set_name ("TransportAuditioningAlert");
|
||||
auditioning_alert_button.pressed.connect (mem_fun(*this,&ARDOUR_UI::audition_alert_toggle));
|
||||
auditioning_alert_button.signal_pressed().connect (mem_fun(*this,&ARDOUR_UI::audition_alert_toggle));
|
||||
|
||||
alert_box.pack_start (solo_alert_button);
|
||||
alert_box.pack_start (auditioning_alert_button);
|
||||
|
@ -430,8 +430,8 @@ ARDOUR_UI::setup_clock ()
|
|||
big_clock_window->add (big_clock);
|
||||
big_clock_window->set_title (_("ardour: clock"));
|
||||
|
||||
big_clock_window->signal_delete_event().connect (bind (ptr_fun (just_hide_it), static_cast<Gtk::Window*>(big_clock_window)));
|
||||
big_clock_window->realize.connect (mem_fun(*this, &ARDOUR_UI::big_clock_realize));
|
||||
big_clock_window->signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), static_cast<Gtk::Window*>(big_clock_window)));
|
||||
big_clock_window->signal_realize().connect (mem_fun(*this, &ARDOUR_UI::big_clock_realize));
|
||||
big_clock_window->size_allocate.connect (mem_fun(*this, &ARDOUR_UI::big_clock_size_event));
|
||||
|
||||
big_clock_window->Hiding.connect (mem_fun(*this, &ARDOUR_UI::big_clock_hiding));
|
||||
|
@ -446,7 +446,7 @@ ARDOUR_UI::big_clock_size_event (GtkAllocation *alloc)
|
|||
void
|
||||
ARDOUR_UI::big_clock_realize ()
|
||||
{
|
||||
big_clock_window->get_window().set_decorations (GdkWMDecoration (GDK_DECOR_BORDER|GDK_DECOR_RESIZEH|GDK_DECOR_MAXIMIZE|GDK_DECOR_MINIMIZE));
|
||||
big_clock_window->get_window()->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH|Gdk::DECOR_MAXIMIZE|Gdk::DECOR_MINIMIZE));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -511,7 +511,7 @@ ARDOUR_UI::solo_blink (bool onoff)
|
|||
|
||||
if (session->soloing()) {
|
||||
if (onoff) {
|
||||
solo_alert_button.set_state (GTK_STATE_ACTIVE);
|
||||
solo_alert_button.set_state (Gtk::STATE_ACTIVE);
|
||||
} else {
|
||||
solo_alert_button.set_state (Gtk::STATE_NORMAL);
|
||||
}
|
||||
|
@ -530,7 +530,7 @@ ARDOUR_UI::audition_blink (bool onoff)
|
|||
|
||||
if (session->is_auditioning()) {
|
||||
if (onoff) {
|
||||
auditioning_alert_button.set_state (GTK_STATE_ACTIVE);
|
||||
auditioning_alert_button.set_state (Gtk::STATE_ACTIVE);
|
||||
} else {
|
||||
auditioning_alert_button.set_state (Gtk::STATE_NORMAL);
|
||||
}
|
||||
|
@ -627,7 +627,7 @@ ARDOUR_UI::shuttle_box_motion (GdkEventMotion* ev)
|
|||
gint
|
||||
ARDOUR_UI::mouse_shuttle (double x, bool force)
|
||||
{
|
||||
double half_width = shuttle_box.width() / 2.0;
|
||||
double half_width = shuttle_box.get_width() / 2.0;
|
||||
double distance = x - half_width;
|
||||
|
||||
if (distance > 0) {
|
||||
|
@ -676,7 +676,7 @@ gint
|
|||
ARDOUR_UI::shuttle_box_expose (GdkEventExpose* event)
|
||||
{
|
||||
gint x;
|
||||
Gdk_Window win (shuttle_box.get_window());
|
||||
Gdk::Window win (shuttle_box.get_window());
|
||||
|
||||
/* redraw the background */
|
||||
|
||||
|
@ -686,7 +686,7 @@ ARDOUR_UI::shuttle_box_expose (GdkEventExpose* event)
|
|||
event->area.width, event->area.height);
|
||||
|
||||
|
||||
x = (gint) floor ((shuttle_box.width() / 2.0) + (0.5 * (shuttle_box.width() * shuttle_fract)));
|
||||
x = (gint) floor ((shuttle_box.get_width() / 2.0) + (0.5 * (shuttle_box.get_width() * shuttle_fract)));
|
||||
|
||||
/* draw line */
|
||||
|
||||
|
@ -694,7 +694,7 @@ ARDOUR_UI::shuttle_box_expose (GdkEventExpose* event)
|
|||
x,
|
||||
0,
|
||||
x,
|
||||
shuttle_box.height());
|
||||
shuttle_box.get_height());
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -146,9 +146,9 @@ ARDOUR_UI::connect_to_session (Session *s)
|
|||
|
||||
transport_stopped ();
|
||||
|
||||
second_connection = Main::timeout.connect (mem_fun(*this, &ARDOUR_UI::every_second), 1000);
|
||||
point_one_second_connection = Main::timeout.connect (mem_fun(*this, &ARDOUR_UI::every_point_one_seconds), 100);
|
||||
point_zero_one_second_connection = Main::timeout.connect (mem_fun(*this, &ARDOUR_UI::every_point_zero_one_seconds), 40);
|
||||
second_connection = Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::every_second), 1000);
|
||||
point_one_second_connection = Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::every_point_one_seconds), 100);
|
||||
point_zero_one_second_connection = Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::every_point_zero_one_seconds), 40);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -62,9 +62,9 @@ ARDOUR_UI::build_menu_bar ()
|
|||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
menu_bar.set_name ("MainMenuBar");
|
||||
menu_bar->set_name ("MainMenuBar");
|
||||
|
||||
MenuList& items = menu_bar.items();
|
||||
MenuList& items = menu_bar->items();
|
||||
|
||||
/* file menu */
|
||||
|
||||
|
@ -76,13 +76,13 @@ ARDOUR_UI::build_menu_bar ()
|
|||
session_items.push_back (MenuElem (_("Open"), mem_fun(*this, &ARDOUR_UI::open_session)));
|
||||
session_items.push_back (MenuElem (_("Recent"), mem_fun(*this, &ARDOUR_UI::open_recent_session)));
|
||||
session_items.push_back (MenuElem (_("Close"), mem_fun(*this, &ARDOUR_UI::close_session)));
|
||||
close_item = session_items.back();
|
||||
close_item = &session_items.back();
|
||||
close_item->set_sensitive (false);
|
||||
|
||||
session_items.push_back (SeparatorElem());
|
||||
|
||||
session_items.push_back (MenuElem (_("Add Track/Bus"), mem_fun(*this, &ARDOUR_UI::add_route)));
|
||||
add_track_item = session_items.back ();
|
||||
add_track_item = &session_items.back ();
|
||||
add_track_item->set_sensitive (false);
|
||||
|
||||
session_items.push_back (SeparatorElem());
|
||||
|
@ -98,7 +98,7 @@ ARDOUR_UI::build_menu_bar ()
|
|||
image_compositor_menu->set_name ("ArdourContextMenu");
|
||||
image_compositor_items.push_back(MenuElem (_("Connect"), (mem_fun (editor, &PublicEditor::connect_to_image_compositor)))) ;
|
||||
session_items.push_back(MenuElem (_("Image Compositor"), *image_compositor_menu)) ;
|
||||
image_compositor_item = session_items.back() ;
|
||||
image_compositor_item = &session_items.back() ;
|
||||
image_compositor_item->set_sensitive(false) ;
|
||||
session_items.push_back (SeparatorElem());
|
||||
} else {
|
||||
|
@ -112,11 +112,11 @@ ARDOUR_UI::build_menu_bar ()
|
|||
/* </CMT Additions> */
|
||||
|
||||
session_items.push_back (MenuElem (_("Save"), bind (mem_fun(*this, &ARDOUR_UI::save_state), string(""))));
|
||||
save_item = session_items.back();
|
||||
save_item = &session_items.back();
|
||||
save_item->set_sensitive (false);
|
||||
|
||||
session_items.push_back (MenuElem (_("Snapshot"), mem_fun(*this, &ARDOUR_UI::snapshot_session)));
|
||||
snapshot_item = session_items.back();
|
||||
snapshot_item = &session_items.back();
|
||||
snapshot_item->set_sensitive (false);
|
||||
/*
|
||||
session_items.push_back (MenuElem (_("Save as...")));
|
||||
|
@ -124,7 +124,7 @@ ARDOUR_UI::build_menu_bar ()
|
|||
save_as_item->set_sensitive (false);
|
||||
*/
|
||||
session_items.push_back (MenuElem (_("Save Template..."), mem_fun(*this, &ARDOUR_UI::save_template)));
|
||||
save_template_item = session_items.back();
|
||||
save_template_item = &session_items.back();
|
||||
save_template_item->set_sensitive (false);
|
||||
|
||||
Menu *export_menu = manage (new Menu);
|
||||
|
@ -135,7 +135,7 @@ ARDOUR_UI::build_menu_bar ()
|
|||
// export_items.back()->set_sensitive (false);
|
||||
|
||||
session_items.push_back (MenuElem (_("Export"), *export_menu));
|
||||
export_item = session_items.back();
|
||||
export_item = &session_items.back();
|
||||
export_item->set_sensitive (false);
|
||||
|
||||
session_items.push_back (SeparatorElem());
|
||||
|
@ -147,7 +147,7 @@ ARDOUR_UI::build_menu_bar ()
|
|||
cleanup_items.push_back (MenuElem (_("Flush wastebasket"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::flush_trash)));
|
||||
|
||||
session_items.push_back (MenuElem (_("Cleanup"), *cleanup_menu));
|
||||
cleanup_item = session_items.back ();
|
||||
cleanup_item = &session_items.back ();
|
||||
cleanup_item->set_sensitive (false);
|
||||
|
||||
session_items.push_back (SeparatorElem());
|
||||
|
@ -170,10 +170,10 @@ ARDOUR_UI::build_menu_bar ()
|
|||
jack_menu->set_name ("ArdourContextMenu");
|
||||
|
||||
jack_items.push_back (MenuElem (_("Disconnect"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::disconnect_from_jack)));
|
||||
jack_disconnect_item = jack_items.back();
|
||||
jack_disconnect_item = &jack_items.back();
|
||||
jack_disconnect_item->set_sensitive (false);
|
||||
jack_items.push_back (MenuElem (_("Reconnect"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::reconnect_to_jack)));
|
||||
jack_reconnect_item = jack_items.back();
|
||||
jack_reconnect_item = &jack_items.back();
|
||||
jack_reconnect_item->set_sensitive (false);
|
||||
|
||||
jack_bufsize_menu = manage (new Menu);
|
||||
|
@ -212,27 +212,27 @@ ARDOUR_UI::build_menu_bar ()
|
|||
(CheckMenuElem
|
||||
(_("Options Editor"),
|
||||
mem_fun(*this, &ARDOUR_UI::toggle_options_window)));
|
||||
options_window_check = dynamic_cast<CheckMenuItem*>(window_items.back());
|
||||
options_window_check = dynamic_cast<CheckMenuItem*>(&window_items.back());
|
||||
// options_window_check->set_sensitive (false);
|
||||
|
||||
window_items.push_back
|
||||
(CheckMenuElem
|
||||
(_("Audio Library"),
|
||||
mem_fun(*this, &ARDOUR_UI::toggle_sfdb_window)));
|
||||
sfdb_check = dynamic_cast<CheckMenuItem*>(window_items.back());
|
||||
sfdb_check = dynamic_cast<CheckMenuItem*>(&window_items.back());
|
||||
|
||||
window_items.push_back
|
||||
(CheckMenuElem
|
||||
(_("Track/Bus Inspector"),
|
||||
mem_fun(*this, &ARDOUR_UI::toggle_route_params_window)));
|
||||
route_params_check = dynamic_cast<CheckMenuItem*>(window_items.back());
|
||||
route_params_check = dynamic_cast<CheckMenuItem*>(&window_items.back());
|
||||
route_params_check->set_sensitive (false);
|
||||
|
||||
window_items.push_back
|
||||
(CheckMenuElem
|
||||
(_("Connections"),
|
||||
mem_fun(*this, &ARDOUR_UI::toggle_connection_editor)));
|
||||
connection_editor_check = dynamic_cast<CheckMenuItem*>(window_items.back());
|
||||
connection_editor_check = dynamic_cast<CheckMenuItem*>(&window_items.back());
|
||||
connection_editor_check->set_sensitive (false);
|
||||
|
||||
#if 0
|
||||
|
@ -240,7 +240,7 @@ ARDOUR_UI::build_menu_bar ()
|
|||
(CheckMenuElem
|
||||
(_("Meter Bridge"),
|
||||
mem_fun(*this, &ARDOUR_UI::toggle_meter_bridge_window)));
|
||||
meter_bridge_dialog_check = dynamic_cast<CheckMenuItem*>(window_items.back());
|
||||
meter_bridge_dialog_check = dynamic_cast<CheckMenuItem*>(&window_items.back());
|
||||
meter_bridge_dialog_check->set_sensitive (false);
|
||||
#endif
|
||||
|
||||
|
@ -248,14 +248,14 @@ ARDOUR_UI::build_menu_bar ()
|
|||
(CheckMenuElem
|
||||
(_("Locations"),
|
||||
mem_fun(*this, &ARDOUR_UI::toggle_location_window)));
|
||||
locations_dialog_check = dynamic_cast<CheckMenuItem*>(window_items.back());
|
||||
locations_dialog_check = dynamic_cast<CheckMenuItem*>(&window_items.back());
|
||||
locations_dialog_check->set_sensitive (false);
|
||||
|
||||
window_items.push_back
|
||||
(CheckMenuElem
|
||||
(_("Big Clock"),
|
||||
mem_fun(*this, &ARDOUR_UI::toggle_big_clock_window)));
|
||||
big_clock_check = dynamic_cast<CheckMenuItem*>(window_items.back());
|
||||
big_clock_check = dynamic_cast<CheckMenuItem*>(&window_items.back());
|
||||
|
||||
window_items.push_back (SeparatorElem());
|
||||
|
||||
|
@ -288,7 +288,7 @@ ARDOUR_UI::build_menu_bar ()
|
|||
sample_rate_box.set_name ("SampleRate");
|
||||
sample_rate_label.set_name ("SampleRate");
|
||||
|
||||
menu_hbox.pack_start (menu_bar, true, true);
|
||||
menu_hbox.pack_start (*menu_bar, true, true);
|
||||
menu_hbox.pack_end (wall_clock_box, false, false, 10);
|
||||
menu_hbox.pack_end (disk_space_box, false, false, 10);
|
||||
menu_hbox.pack_end (cpu_load_box, false, false, 10);
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace sigc;
|
||||
//using namespace sigc;
|
||||
using namespace LADSPA;
|
||||
using namespace Gtk;
|
||||
using namespace Editing;
|
||||
|
@ -147,7 +147,7 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt
|
|||
visual_button.set_name ("TrackVisualButton");
|
||||
hide_button.set_name ("TrackRemoveButton");
|
||||
|
||||
hide_button.add (*(manage (new Pixmap (small_x_xpm))));
|
||||
hide_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(small_x_xpm)))));
|
||||
|
||||
_route.mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed));
|
||||
_route.solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
|
||||
|
@ -167,8 +167,8 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt
|
|||
visual_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::visual_click));
|
||||
hide_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::hide_click));
|
||||
|
||||
name_entry.activate.connect (mem_fun(*this, &AudioTimeAxisView::name_entry_activated));
|
||||
name_entry.signal_focus_out_event()().connect (mem_fun(*this, &AudioTimeAxisView::name_entry_focus_out_handler));
|
||||
name_entry.signal_activate().connect (mem_fun(*this, &AudioTimeAxisView::name_entry_activated));
|
||||
name_entry.signal_focus_out_event().connect (mem_fun(*this, &AudioTimeAxisView::name_entry_focus_out_handler));
|
||||
name_entry.signal_button_press_event().connect (mem_fun(*this, &AudioTimeAxisView::name_entry_button_press_handler));
|
||||
name_entry.signal_button_release_event().connect (mem_fun(*this, &AudioTimeAxisView::name_entry_button_release_handler));
|
||||
name_entry.signal_key_release_event().connect (mem_fun(*this, &AudioTimeAxisView::name_entry_key_release_handler));
|
||||
|
@ -349,7 +349,7 @@ AudioTimeAxisView::edit_click (GdkEventButton *ev)
|
|||
bind (mem_fun(*this, &AudioTimeAxisView::set_edit_group_from_menu), (RouteGroup *) 0)));
|
||||
|
||||
if (_route.edit_group() == 0) {
|
||||
static_cast<RadioMenuItem*>(items.back())->set_active ();
|
||||
static_cast<RadioMenuItem*>(&items.back())->set_active ();
|
||||
}
|
||||
|
||||
_session.foreach_edit_group (this, &AudioTimeAxisView::add_edit_group_menu_item);
|
||||
|
@ -367,7 +367,7 @@ AudioTimeAxisView::add_edit_group_menu_item (RouteGroup *eg)
|
|||
items.push_back (RadioMenuElem (edit_group_menu_radio_group,
|
||||
eg->name(), bind (mem_fun(*this, &AudioTimeAxisView::set_edit_group_from_menu), eg)));
|
||||
if (_route.edit_group() == eg) {
|
||||
static_cast<RadioMenuItem*>(items.back())->set_active ();
|
||||
static_cast<RadioMenuItem*>(&items.back())->set_active ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -738,12 +738,12 @@ AudioTimeAxisView::build_display_menu ()
|
|||
|
||||
automation_items.push_back (CheckMenuElem (_("gain"),
|
||||
mem_fun(*this, &AudioTimeAxisView::toggle_gain_track)));
|
||||
gain_automation_item = static_cast<CheckMenuItem*> (automation_items.back());
|
||||
gain_automation_item = static_cast<CheckMenuItem*> (&automation_items.back());
|
||||
gain_automation_item->set_active(show_gain_automation);
|
||||
|
||||
automation_items.push_back (CheckMenuElem (_("pan"),
|
||||
mem_fun(*this, &AudioTimeAxisView::toggle_pan_track)));
|
||||
pan_automation_item = static_cast<CheckMenuItem*> (automation_items.back());
|
||||
pan_automation_item = static_cast<CheckMenuItem*> (&automation_items.back());
|
||||
pan_automation_item->set_active(show_pan_automation);
|
||||
|
||||
automation_items.push_back (MenuElem (_("Plugins"), subplugin_menu));
|
||||
|
@ -755,7 +755,7 @@ AudioTimeAxisView::build_display_menu ()
|
|||
waveform_menu->set_name ("ArdourContextMenu");
|
||||
|
||||
waveform_items.push_back (CheckMenuElem (_("Show waveforms"), mem_fun(*this, &AudioTimeAxisView::toggle_waveforms)));
|
||||
waveform_item = static_cast<CheckMenuItem *> (waveform_items.back());
|
||||
waveform_item = static_cast<CheckMenuItem *> (&waveform_items.back());
|
||||
ignore_toggle = true;
|
||||
waveform_item->set_active (editor.show_waveforms());
|
||||
ignore_toggle = false;
|
||||
|
@ -763,10 +763,10 @@ AudioTimeAxisView::build_display_menu ()
|
|||
RadioMenuItem::Group group;
|
||||
|
||||
waveform_items.push_back (RadioMenuElem (group, _("Traditional"), bind (mem_fun(*this, &AudioTimeAxisView::set_waveform_shape), Traditional)));
|
||||
traditional_item = static_cast<RadioMenuItem *> (waveform_items.back());
|
||||
traditional_item = static_cast<RadioMenuItem *> (&waveform_items.back());
|
||||
|
||||
waveform_items.push_back (RadioMenuElem (group, _("Rectified"), bind (mem_fun(*this, &AudioTimeAxisView::set_waveform_shape), Rectified)));
|
||||
rectified_item = static_cast<RadioMenuItem *> (waveform_items.back());
|
||||
rectified_item = static_cast<RadioMenuItem *> (&waveform_items.back());
|
||||
|
||||
items.push_back (MenuElem (_("Waveform"), *waveform_menu));
|
||||
|
||||
|
@ -779,12 +779,12 @@ AudioTimeAxisView::build_display_menu ()
|
|||
RadioMenuItem::Group align_group;
|
||||
|
||||
alignment_items.push_back (RadioMenuElem (align_group, _("align with existing material"), bind (mem_fun(*this, &AudioTimeAxisView::set_align_style), ExistingMaterial)));
|
||||
align_existing_item = dynamic_cast<RadioMenuItem*>(alignment_items.back());
|
||||
align_existing_item = dynamic_cast<RadioMenuItem*>(&alignment_items.back());
|
||||
if (get_diskstream()->alignment_style() == ExistingMaterial) {
|
||||
align_existing_item->set_active();
|
||||
}
|
||||
alignment_items.push_back (RadioMenuElem (align_group, _("align with capture time"), bind (mem_fun(*this, &AudioTimeAxisView::set_align_style), CaptureTime)));
|
||||
align_capture_item = dynamic_cast<RadioMenuItem*>(alignment_items.back());
|
||||
align_capture_item = dynamic_cast<RadioMenuItem*>(&alignment_items.back());
|
||||
if (get_diskstream()->alignment_style() == CaptureTime) {
|
||||
align_capture_item->set_active();
|
||||
}
|
||||
|
@ -796,7 +796,7 @@ AudioTimeAxisView::build_display_menu ()
|
|||
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (CheckMenuElem (_("Active"), mem_fun(*this, &RouteUI::toggle_route_active)));
|
||||
route_active_menu_item = dynamic_cast<CheckMenuItem *> (items.back());
|
||||
route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
||||
route_active_menu_item->set_active (_route.active());
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
@ -1573,7 +1573,7 @@ AudioTimeAxisView::add_redirect_to_subplugin_menu (Redirect* r)
|
|||
string name = r->describe_parameter (*i);
|
||||
|
||||
items.push_back (CheckMenuElem (name));
|
||||
mitem = dynamic_cast<CheckMenuItem*> (items.back());
|
||||
mitem = dynamic_cast<CheckMenuItem*> (&items.back());
|
||||
|
||||
if (has_visible_automation.find((*i)) != has_visible_automation.end()) {
|
||||
mitem->set_active(true);
|
||||
|
@ -1593,7 +1593,7 @@ AudioTimeAxisView::add_redirect_to_subplugin_menu (Redirect* r)
|
|||
|
||||
}
|
||||
|
||||
mitem->toggled.connect (bind (mem_fun(*this, &AudioTimeAxisView::redirect_menu_item_toggled), rai, ran));
|
||||
mitem->signal_toggled().connect (bind (mem_fun(*this, &AudioTimeAxisView::redirect_menu_item_toggled), rai, ran));
|
||||
}
|
||||
|
||||
/* add the menu for this redirect, because the subplugin
|
||||
|
|
|
@ -70,7 +70,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, Route& r, PublicEdit
|
|||
(GtkSignalFunc) PublicEditor::canvas_automation_track_event,
|
||||
this);
|
||||
|
||||
hide_button.add (*(manage (new Pixmap (small_x_xpm))));
|
||||
hide_button.add (*(manage (new Gtk::Image (Gdk::Pixbuf::create_from_xpm_data(small_x_xpm)))));
|
||||
|
||||
height_button.set_name ("TrackSizeButton");
|
||||
auto_button.set_name ("TrackVisualButton");
|
||||
|
@ -157,7 +157,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, Route& r, PublicEdit
|
|||
controls_base_unselected_name = X_("AutomationTrackControlsBase");
|
||||
controls_ebox.set_name (controls_base_unselected_name);
|
||||
|
||||
controls_frame.set_shadow_type (GTK_SHADOW_ETCHED_OUT);
|
||||
controls_frame.set_shadow_type (Gtk::SHADOW_ETCHED_OUT);
|
||||
|
||||
XMLNode* xml_node = get_parent_with_state()->get_child_xml_node (_state_name);
|
||||
set_state (*xml_node);
|
||||
|
@ -457,19 +457,19 @@ AutomationTimeAxisView::build_display_menu ()
|
|||
|
||||
as_items.push_back (CheckMenuElem (_("off"),
|
||||
bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Off)));
|
||||
auto_off_item = dynamic_cast<CheckMenuItem*>(as_items.back());
|
||||
auto_off_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
|
||||
|
||||
as_items.push_back (CheckMenuElem (_("play"),
|
||||
bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Play)));
|
||||
auto_play_item = dynamic_cast<CheckMenuItem*>(as_items.back());
|
||||
auto_play_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
|
||||
|
||||
as_items.push_back (CheckMenuElem (_("write"),
|
||||
bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Write)));
|
||||
auto_write_item = dynamic_cast<CheckMenuItem*>(as_items.back());
|
||||
auto_write_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
|
||||
|
||||
as_items.push_back (CheckMenuElem (_("touch"),
|
||||
bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Touch)));
|
||||
auto_touch_item = dynamic_cast<CheckMenuItem*>(as_items.back());
|
||||
auto_touch_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
|
||||
|
||||
items.push_back (MenuElem (_("State"), *auto_state_menu));
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
BEGIN_GNOME_CANVAS_DECLS
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Wave viewer item for canvas.
|
||||
*/
|
||||
|
@ -60,6 +60,6 @@ struct _GnomeCanvasCurveClass {
|
|||
|
||||
GtkType gnome_canvas_curve_get_type (void);
|
||||
|
||||
END_GNOME_CANVAS_DECLS
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GNOME_CANVAS_CURVE_H__ */
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <sigc++/bind.h>
|
||||
|
||||
#include <gtkmm/frame.h>
|
||||
#include <gtkmm/pixmap.h>
|
||||
#include <gtkmm/image.h>
|
||||
#include <gtkmm/scrolledwindow.h>
|
||||
|
||||
#include <ardour/automation_event.h>
|
||||
|
@ -101,7 +101,8 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
|
|||
add (vpacker);
|
||||
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::POINTER_MOTION_MASK);
|
||||
|
||||
select_out_button.set_group (select_in_button.get_group());
|
||||
RadioButtonGroup sel_but_group = select_in_button.get_group();
|
||||
select_out_button.set_group (sel_but_group);
|
||||
select_out_button.set_mode (false);
|
||||
select_in_button.set_mode (false);
|
||||
|
||||
|
@ -114,8 +115,8 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
|
|||
|
||||
_canvas = gnome_canvas_new_aa ();
|
||||
|
||||
canvas = wrap (_canvas);
|
||||
canvas->size_allocate.connect (mem_fun(*this, &CrossfadeEditor::canvas_allocation));
|
||||
canvas = Glib::wrap (_canvas);
|
||||
canvas->signal_size_allocate().connect (mem_fun(*this, &CrossfadeEditor::canvas_allocation));
|
||||
canvas->set_size_request (425, 200);
|
||||
|
||||
toplevel = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
|
||||
|
@ -209,7 +210,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
|
|||
fade_in_table.attach (select_in_button, 0, 2, 0, 1, Gtk::FILL|Gtk::EXPAND);
|
||||
fade_out_table.attach (select_out_button, 0, 2, 0, 1, Gtk::FILL|Gtk::EXPAND);
|
||||
|
||||
Pixmap *pxmap;
|
||||
Image *pxmap;
|
||||
Button* pbutton;
|
||||
int row;
|
||||
int col;
|
||||
|
@ -219,11 +220,11 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
|
|||
|
||||
for (list<Preset*>::iterator i = fade_in_presets->begin(); i != fade_in_presets->end(); ++i) {
|
||||
|
||||
pxmap = manage (new Pixmap ((*i)->xpm));
|
||||
pxmap = manage (new Image (Gdk::Pixbuf::create_from_xpm_data((*i)->xpm)));
|
||||
pbutton = manage (new Button);
|
||||
pbutton->add (*pxmap);
|
||||
pbutton->set_name ("CrossfadeEditButton");
|
||||
pbutton-.signal_clicked().connect (bind (mem_fun(*this, &CrossfadeEditor::apply_preset), *i));
|
||||
pbutton->signal_clicked().connect (bind (mem_fun(*this, &CrossfadeEditor::apply_preset), *i));
|
||||
fade_in_table.attach (*pbutton, col, col+1, row, row+1);
|
||||
fade_in_buttons.push_back (pbutton);
|
||||
|
||||
|
@ -240,11 +241,11 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
|
|||
|
||||
for (list<Preset*>::iterator i = fade_out_presets->begin(); i != fade_out_presets->end(); ++i) {
|
||||
|
||||
pxmap = manage (new Pixmap ((*i)->xpm));
|
||||
pxmap = manage (new Image (Gdk::Pixbuf::create_from_xpm_data((*i)->xpm)));
|
||||
pbutton = manage (new Button);
|
||||
pbutton->add (*pxmap);
|
||||
pbutton->set_name ("CrossfadeEditButton");
|
||||
pbutton-.signal_clicked().connect (bind (mem_fun(*this, &CrossfadeEditor::apply_preset), *i));
|
||||
pbutton->signal_clicked().connect (bind (mem_fun(*this, &CrossfadeEditor::apply_preset), *i));
|
||||
fade_out_table.attach (*pbutton, col, col+1, row, row+1);
|
||||
fade_out_buttons.push_back (pbutton);
|
||||
|
||||
|
@ -270,11 +271,11 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
|
|||
|
||||
clear_button.signal_clicked().connect (mem_fun(*this, &CrossfadeEditor::clear));
|
||||
revert_button.signal_clicked().connect (mem_fun(*this, &CrossfadeEditor::reset));
|
||||
audition_both_button.toggled.connect (mem_fun(*this, &CrossfadeEditor::audition_toggled));
|
||||
audition_right_button.toggled.connect (mem_fun(*this, &CrossfadeEditor::audition_right_toggled));
|
||||
audition_right_dry_button.toggled.connect (mem_fun(*this, &CrossfadeEditor::audition_right_dry_toggled));
|
||||
audition_left_button.toggled.connect (mem_fun(*this, &CrossfadeEditor::audition_left_toggled));
|
||||
audition_left_dry_button.toggled.connect (mem_fun(*this, &CrossfadeEditor::audition_left_dry_toggled));
|
||||
audition_both_button.signal_toggled().connect (mem_fun(*this, &CrossfadeEditor::audition_toggled));
|
||||
audition_right_button.signal_toggled().connect (mem_fun(*this, &CrossfadeEditor::audition_right_toggled));
|
||||
audition_right_dry_button.signal_toggled().connect (mem_fun(*this, &CrossfadeEditor::audition_right_dry_toggled));
|
||||
audition_left_button.signal_toggled().connect (mem_fun(*this, &CrossfadeEditor::audition_left_toggled));
|
||||
audition_left_dry_button.signal_toggled().connect (mem_fun(*this, &CrossfadeEditor::audition_left_dry_toggled));
|
||||
|
||||
action_box.set_border_width (7);
|
||||
action_box.set_spacing (5);
|
||||
|
@ -419,7 +420,7 @@ gint
|
|||
CrossfadeEditor::_canvas_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
{
|
||||
CrossfadeEditor* ed = static_cast<CrossfadeEditor*> (data);
|
||||
return ed->signal_canvas_event() (item, event);
|
||||
return ed->canvas_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
|
@ -626,7 +627,7 @@ gint
|
|||
CrossfadeEditor::_point_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
{
|
||||
CrossfadeEditor* ed = static_cast<CrossfadeEditor*> (data);
|
||||
return ed->signal_point_event() (item, event);
|
||||
return ed->point_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
|
@ -681,7 +682,7 @@ gint
|
|||
CrossfadeEditor::_curve_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
{
|
||||
CrossfadeEditor* ed = static_cast<CrossfadeEditor*> (data);
|
||||
return ed->signal_curve_event() (item, event);
|
||||
return ed->curve_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
|
@ -66,7 +66,6 @@
|
|||
#include "editing.h"
|
||||
#include "public_editor.h"
|
||||
#include "crossfade_edit.h"
|
||||
#include "extra_bind.h"
|
||||
#include "audio_time_axis.h"
|
||||
#include "gui_thread.h"
|
||||
|
||||
|
@ -99,11 +98,6 @@ static const gchar *edit_group_list_titles[] = {
|
|||
"foo", "bar", 0
|
||||
};
|
||||
|
||||
static const gchar *region_list_display_titles[] = {
|
||||
N_("Regions/name"),
|
||||
0
|
||||
};
|
||||
|
||||
static const gchar *named_selection_display_titles[] = {
|
||||
N_("Chunks"),
|
||||
0
|
||||
|
@ -212,8 +206,6 @@ Editor::Editor (AudioEngine& eng)
|
|||
edit_hscroll_left_arrow (Gtk::ARROW_LEFT, Gtk::SHADOW_OUT),
|
||||
edit_hscroll_right_arrow (Gtk::ARROW_RIGHT, Gtk::SHADOW_OUT),
|
||||
|
||||
region_list_display (internationalize (region_list_display_titles)),
|
||||
|
||||
named_selection_display (internationalize (named_selection_display_titles)),
|
||||
|
||||
/* tool bar related */
|
||||
|
@ -292,7 +284,6 @@ Editor::Editor (AudioEngine& eng)
|
|||
last_update_frame = 0;
|
||||
drag_info.item = 0;
|
||||
last_audition_region = 0;
|
||||
region_list_button_region = 0;
|
||||
current_mixer_strip = 0;
|
||||
current_bbt_points = 0;
|
||||
|
||||
|
@ -376,13 +367,13 @@ Editor::Editor (AudioEngine& eng)
|
|||
track_canvas_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_NEVER);
|
||||
track_canvas_scroller.set_name ("TrackCanvasScroller");
|
||||
|
||||
track_canvas_scroller.get_vadjustment()->value_changed.connect (mem_fun(*this, &Editor::tie_vertical_scrolling));
|
||||
track_canvas_scroller.get_vadjustment()->signal_value_changed().connect (mem_fun(*this, &Editor::tie_vertical_scrolling));
|
||||
track_canvas_scroller.get_vadjustment()->set_step_increment (10.0);
|
||||
|
||||
track_canvas_scroller.get_hadjustment()->set_lower (0.0);
|
||||
track_canvas_scroller.get_hadjustment()->set_upper (1200.0);
|
||||
track_canvas_scroller.get_hadjustment()->set_step_increment (20.0);
|
||||
track_canvas_scroller.get_hadjustment()->value_changed.connect (mem_fun(*this, &Editor::canvas_horizontally_scrolled));
|
||||
track_canvas_scroller.get_hadjustment()->signal_value_changed().connect (mem_fun(*this, &Editor::canvas_horizontally_scrolled));
|
||||
|
||||
edit_vscrollbar.set_adjustment(track_canvas_scroller.get_vadjustment());
|
||||
edit_hscrollbar.set_adjustment(track_canvas_scroller.get_hadjustment());
|
||||
|
@ -404,9 +395,9 @@ Editor::Editor (AudioEngine& eng)
|
|||
|
||||
Viewport* viewport = static_cast<Viewport*> (edit_controls_scroller.get_child());
|
||||
|
||||
viewport->set_shadow_type (GTK_SHADOW_NONE);
|
||||
viewport->set_shadow_type (Gtk::SHADOW_NONE);
|
||||
viewport->set_name ("EditControlsBase");
|
||||
viewport->signal_add_event()s (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK);
|
||||
viewport->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK);
|
||||
viewport->signal_button_release_event().connect (mem_fun(*this, &Editor::edit_controls_button_release));
|
||||
|
||||
build_cursors ();
|
||||
|
@ -471,7 +462,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
|
||||
time_button_event_box.add (time_button_vbox);
|
||||
|
||||
time_button_event_box.signal_set_event()s (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
time_button_event_box.set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
time_button_event_box.set_name ("TimebarLabelBase");
|
||||
time_button_event_box.signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_label_button_release));
|
||||
|
||||
|
@ -482,7 +473,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
track_canvas_event_box.add (track_canvas_scroller);
|
||||
|
||||
time_canvas_event_box.add (time_canvas_vbox);
|
||||
time_canvas_event_box.signal_set_event()s (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK);
|
||||
time_canvas_event_box.set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK);
|
||||
|
||||
|
||||
edit_packer.set_col_spacings (0);
|
||||
|
@ -493,17 +484,17 @@ Editor::Editor (AudioEngine& eng)
|
|||
// edit_packer.attach (edit_hscroll_left_arrow_event, 0, 1, 0, 1, Gtk::FILL, 0, 0, 0);
|
||||
// edit_packer.attach (edit_hscroll_slider, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, 0, 0, 0);
|
||||
// edit_packer.attach (edit_hscroll_right_arrow_event, 2, 3, 0, 1, Gtk::FILL, 0, 0, 0);
|
||||
edit_packer.attach (edit_hscrollbar, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, 0, 0, 0);
|
||||
edit_packer.attach (edit_hscrollbar, 1, 2, 0, 1, FILL|EXPAND, FILL, 0, 0);
|
||||
|
||||
edit_packer.attach (time_button_event_box, 0, 1, 1, 2, Gtk::FILL, 0, 0, 0);
|
||||
edit_packer.attach (time_canvas_event_box, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, 0, 0, 0);
|
||||
edit_packer.attach (time_button_event_box, 0, 1, 1, 2, FILL, FILL, 0, 0);
|
||||
edit_packer.attach (time_canvas_event_box, 1, 2, 1, 2, FILL|EXPAND, FILL, 0, 0);
|
||||
|
||||
edit_packer.attach (edit_controls_scroller, 0, 1, 2, 3, Gtk::FILL, Gtk::FILL|Gtk::EXPAND, 0, 0);
|
||||
edit_packer.attach (track_canvas_event_box, 1, 2, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
|
||||
edit_packer.attach (edit_vscrollbar, 2, 3, 2, 3, 0, Gtk::FILL|Gtk::EXPAND, 0, 0);
|
||||
edit_packer.attach (edit_controls_scroller, 0, 1, 2, 3, FILL, FILL|EXPAND, 0, 0);
|
||||
edit_packer.attach (track_canvas_event_box, 1, 2, 2, 3, FILL|EXPAND, FILL|EXPAND, 0, 0);
|
||||
edit_packer.attach (edit_vscrollbar, 2, 3, 2, 3, FILL, FILL|EXPAND, 0, 0);
|
||||
|
||||
edit_frame.set_name ("BaseFrame");
|
||||
edit_frame.set_shadow_type (Gtk::SHADOW_IN);
|
||||
edit_frame.set_shadow_type (SHADOW_IN);
|
||||
edit_frame.add (edit_packer);
|
||||
|
||||
zoom_in_button.set_name ("EditorTimeButton");
|
||||
|
@ -516,9 +507,9 @@ Editor::Editor (AudioEngine& eng)
|
|||
// ARDOUR_UI::instance()->tooltips().set_tip (zoom_onetoone_button, _("Zoom in 1:1"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_full_button, _("Zoom to session"));
|
||||
|
||||
zoom_in_button.add (*(manage (new Gtk::Image (zoom_in_button_xpm))));
|
||||
zoom_out_button.add (*(manage (new Gtk::Image (zoom_out_button_xpm))));
|
||||
zoom_out_full_button.add (*(manage (new Gtk::Image (zoom_out_full_button_xpm))));
|
||||
zoom_in_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(zoom_in_button_xpm)))));
|
||||
zoom_out_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(zoom_out_button_xpm)))));
|
||||
zoom_out_full_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(zoom_out_full_button_xpm)))));
|
||||
// zoom_onetoone_button.add (*(manage (new Gtk::Image (zoom_onetoone_button_xpm))));
|
||||
|
||||
|
||||
|
@ -551,7 +542,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
route_list.column_titles_active();
|
||||
route_list.set_compare_func (route_list_compare_func);
|
||||
route_list.set_shadow_type (Gtk::SHADOW_IN);
|
||||
route_list.set_selection_mode (GTK_SELECTION_MULTIPLE);
|
||||
route_list.set_selection_mode (Gtk::SELECTION_MULTIPLE);
|
||||
route_list.set_reorderable (true);
|
||||
edit_group_list.set_size_request (75, -1);
|
||||
|
||||
|
@ -571,7 +562,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
edit_group_list.column_titles_hide();
|
||||
edit_group_list.set_name ("MixerGroupList");
|
||||
edit_group_list.set_shadow_type (Gtk::SHADOW_IN);
|
||||
edit_group_list.set_selection_mode (GTK_SELECTION_MULTIPLE);
|
||||
edit_group_list.set_selection_mode (Gtk::SELECTION_MULTIPLE);
|
||||
edit_group_list.set_reorderable (false);
|
||||
edit_group_list.set_size_request (75, -1);
|
||||
edit_group_list.set_column_auto_resize (0, true);
|
||||
|
@ -610,30 +601,26 @@ Editor::Editor (AudioEngine& eng)
|
|||
|
||||
list_vpacker.pack_start (route_group_vpane, true, true);
|
||||
|
||||
region_list_hidden_node = region_list_display.rows().end();
|
||||
region_list_model = TreeStore::create (region_list_columns));
|
||||
region_list_sort_model = TreeModelSort::create (region_list_model);
|
||||
region_list_model->set_sort_func (0, mem_fun (*this, &Editor::region_list_sorter));
|
||||
|
||||
region_list_display.signal_add_event()s (GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK|Gdk::POINTER_MOTION_MASK);
|
||||
region_list_display.set_model (region_list_sort_model);
|
||||
region_list_display.append_column (_("Regions"), region_list_columns.name);
|
||||
region_list_display.set_reorderable (true);
|
||||
region_list_display.set_size_request (100, -1);
|
||||
region_list_display.set_data ("editor", this);
|
||||
region_list_display.set_flags (Gtk::CAN_FOCUS);
|
||||
region_list_display.set_name ("RegionListDisplay");
|
||||
|
||||
region_list_scroller.add (region_list_display);
|
||||
region_list_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
|
||||
|
||||
region_list_display.drag_dest_set (GTK_DEST_DEFAULT_ALL,
|
||||
target_table, n_targets - 1,
|
||||
GdkDragAction (Gdk::ACTION_COPY|Gdk::ACTION_MOVE));
|
||||
region_list_display.drag_data_received.connect (mem_fun(*this, &Editor::region_list_display_drag_data_received));
|
||||
|
||||
region_list_scroller.add (region_list_display);
|
||||
region_list_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
|
||||
|
||||
region_list_display.set_name ("RegionListDisplay");
|
||||
region_list_display.set_size_request (100, -1);
|
||||
region_list_display.column_titles_active ();
|
||||
region_list_display.set_selection_mode (GTK_SELECTION_SINGLE);
|
||||
|
||||
region_list_display.set_data ("editor", this);
|
||||
region_list_display.set_compare_func (_region_list_sorter);
|
||||
region_list_sort_type = ByName;
|
||||
reset_region_list_sort_type (region_list_sort_type);
|
||||
|
||||
region_list_display.set_flags (Gtk::CAN_FOCUS);
|
||||
|
||||
region_list_display.signal_key_press_event().connect (mem_fun(*this, &Editor::region_list_display_key_press));
|
||||
region_list_display.signal_key_release_event().connect (mem_fun(*this, &Editor::region_list_display_key_release));
|
||||
region_list_display.signal_button_press_event().connect (mem_fun(*this, &Editor::region_list_display_button_press));
|
||||
|
@ -651,7 +638,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
named_selection_display.set_name ("RegionListDisplay");
|
||||
named_selection_display.set_size_request (100, -1);
|
||||
named_selection_display.column_titles_active ();
|
||||
named_selection_display.set_selection_mode (GTK_SELECTION_SINGLE);
|
||||
named_selection_display.set_selection_mode (Gtk::SELECTION_SINGLE);
|
||||
|
||||
named_selection_display.signal_button_press_event().connect (mem_fun(*this, &Editor::named_selection_display_button_press));
|
||||
named_selection_display.select_row.connect (mem_fun(*this, &Editor::named_selection_display_selected));
|
||||
|
@ -663,13 +650,13 @@ Editor::Editor (AudioEngine& eng)
|
|||
canvas_region_list_pane.pack1 (edit_frame, true, true);
|
||||
canvas_region_list_pane.pack2 (region_selection_vpane, true, true);
|
||||
|
||||
track_list_canvas_pane.size_allocate.connect_after (bind (mem_fun(*this, &Editor::pane_allocation_handler),
|
||||
track_list_canvas_pane.signal_size_allocate().connect_after (bind (mem_fun(*this, &Editor::pane_allocation_handler),
|
||||
static_cast<Gtk::Paned*> (&track_list_canvas_pane)));
|
||||
canvas_region_list_pane.size_allocate.connect_after (bind (mem_fun(*this, &Editor::pane_allocation_handler),
|
||||
canvas_region_list_pane.signal_size_allocate().connect_after (bind (mem_fun(*this, &Editor::pane_allocation_handler),
|
||||
static_cast<Gtk::Paned*> (&canvas_region_list_pane)));
|
||||
route_group_vpane.size_allocate.connect_after (bind (mem_fun(*this, &Editor::pane_allocation_handler),
|
||||
route_group_vpane.signal_size_allocate().connect_after (bind (mem_fun(*this, &Editor::pane_allocation_handler),
|
||||
static_cast<Gtk::Paned*> (&route_group_vpane)));
|
||||
region_selection_vpane.size_allocate.connect_after (bind (mem_fun(*this, &Editor::pane_allocation_handler),
|
||||
region_selection_vpane.signal_size_allocate().connect_after (bind (mem_fun(*this, &Editor::pane_allocation_handler),
|
||||
static_cast<Gtk::Paned*> (®ion_selection_vpane)));
|
||||
|
||||
track_list_canvas_pane.pack1 (list_vpacker, true, true);
|
||||
|
@ -686,10 +673,10 @@ Editor::Editor (AudioEngine& eng)
|
|||
canvas_region_list_pane.set_data ("collapse-direction", (gpointer) 0);
|
||||
track_list_canvas_pane.set_data ("collapse-direction", (gpointer) 1);
|
||||
|
||||
route_group_vpane.signal_button_release_event().connect (bind (ptr_fun (pane_handler), static_cast<Paned*> (&route_group_vpane)));
|
||||
region_selection_vpane.signal_button_release_event().connect (bind (ptr_fun (pane_handler), static_cast<Paned*> (®ion_selection_vpane)));
|
||||
canvas_region_list_pane.signal_button_release_event().connect (bind (ptr_fun (pane_handler), static_cast<Paned*> (&canvas_region_list_pane)));
|
||||
track_list_canvas_pane.signal_button_release_event().connect (bind (ptr_fun (pane_handler), static_cast<Paned*> (&track_list_canvas_pane)));
|
||||
route_group_vpane.signal_button_release_event().connect (bind (sigc::ptr_fun (pane_handler), static_cast<Paned*> (&route_group_vpane)));
|
||||
region_selection_vpane.signal_button_release_event().connect (bind (sigc::ptr_fun (pane_handler), static_cast<Paned*> (®ion_selection_vpane)));
|
||||
canvas_region_list_pane.signal_button_release_event().connect (bind (sigc::ptr_fun (pane_handler), static_cast<Paned*> (&canvas_region_list_pane)));
|
||||
track_list_canvas_pane.signal_button_release_event().connect (bind (sigc::ptr_fun (pane_handler), static_cast<Paned*> (&track_list_canvas_pane)));
|
||||
|
||||
top_hbox.pack_start (toolbar_frame, true, true);
|
||||
|
||||
|
@ -706,14 +693,14 @@ Editor::Editor (AudioEngine& eng)
|
|||
vpacker.pack_end (global_hpacker, true, true);
|
||||
|
||||
_playlist_selector = new PlaylistSelector();
|
||||
_playlist_selector->signal_delete_event().connect (bind (ptr_fun (just_hide_it), static_cast<Window *> (_playlist_selector)));
|
||||
_playlist_selector->signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), static_cast<Window *> (_playlist_selector)));
|
||||
|
||||
AudioRegionView::AudioRegionViewGoingAway.connect (mem_fun(*this, &Editor::catch_vanishing_audio_regionview));
|
||||
|
||||
/* nudge stuff */
|
||||
|
||||
nudge_forward_button.add (*(manage (new Gtk::Image (right_arrow_xpm))));
|
||||
nudge_backward_button.add (*(manage (new Gtk::Image (left_arrow_xpm))));
|
||||
nudge_forward_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(right_arrow_xpm)))));
|
||||
nudge_backward_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(left_arrow_xpm)))));
|
||||
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (nudge_forward_button, _("Nudge region/selection forwards"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (nudge_backward_button, _("Nudge region/selection backwards"));
|
||||
|
@ -827,10 +814,10 @@ Editor::initialize_canvas ()
|
|||
|
||||
gtk_signal_connect (GTK_OBJECT(gnome_canvas_root (GNOME_CANVAS(track_gnome_canvas))), "event",
|
||||
(GtkSignalFunc) Editor::_track_canvas_event, this);
|
||||
track_canvas = wrap (track_gnome_canvas);
|
||||
track_canvas = Glib::wrap (track_gnome_canvas);
|
||||
track_canvas->set_name ("EditorMainCanvas");
|
||||
|
||||
track_canvas->signal_add_event()s (Gdk::POINTER_MOTION_HINT_MASK);
|
||||
track_canvas->add_events (Gdk::POINTER_MOTION_HINT_MASK);
|
||||
|
||||
track_canvas->signal_leave_notify_event().connect (mem_fun(*this, &Editor::left_track_canvas));
|
||||
|
||||
|
@ -868,10 +855,10 @@ Editor::initialize_canvas ()
|
|||
NULL);
|
||||
|
||||
time_gnome_canvas = gnome_canvas_new_aa ();
|
||||
time_canvas = wrap (time_gnome_canvas);
|
||||
time_canvas = Glib::wrap (time_gnome_canvas);
|
||||
time_canvas->set_name ("EditorTimeCanvas");
|
||||
|
||||
time_canvas->signal_add_event()s (Gdk::POINTER_MOTION_HINT_MASK);
|
||||
time_canvas->add_events (Gdk::POINTER_MOTION_HINT_MASK);
|
||||
|
||||
meter_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(time_gnome_canvas)),
|
||||
gnome_canvas_group_get_type(),
|
||||
|
@ -1342,7 +1329,7 @@ void
|
|||
Editor::reposition_and_zoom (jack_nframes_t frame, double nfpu)
|
||||
{
|
||||
if (!repos_zoom_queued) {
|
||||
Main::idle.connect (bind (mem_fun(*this, &Editor::deferred_reposition_and_zoom), frame, nfpu));
|
||||
Glib::signal_idle().connect (bind (mem_fun(*this, &Editor::deferred_reposition_and_zoom), frame, nfpu));
|
||||
repos_zoom_queued = true;
|
||||
}
|
||||
}
|
||||
|
@ -1378,8 +1365,8 @@ Editor::on_realize ()
|
|||
|
||||
Window::on_realize ();
|
||||
|
||||
GdkPixmap* empty_pixmap = gdk_pixmap_new (get_window(), 1, 1, 1);
|
||||
GdkPixmap* empty_bitmap = gdk_pixmap_new (get_window(), 1, 1, 1);
|
||||
GdkPixmap* empty_pixmap = gdk_pixmap_new (get_window()->gobj(), 1, 1, 1);
|
||||
GdkPixmap* empty_bitmap = gdk_pixmap_new (get_window()->gobj(), 1, 1, 1);
|
||||
GdkColor white = { 0, 0, 0 };
|
||||
|
||||
null_cursor = gdk_cursor_new_from_pixmap (empty_pixmap, empty_bitmap, &white, &white, 0, 0);
|
||||
|
@ -1390,8 +1377,8 @@ Editor::on_map ()
|
|||
{
|
||||
Window::on_map ();
|
||||
|
||||
track_canvas_scroller.get_window().set_cursor (current_canvas_cursor);
|
||||
time_canvas_scroller.get_window().set_cursor (timebar_cursor);
|
||||
track_canvas_scroller.get_window()->set_cursor (current_canvas_cursor);
|
||||
time_canvas_scroller.get_window()->set_cursor (timebar_cursor);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1762,7 +1749,7 @@ Editor::connect_to_session (Session *t)
|
|||
|
||||
session->foreach_edit_group(this, &Editor::add_edit_group);
|
||||
|
||||
editor_mixer_button.toggled.connect (mem_fun(*this, &Editor::editor_mixer_button_toggled));
|
||||
editor_mixer_button.signal_toggled().connect (mem_fun(*this, &Editor::editor_mixer_button_toggled));
|
||||
editor_mixer_button.set_name (X_("EditorMixerButton"));
|
||||
|
||||
edit_cursor_clock.set_session (session);
|
||||
|
@ -1966,35 +1953,35 @@ Editor::popup_fade_context_menu (int button, int32_t time, GnomeCanvasItem* item
|
|||
case FadeInItem:
|
||||
case FadeInHandleItem:
|
||||
if (arv->region.fade_in_active()) {
|
||||
items.push_back (MenuElem (_("Deactivate"), bind (slot (*arv, &AudioRegionView::set_fade_in_active), false)));
|
||||
items.push_back (MenuElem (_("Deactivate"), bind (mem_fun (*arv, &AudioRegionView::set_fade_in_active), false)));
|
||||
} else {
|
||||
items.push_back (MenuElem (_("Activate"), bind (slot (*arv, &AudioRegionView::set_fade_in_active), true)));
|
||||
items.push_back (MenuElem (_("Activate"), bind (mem_fun (*arv, &AudioRegionView::set_fade_in_active), true)));
|
||||
}
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
items.push_back (MenuElem (_("Linear"), bind (slot (arv->region, &AudioRegion::set_fade_in_shape), AudioRegion::Linear)));
|
||||
items.push_back (MenuElem (_("Slowest"), bind (slot (arv->region, &AudioRegion::set_fade_in_shape), AudioRegion::LogB)));
|
||||
items.push_back (MenuElem (_("Slow"), bind (slot (arv->region, &AudioRegion::set_fade_in_shape), AudioRegion::Fast)));
|
||||
items.push_back (MenuElem (_("Fast"), bind (slot (arv->region, &AudioRegion::set_fade_in_shape), AudioRegion::LogA)));
|
||||
items.push_back (MenuElem (_("Fastest"), bind (slot (arv->region, &AudioRegion::set_fade_in_shape), AudioRegion::Slow)));
|
||||
items.push_back (MenuElem (_("Linear"), bind (mem_fun (arv->region, &AudioRegion::set_fade_in_shape), AudioRegion::Linear)));
|
||||
items.push_back (MenuElem (_("Slowest"), bind (mem_fun (arv->region, &AudioRegion::set_fade_in_shape), AudioRegion::LogB)));
|
||||
items.push_back (MenuElem (_("Slow"), bind (mem_fun (arv->region, &AudioRegion::set_fade_in_shape), AudioRegion::Fast)));
|
||||
items.push_back (MenuElem (_("Fast"), bind (mem_fun (arv->region, &AudioRegion::set_fade_in_shape), AudioRegion::LogA)));
|
||||
items.push_back (MenuElem (_("Fastest"), bind (mem_fun (arv->region, &AudioRegion::set_fade_in_shape), AudioRegion::Slow)));
|
||||
break;
|
||||
|
||||
case FadeOutItem:
|
||||
case FadeOutHandleItem:
|
||||
if (arv->region.fade_out_active()) {
|
||||
items.push_back (MenuElem (_("Deactivate"), bind (slot (*arv, &AudioRegionView::set_fade_out_active), false)));
|
||||
items.push_back (MenuElem (_("Deactivate"), bind (mem_fun (*arv, &AudioRegionView::set_fade_out_active), false)));
|
||||
} else {
|
||||
items.push_back (MenuElem (_("Activate"), bind (slot (*arv, &AudioRegionView::set_fade_out_active), true)));
|
||||
items.push_back (MenuElem (_("Activate"), bind (mem_fun (*arv, &AudioRegionView::set_fade_out_active), true)));
|
||||
}
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
items.push_back (MenuElem (_("Linear"), bind (slot (arv->region, &AudioRegion::set_fade_out_shape), AudioRegion::Linear)));
|
||||
items.push_back (MenuElem (_("Slowest"), bind (slot (arv->region, &AudioRegion::set_fade_out_shape), AudioRegion::Fast)));
|
||||
items.push_back (MenuElem (_("Slow"), bind (slot (arv->region, &AudioRegion::set_fade_out_shape), AudioRegion::LogB)));
|
||||
items.push_back (MenuElem (_("Fast"), bind (slot (arv->region, &AudioRegion::set_fade_out_shape), AudioRegion::LogA)));
|
||||
items.push_back (MenuElem (_("Fastest"), bind (slot (arv->region, &AudioRegion::set_fade_out_shape), AudioRegion::Slow)));
|
||||
items.push_back (MenuElem (_("Linear"), bind (mem_fun (arv->region, &AudioRegion::set_fade_out_shape), AudioRegion::Linear)));
|
||||
items.push_back (MenuElem (_("Slowest"), bind (mem_fun (arv->region, &AudioRegion::set_fade_out_shape), AudioRegion::Fast)));
|
||||
items.push_back (MenuElem (_("Slow"), bind (mem_fun (arv->region, &AudioRegion::set_fade_out_shape), AudioRegion::LogB)));
|
||||
items.push_back (MenuElem (_("Fast"), bind (mem_fun (arv->region, &AudioRegion::set_fade_out_shape), AudioRegion::LogA)));
|
||||
items.push_back (MenuElem (_("Fastest"), bind (mem_fun (arv->region, &AudioRegion::set_fade_out_shape), AudioRegion::Slow)));
|
||||
|
||||
break;
|
||||
default:
|
||||
|
@ -2302,7 +2289,7 @@ Editor::add_region_context_items (StreamView* sv, Region* region, Menu_Helpers::
|
|||
|
||||
items.push_back (MenuElem (_("Popup region editor"), mem_fun(*this, &Editor::edit_region)));
|
||||
items.push_back (MenuElem (_("Raise to top layer"), mem_fun(*this, &Editor::raise_region_to_top)));
|
||||
items.push_back (MenuElem (_("Lower to bottom layer"), slot (*this, &Editor::lower_region_to_bottom)));
|
||||
items.push_back (MenuElem (_("Lower to bottom layer"), mem_fun (*this, &Editor::lower_region_to_bottom)));
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (MenuElem (_("Define sync point"), mem_fun(*this, &Editor::set_region_sync_from_edit_cursor)));
|
||||
items.push_back (MenuElem (_("Remove sync point"), mem_fun(*this, &Editor::remove_region_sync)));
|
||||
|
@ -2375,10 +2362,10 @@ Editor::add_region_context_items (StreamView* sv, Region* region, Menu_Helpers::
|
|||
items.push_back (SeparatorElem());
|
||||
|
||||
items.push_back (MenuElem (_("Split"), (mem_fun(*this, &Editor::split_region))));
|
||||
region_edit_menu_split_item = items.back();
|
||||
region_edit_menu_split_item = &items.back();
|
||||
|
||||
items.push_back (MenuElem (_("Make mono regions"), (mem_fun(*this, &Editor::split_multichannel_region))));
|
||||
region_edit_menu_split_multichannel_item = items.back();
|
||||
region_edit_menu_split_multichannel_item = &items.back();
|
||||
|
||||
items.push_back (MenuElem (_("Duplicate"), (bind (mem_fun(*this, &Editor::duplicate_dialog), true))));
|
||||
items.push_back (MenuElem (_("Fill Track"), (mem_fun(*this, &Editor::region_fill_track))));
|
||||
|
@ -3095,14 +3082,14 @@ Editor::setup_toolbar ()
|
|||
mouse_timefx_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
mouse_audition_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
|
||||
mouse_select_button.toggled.connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange));
|
||||
mouse_select_button.signal_toggled().connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange));
|
||||
mouse_select_button.signal_button_release_event().connect (mem_fun(*this, &Editor::mouse_select_button_release));
|
||||
|
||||
mouse_move_button.toggled.connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseObject));
|
||||
mouse_gain_button.toggled.connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseGain));
|
||||
mouse_zoom_button.toggled.connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseZoom));
|
||||
mouse_timefx_button.toggled.connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseTimeFX));
|
||||
mouse_audition_button.toggled.connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseAudition));
|
||||
mouse_move_button.signal_toggled().connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseObject));
|
||||
mouse_gain_button.signal_toggled().connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseGain));
|
||||
mouse_zoom_button.signal_toggled().connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseZoom));
|
||||
mouse_timefx_button.signal_toggled().connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseTimeFX));
|
||||
mouse_audition_button.signal_toggled().connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseAudition));
|
||||
|
||||
// mouse_move_button.set_active (true);
|
||||
|
||||
|
@ -3216,11 +3203,11 @@ Editor::setup_toolbar ()
|
|||
|
||||
// toolbar_selection_clock_table.attach (selection_start_clock_label, 0, 1, 0, 1, 0, 0, 0, 0);
|
||||
// toolbar_selection_clock_table.attach (selection_end_clock_label, 1, 2, 0, 1, 0, 0, 0, 0);
|
||||
toolbar_selection_clock_table.attach (edit_cursor_clock_label, 2, 3, 0, 1, 0, 0, 0, 0);
|
||||
toolbar_selection_clock_table.attach (edit_cursor_clock_label, 2, 3, 0, 1, FILL, FILL, 0, 0);
|
||||
|
||||
// toolbar_selection_clock_table.attach (selection_start_clock, 0, 1, 1, 2, 0, 0);
|
||||
// toolbar_selection_clock_table.attach (selection_end_clock, 1, 2, 1, 2, 0, 0);
|
||||
toolbar_selection_clock_table.attach (edit_cursor_clock, 2, 3, 1, 2, 0, 0);
|
||||
toolbar_selection_clock_table.attach (edit_cursor_clock, 2, 3, 1, 2, FILL, FILL);
|
||||
|
||||
|
||||
// toolbar_clock_vbox.set_spacing (2);
|
||||
|
@ -3542,7 +3529,7 @@ Editor::get_memento () const
|
|||
State *state = new State;
|
||||
|
||||
store_state (*state);
|
||||
return bind (slot (*(const_cast<Editor*>(this)), &Editor::restore_state), state);
|
||||
return bind (mem_fun (*(const_cast<Editor*>(this)), &Editor::restore_state), state);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3892,7 +3879,7 @@ Editor::edit_menu_map_handler ()
|
|||
edit_items.push_back (MenuElem (label, bind (mem_fun(*this, &Editor::undo), 1U)));
|
||||
|
||||
if (session->undo_depth() == 0) {
|
||||
edit_items.back()->set_sensitive (false);
|
||||
edit_items.back().set_sensitive (false);
|
||||
}
|
||||
|
||||
if (session->redo_depth() == 0) {
|
||||
|
@ -3903,23 +3890,23 @@ Editor::edit_menu_map_handler ()
|
|||
|
||||
edit_items.push_back (MenuElem (label, bind (mem_fun(*this, &Editor::redo), 1U)));
|
||||
if (session->redo_depth() == 0) {
|
||||
edit_items.back()->set_sensitive (false);
|
||||
edit_items.back().set_sensitive (false);
|
||||
}
|
||||
|
||||
vector<MenuItem*> mitems;
|
||||
|
||||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Cut"), mem_fun(*this, &Editor::cut)));
|
||||
mitems.push_back (edit_items.back());
|
||||
mitems.push_back (&edit_items.back());
|
||||
edit_items.push_back (MenuElem (_("Copy"), mem_fun(*this, &Editor::copy)));
|
||||
mitems.push_back (edit_items.back());
|
||||
mitems.push_back (&edit_items.back());
|
||||
edit_items.push_back (MenuElem (_("Paste"), bind (mem_fun(*this, &Editor::paste), 1.0f)));
|
||||
mitems.push_back (edit_items.back());
|
||||
mitems.push_back (&edit_items.back());
|
||||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Align"), bind (mem_fun(*this, &Editor::align), ARDOUR::SyncPoint)));
|
||||
mitems.push_back (edit_items.back());
|
||||
mitems.push_back (&edit_items.back());
|
||||
edit_items.push_back (MenuElem (_("Align Relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::SyncPoint)));
|
||||
mitems.push_back (edit_items.back());
|
||||
mitems.push_back (&edit_items.back());
|
||||
edit_items.push_back (SeparatorElem());
|
||||
|
||||
if (selection->empty()) {
|
||||
|
@ -3948,7 +3935,7 @@ Editor::edit_menu_map_handler ()
|
|||
|
||||
edit_items.push_back (MenuElem (_("Remove last capture"), mem_fun(*this, &Editor::remove_last_capture)));
|
||||
if (!session->have_captured()) {
|
||||
edit_items.back()->set_sensitive (false);
|
||||
edit_items.back().set_sensitive (false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3993,12 +3980,12 @@ Editor::duplicate_dialog (bool dup_region)
|
|||
win.set_position (Gtk::WIN_POS_MOUSE);
|
||||
win.show_all ();
|
||||
|
||||
ok_button.signal_clicked().connect (bind (slot (win, &ArdourDialog::stop), 0));
|
||||
entry.activate.connect (bind (slot (win, &ArdourDialog::stop), 0));
|
||||
cancel_button.signal_clicked().connect (bind (slot (win, &ArdourDialog::stop), 1));
|
||||
ok_button.signal_clicked().connect (bind (mem_fun (win, &ArdourDialog::stop), 0));
|
||||
entry.signal_activate().connect (bind (mem_fun (win, &ArdourDialog::stop), 0));
|
||||
cancel_button.signal_clicked().connect (bind (mem_fun (win, &ArdourDialog::stop), 1));
|
||||
|
||||
entry.signal_focus_in_event()().connect (slot (ARDOUR_UI::generic_focus_in_event));
|
||||
entry.signal_focus_out_event()().connect (slot (ARDOUR_UI::generic_focus_out_event));
|
||||
entry.signal_focus_in_event().connect (sigc::ptr_fun (ARDOUR_UI::generic_focus_in_event));
|
||||
entry.signal_focus_out_event().connect (sigc::ptr_fun (ARDOUR_UI::generic_focus_out_event));
|
||||
|
||||
entry.set_text ("1");
|
||||
set_size_request_to_display_given_text (entry, X_("12345678"), 20, 15);
|
||||
|
@ -4006,7 +3993,7 @@ Editor::duplicate_dialog (bool dup_region)
|
|||
|
||||
win.set_position (Gtk::WIN_POS_MOUSE);
|
||||
win.realize ();
|
||||
win.get_window().set_decorations (GdkWMDecoration (GDK_DECOR_BORDER|GDK_DECOR_RESIZEH));
|
||||
win.get_window()->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
|
||||
|
||||
entry.grab_focus ();
|
||||
|
||||
|
@ -4503,9 +4490,9 @@ Editor::edit_xfade (Crossfade* xfade)
|
|||
|
||||
ensure_float (cew);
|
||||
|
||||
cew.ok_button.signal_clicked().connect (bind (slot (cew, &ArdourDialog::stop), 1));
|
||||
cew.cancel_button.signal_clicked().connect (bind (slot (cew, &ArdourDialog::stop), 0));
|
||||
cew.signal_delete_event().connect (slot (cew, &ArdourDialog::wm_doi_event_stop));
|
||||
cew.ok_button.signal_clicked().connect (bind (mem_fun (cew, &ArdourDialog::stop), 1));
|
||||
cew.cancel_button.signal_clicked().connect (bind (mem_fun (cew, &ArdourDialog::stop), 0));
|
||||
cew.signal_delete_event().connect (mem_fun (cew, &ArdourDialog::wm_doi_event_stop));
|
||||
|
||||
cew.run ();
|
||||
|
||||
|
@ -4565,15 +4552,15 @@ Editor::playlist_deletion_dialog (Playlist* pl)
|
|||
vbox.pack_start (button_box);
|
||||
|
||||
dialog.add (vbox);
|
||||
dialog.set_position (GTK_WIN_POS_CENTER);
|
||||
dialog.set_position (Gtk::WIN_POS_CENTER);
|
||||
dialog.show_all ();
|
||||
|
||||
del_button.signal_clicked().connect (bind (slot (dialog, &ArdourDialog::stop), 0));
|
||||
keep_button.signal_clicked().connect (bind (slot (dialog, &ArdourDialog::stop), 1));
|
||||
abort_button.signal_clicked().connect (bind (slot (dialog, &ArdourDialog::stop), 2));
|
||||
del_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 0));
|
||||
keep_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 1));
|
||||
abort_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 2));
|
||||
|
||||
dialog.realize ();
|
||||
dialog.get_window().set_decorations (GdkWMDecoration (GDK_DECOR_BORDER|GDK_DECOR_RESIZEH));
|
||||
dialog.get_window()->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
|
||||
|
||||
dialog.run ();
|
||||
|
||||
|
|
|
@ -147,9 +147,9 @@ class Editor : public PublicEditor
|
|||
TimeAxisView* get_named_time_axis(std::string name) ;
|
||||
/* </CMT Additions> */
|
||||
|
||||
/* public access to auditioning */
|
||||
|
||||
bool consider_auditioning (ARDOUR::AudioRegion*);
|
||||
void consider_auditioning (ARDOUR::Region&);
|
||||
void hide_a_region (ARDOUR::Region&);
|
||||
void remove_a_region (ARDOUR::Region&);
|
||||
|
||||
/* option editor-access */
|
||||
|
||||
|
@ -712,23 +712,35 @@ class Editor : public PublicEditor
|
|||
bool no_zoom_repos_update;
|
||||
bool no_tempo_map_update;
|
||||
|
||||
Gtk::TreeView region_list_display;
|
||||
//Gtk::CTree_Helpers::RowList::iterator region_list_hidden_node;
|
||||
struct RegionListDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
|
||||
RegionListDisplayModelColumns() {
|
||||
add (name);
|
||||
add (region);
|
||||
}
|
||||
Gtk::TreeModelColumn<Glib::ustring> name;
|
||||
Gtk::TreeModelColumn<ARDOUR::Region*> region;
|
||||
};
|
||||
|
||||
RegionListDisplayModelColumns region_list_columns;
|
||||
Gtk::TreeView region_list_display;
|
||||
Glib::RefPtr<Gtk::TreeStore> region_list_model;
|
||||
Glib::RefPtr<Gtk::TreeModelSort> region_list_sort_model;
|
||||
Glib::RefPtr<Gtk::Action> toggle_full_region_list_action;
|
||||
|
||||
void region_list_selection_changed ();
|
||||
|
||||
Gtk::Menu *region_list_menu;
|
||||
vector<Gtk::MenuItem*> rl_context_menu_region_items;
|
||||
Gtk::ScrolledWindow region_list_scroller;
|
||||
Gtk::Frame region_list_frame;
|
||||
|
||||
gint region_list_display_key_press (GdkEventKey *);
|
||||
gint region_list_display_key_release (GdkEventKey *);
|
||||
gint region_list_display_button_press (GdkEventButton *);
|
||||
gint region_list_display_button_release (GdkEventButton *);
|
||||
gint region_list_display_enter_notify (GdkEventCrossing *);
|
||||
gint region_list_display_leave_notify (GdkEventCrossing *);
|
||||
void region_list_display_selected (gint row, gint col, GdkEvent* ev);
|
||||
void region_list_display_unselected (gint row, gint col, GdkEvent* ev);
|
||||
void region_list_column_click (gint);
|
||||
bool region_list_display_key_press (GdkEventKey *);
|
||||
bool region_list_display_key_release (GdkEventKey *);
|
||||
bool region_list_display_button_press (GdkEventButton *);
|
||||
bool region_list_display_button_release (GdkEventButton *);
|
||||
bool region_list_display_enter_notify (GdkEventCrossing *);
|
||||
bool region_list_display_leave_notify (GdkEventCrossing *);
|
||||
void region_list_clear ();
|
||||
void region_list_selection_mapover (sigc::slot<void,ARDOUR::Region&>);
|
||||
void build_region_list_menu ();
|
||||
|
||||
Gtk::CheckMenuItem* toggle_auto_regions_item;
|
||||
|
@ -746,8 +758,7 @@ class Editor : public PublicEditor
|
|||
void toggle_full_region_list ();
|
||||
void toggle_show_auto_regions ();
|
||||
|
||||
static gint _region_list_sorter (GtkTreeView*, gconstpointer, gconstpointer);
|
||||
gint region_list_sorter (gconstpointer, gconstpointer);
|
||||
int region_list_sorter (Gtk::TreeModel::iterator, Gtk::TreeModel::iterator);
|
||||
|
||||
/* named selections */
|
||||
|
||||
|
@ -870,9 +881,7 @@ class Editor : public PublicEditor
|
|||
void normalize_region ();
|
||||
void denormalize_region ();
|
||||
|
||||
ARDOUR::Region* region_list_button_region;
|
||||
void audition_region_from_region_list ();
|
||||
void remove_region_from_region_list ();
|
||||
void hide_region_from_region_list ();
|
||||
void remove_selected_regions_from_region_list ();
|
||||
|
||||
|
@ -919,10 +928,6 @@ class Editor : public PublicEditor
|
|||
void amplitude_zoom (gdouble scale);
|
||||
void amplitude_zoom_step (bool in);
|
||||
|
||||
ARDOUR::AudioRegion* region_list_display_drag_region;
|
||||
char need_wave_cursor;
|
||||
gint region_list_display_motion (GdkEventMotion*);
|
||||
|
||||
void insert_region_list_drag (ARDOUR::AudioRegion&);
|
||||
void insert_region_list_selection (float times);
|
||||
|
||||
|
@ -1819,6 +1824,12 @@ class Editor : public PublicEditor
|
|||
|
||||
typedef std::map<Editing::ColorID,std::string> ColorStyleMap;
|
||||
void init_colormap ();
|
||||
|
||||
/* GTK2 stuff */
|
||||
|
||||
Glib::RefPtr<Gtk::UIManager> ui_manager;
|
||||
vector<Glib::RefPtr<Gtk::Action> > session_requiring_actions;
|
||||
vector<Glib::RefPtr<Gtk::Action> > region_list_selection_requiring_actions;
|
||||
};
|
||||
|
||||
#endif /* __ardour_editor_h__ */
|
||||
|
|
193
gtk2_ardour/editor_actions.cc
Normal file
193
gtk2_ardour/editor_actions.cc
Normal file
|
@ -0,0 +1,193 @@
|
|||
void
|
||||
Editor::register_actions ()
|
||||
{
|
||||
/* add named actions for the editor */
|
||||
|
||||
Glib::RefPtr<ActionGroup> region_list_actions = ActionGroup::create ("Editor");
|
||||
|
||||
add_action ("toggle-xfades-active", mem_fun(*this, &Editor::toggle_xfades_active));
|
||||
|
||||
add_action ("playhead-to-next-region-start", bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (Start)));
|
||||
add_action ("playhead-to-next-region-end", bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (End)));
|
||||
add_action ("playhead-to-next-region-sync", bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (SyncPoint)));
|
||||
|
||||
add_action ("playhead-to-previous-region-start", bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (Start)));
|
||||
add_action ("playhead-to-previous-region-end", bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (End)));
|
||||
add_action ("playhead-to-previous-region-sync", bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (SyncPoint)));
|
||||
|
||||
add_action ("edit-cursor-to-next-region-start", bind (mem_fun(*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (Start)));
|
||||
add_action ("edit-cursor-to-next-region-end", bind (mem_fun(*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (End)));
|
||||
add_action ("edit-cursor-to-next-region-sync", bind (mem_fun(*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (SyncPoint)));
|
||||
|
||||
add_action ("edit-cursor-to-previous-region-start", bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (Start)));
|
||||
add_action ("edit-cursor-to-previous-region-end", bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (End)));
|
||||
add_action ("edit-cursor-to-previous-region-sync", bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (SyncPoint)));
|
||||
|
||||
add_action ("playhead-to-range-start", bind (mem_fun(*this, &Editor::cursor_to_selection_start), playhead_cursor));
|
||||
add_action ("playhead-to-range-end", bind (mem_fun(*this, &Editor::cursor_to_selection_end), playhead_cursor));
|
||||
|
||||
add_action ("edit-cursor-to-range-start", bind (mem_fun(*this, &Editor::cursor_to_selection_start), edit_cursor));
|
||||
add_action ("edit-cursor-to-range-end", bind (mem_fun(*this, &Editor::cursor_to_selection_end), edit_cursor));
|
||||
|
||||
add_action ("jump-forward-to-mark", mem_fun(*this, &Editor::jump_forward_to_mark));
|
||||
add_action ("jump-backward-to-mark", mem_fun(*this, &Editor::jump_backward_to_mark));
|
||||
add_action ("add-location-from-playhead", mem_fun(*this, &Editor::add_location_from_playhead_cursor));
|
||||
|
||||
add_action ("nudge-forward", bind (mem_fun(*this, &Editor::nudge_forward), false));
|
||||
add_action ("nudge-next-forward", bind (mem_fun(*this, &Editor::nudge_forward), true));
|
||||
add_action ("nudge-backward", bind (mem_fun(*this, &Editor::nudge_backward), false));
|
||||
add_action ("nudge-next-backward", bind (mem_fun(*this, &Editor::nudge_backward), true));
|
||||
|
||||
add_action ("toggle-playback", bind (mem_fun(*this, &Editor::toggle_playback), false));
|
||||
add_action ("toggle-playback-forget-capture", bind (mem_fun(*this, &Editor::toggle_playback), true));
|
||||
|
||||
add_action ("toggle-loop-playback", mem_fun(*this, &Editor::toggle_loop_playback));
|
||||
|
||||
add_action ("temporal-zoom-out", bind (mem_fun(*this, &Editor::temporal_zoom_step), true));
|
||||
add_action ("temporal-zoom-in", bind (mem_fun(*this, &Editor::temporal_zoom_step), false));
|
||||
add_action ("zoom-to-session", mem_fun(*this, &Editor::temporal_zoom_session));
|
||||
|
||||
add_action ("scroll-tracks-up", mem_fun(*this, &Editor::scroll_tracks_up));
|
||||
add_action ("scroll-tracks-down", mem_fun(*this, &Editor::scroll_tracks_down));
|
||||
add_action ("step-tracks-up", mem_fun(*this, &Editor::scroll_tracks_up_line));
|
||||
add_action ("step-tracks-down", mem_fun(*this, &Editor::scroll_tracks_down_line));
|
||||
|
||||
add_action ("scroll-backward", bind (mem_fun(*this, &Editor::scroll_backward), 0.8f));
|
||||
add_action ("scroll-forward", bind (mem_fun(*this, &Editor::scroll_forward), 0.8f));
|
||||
add_action ("goto", mem_fun(*this, &Editor::goto_frame));
|
||||
add_action ("center-playhead", mem_fun(*this, &Editor::center_playhead));
|
||||
add_action ("center-edit_cursor", mem_fun(*this, &Editor::center_edit_cursor));
|
||||
add_action ("playhead-forward", mem_fun(*this, &Editor::playhead_forward));
|
||||
add_action ("playhead-backward", mem_fun(*this, &Editor::playhead_backward));
|
||||
add_action ("playhead-to-edit", bind (mem_fun(*this, &Editor::cursor_align), true));
|
||||
add_action ("edit-to-playhead", bind (mem_fun(*this, &Editor::cursor_align), false));
|
||||
|
||||
add_action ("align-regions-start", bind (mem_fun(*this, &Editor::align), ARDOUR::Start));
|
||||
add_action ("align-regions-start-relative", bind (mem_fun(*this, &Editor::align_relative), ARDOUR::Start));
|
||||
add_action ("align-regions-end", bind (mem_fun(*this, &Editor::align), ARDOUR::End));
|
||||
add_action ("align-regions-end-relative", bind (mem_fun(*this, &Editor::align_relative), ARDOUR::End));
|
||||
add_action ("align-regions-sync", bind (mem_fun(*this, &Editor::align), ARDOUR::SyncPoint));
|
||||
add_action ("align-regions-sync-relative", bind (mem_fun(*this, &Editor::align_relative), ARDOUR::SyncPoint));
|
||||
|
||||
add_action ("set-playhead", mem_fun(*this, &Editor::kbd_set_playhead_cursor));
|
||||
add_action ("set-edit-cursor", mem_fun(*this, &Editor::kbd_set_edit_cursor));
|
||||
|
||||
add_action ("set-mouse-mode-object", bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseObject, false));
|
||||
add_action ("set-mouse-mode-range", bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseRange, false));
|
||||
add_action ("set-mouse-mode-gain", bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseGain, false));
|
||||
add_action ("set-mouse-mode-zoom", bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseZoom, false));
|
||||
add_action ("set-mouse-mode-timefx", bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseTimeFX, false));
|
||||
|
||||
add_action ("set-undo", bind (mem_fun(*this, &Editor::undo), 1U));
|
||||
add_action ("set-redo", bind (mem_fun(*this, &Editor::redo), 1U));
|
||||
|
||||
add_action ("export-session", mem_fun(*this, &Editor::export_session));
|
||||
add_action ("export-range", mem_fun(*this, &Editor::export_selection));
|
||||
|
||||
add_action ("editor-cut", mem_fun(*this, &Editor::cut));
|
||||
add_action ("editor-copy", mem_fun(*this, &Editor::copy));
|
||||
add_action ("editor-paste", mem_fun(*this, &Editor::keyboard_paste));
|
||||
add_action ("duplicate-region", mem_fun(*this, &Editor::keyboard_duplicate_region));
|
||||
add_action ("duplicate-range", mem_fun(*this, &Editor::keyboard_duplicate_selection));
|
||||
add_action ("insert-region", mem_fun(*this, &Editor::keyboard_insert_region_list_selection));
|
||||
add_action ("reverse-region", mem_fun(*this, &Editor::reverse_region));
|
||||
add_action ("normalize-region", mem_fun(*this, &Editor::normalize_region));
|
||||
add_action ("editor-crop", mem_fun(*this, &Editor::crop_region_to_selection));
|
||||
add_action ("insert-chunk", bind (mem_fun(*this, &Editor::paste_named_selection), 1.0f));
|
||||
|
||||
add_action ("split-at-edit-cursor", mem_fun(*this, &Editor::split_region));
|
||||
add_action ("split-at-mouse", mem_fun(*this, &Editor::kbd_split));
|
||||
|
||||
add_action ("brush-at-mouse", mem_fun(*this, &Editor::kbd_brush));
|
||||
add_action ("audition-at-mouse", mem_fun(*this, &Editor::kbd_audition));
|
||||
|
||||
add_action ("start-range", mem_fun(*this, &Editor::keyboard_selection_begin));
|
||||
add_action ("finish-range", bind (mem_fun(*this, &Editor::keyboard_selection_finish), false));
|
||||
add_action ("finish-add-range", bind (mem_fun(*this, &Editor::keyboard_selection_finish), true));
|
||||
|
||||
add_action ("extend-range-to-end-of-region", bind (mem_fun(*this, &Editor::extend_selection_to_end_of_region), false));
|
||||
add_action ("extend-range-to-start-of-region", bind (mem_fun(*this, &Editor::extend_selection_to_start_of_region), false));
|
||||
|
||||
add_action ("toggle-follow-playhead", (mem_fun(*this, &Editor::toggle_follow_playhead)));
|
||||
add_action ("remove-last-capture", (mem_fun(*this, &Editor::remove_last_capture)));
|
||||
|
||||
Glib::RefPtr<ActionGroup> region_list_actions = ActionGroup::create ("Zoom");
|
||||
RadioAction::Group snap_choice_group;
|
||||
|
||||
add_action ("zoom-focus-left", bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusLeft));
|
||||
add_action ("zoom-focus-right", bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusRight));
|
||||
add_action ("zoom-focus-center", bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusCenter));
|
||||
add_action ("zoom-focus-playhead", bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusPlayhead));
|
||||
add_action ("zoom-focus-edit", bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusEdit));
|
||||
|
||||
Glib::RefPtr<ActionGroup> snap_actions = ActionGroup::create ("Snap");
|
||||
RadioAction::Group snap_choice_group;
|
||||
|
||||
add_action ("snap-to-frame", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToFrame)));
|
||||
add_action ("snap-to-cd-frame", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToCDFrame)));
|
||||
add_action ("snap-to-smpte-frame", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTEFrame)));
|
||||
add_action ("snap-to-smpte-seconds", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTESeconds)));
|
||||
add_action ("snap-to-smpte-minutes", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTEMinutes)));
|
||||
add_action ("snap-to-seconds", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSeconds)));
|
||||
add_action ("snap-to-minutes", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToMinutes)));
|
||||
add_action ("snap-to-thirtyseconds", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAThirtysecondBeat)));
|
||||
add_action ("snap-to-asixteenthbeat", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToASixteenthBeat)));
|
||||
add_action ("snap-to-eighths", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAEighthBeat)));
|
||||
add_action ("snap-to-quarters", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAQuarterBeat)));
|
||||
add_action ("snap-to-thirds", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAThirdBeat)));
|
||||
add_action ("snap-to-beat", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToBeat)));
|
||||
add_action ("snap-to-bar", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToBar)));
|
||||
add_action ("snap-to-mark", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToMark)));
|
||||
add_action ("snap-to-edit-cursor", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToEditCursor)));
|
||||
add_action ("snap-to-region-start", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionStart)));
|
||||
add_action ("snap-to-region-end", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionEnd)));
|
||||
add_action ("snap-to-region-sync", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionSync)));
|
||||
add_action ("snap-to-region-boundary", (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionBoundary)));
|
||||
|
||||
/* REGION LIST */
|
||||
|
||||
Glib::RefPtr<ActionGroup> region_list_actions = ActionGroup::create ("RegionList");
|
||||
RadioAction::Group sort_order_group;
|
||||
RadioAction::Group sort_order_group;
|
||||
|
||||
region_list_actions->add (Action::create (X_("rlAudition"), _("Audition")), mem_fun(*this, &Editor::audition_region_from_region_list));
|
||||
region_list_actions->add (Action::create (X_("rlHide"), _("Hide")), mem_fun(*this, &Editor::hide_region_from_region_list));
|
||||
region_list_actions->add (Action::create (X_("rlRemove"), _("Remove")), mem_fun(*this, &Editor::remove_region_from_region_list));
|
||||
|
||||
region_list_actions->add (ToggleAction::create (X_("rlShowAll"), _("Show all")), mem_fun(*this, &Editor::toggle_full_region_list));
|
||||
|
||||
region_list_actions->add (RadioAction::create (sort_order_group, X_("SortAscending"), _("Ascending")),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_direction), true));
|
||||
region_list_actions->add (RadioAction::create (sort_order_group, X_("SortDescending"), _("Descending"),),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_direction), false));
|
||||
|
||||
region_list_actions->add (RadioAction::create (sort_type_group, X_("SortByRegionName"), _("By Region Name")),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByName));
|
||||
region_list_actions->add (RadioAction::create (sort_type_group, X_("SortByRegionLength"), _("By Region Length")),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByLength));
|
||||
region_list_actions->add (RadioAction::create (sort_type_group, X_("SortByRegionPosition"), _("By Region Position")),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByPosition));
|
||||
region_list_actions->add (RadioAction::create (sort_type_group, X_("SortByRegionTimestamp"), _("By Region Timestamp")),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByTimestamp));
|
||||
region_list_actions->add (RadioAction::create (sort_type_group, X_("SortByRegionStartinFile"), _("By Region Start in File")),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByStartInFile));
|
||||
region_list_actions->add (RadioAction::create (sort_type_group, X_("SortByRegionEndinFile"), _("By Region End in File")),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByEndInFile));
|
||||
region_list_actions->add (RadioAction::create (sort_type_group, X_("SortBySourceFileName"), _("By Source File Name")),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileName));
|
||||
region_list_actions->add (RadioAction::create (sort_type_group, X_("SortBySourceFileLength"), _("By Source File Length")),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileLength));
|
||||
region_list_actions->add (RadioAction::create (sort_type_group, X_("SortBySourceFileCreationDate"), _("By Source File Creation Date")),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileCreationDate));
|
||||
region_list_actions->add (RadioAction::create (sort_type_group, X_("SortBySourceFilesystem"), _("By Source Filesystem")),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileFS));
|
||||
|
||||
region_list_actions->add (Action::create (X_("rlEmbedAudio"), _("Embed audio (link)")), mem_fun(*this, &Editor::embed_audio));
|
||||
region_list_actions->add (Action::create (X_("rlImportAudio"), _("Embed audio (link)")), bind (mem_fun(*this, &Editor::import_audio), false));
|
||||
|
||||
/* now add them all */
|
||||
|
||||
ui_manager->insert_action_group (region_list_actions);
|
||||
ui_manager->insert_action_group (snap_actions);
|
||||
ui_manager->insert_action_group (editor_actions);
|
||||
}
|
|
@ -64,13 +64,13 @@ Editor::hscroll_slider_expose (GdkEventExpose *ev)
|
|||
|
||||
/* make sure we can see the bar at all times, and have enough to do zoom-trim on */
|
||||
|
||||
bar_rect.width = max ((guint16) (edit_hscroll_edge_width+5), bar_rect.width);
|
||||
bar_rect.width = max ((guint16) (edit_hscroll_edge_width+5), (guint16) bar_rect.width);
|
||||
|
||||
gdk_rectangle_intersect (&ev->area, &bar_rect, &draw_rect);
|
||||
|
||||
gtk_paint_box (edit_hscroll_slider.get_style()->gobj(),
|
||||
edit_hscroll_slider.get_window(),
|
||||
GTK_STATE_ACTIVE,
|
||||
edit_hscroll_slider.get_window()->gobj(),
|
||||
Gtk::STATE_ACTIVE,
|
||||
Gtk::SHADOW_IN,
|
||||
&ev->area,
|
||||
GTK_WIDGET(edit_hscroll_slider.gobj()),
|
||||
|
@ -78,7 +78,7 @@ Editor::hscroll_slider_expose (GdkEventExpose *ev)
|
|||
0, 0, -1, -1);
|
||||
|
||||
gtk_paint_box (edit_hscroll_slider.get_style()->gobj(),
|
||||
edit_hscroll_slider.get_window(),
|
||||
edit_hscroll_slider.get_window()->gobj(),
|
||||
Gtk::STATE_NORMAL,
|
||||
Gtk::SHADOW_OUT,
|
||||
&draw_rect,
|
||||
|
@ -174,14 +174,14 @@ gint
|
|||
Editor::hscroll_slider_motion (GdkEventMotion *ev)
|
||||
{
|
||||
gint x, y;
|
||||
GdkModifierType state;
|
||||
Gdk::ModifierType state;
|
||||
gint bar_max = edit_hscroll_slider_width - 2;
|
||||
|
||||
if (!session || !edit_hscroll_dragging) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
edit_hscroll_slider.get_window().get_pointer (x, y, state);
|
||||
edit_hscroll_slider.get_window()->get_pointer (x, y, state);
|
||||
|
||||
jack_nframes_t new_frame;
|
||||
jack_nframes_t frames;
|
||||
|
|
|
@ -162,7 +162,7 @@ Editor::_canvas_imageframe_start_handle_event(GnomeCanvasItem *item, GdkEvent *e
|
|||
{
|
||||
ImageFrameView* ifv = (ImageFrameView*) data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&ifv->get_time_axis_view().editor);
|
||||
return editor->signal_canvas_imageframe_start_handle_event()(item,event,ifv);
|
||||
return editor->canvas_imageframe_start_handle_event(item,event,ifv);
|
||||
}
|
||||
|
||||
gint
|
||||
|
@ -170,7 +170,7 @@ Editor::_canvas_imageframe_end_handle_event(GnomeCanvasItem *item, GdkEvent *eve
|
|||
{
|
||||
ImageFrameView* ifv = (ImageFrameView*) data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&ifv->get_time_axis_view().editor);
|
||||
return editor->signal_canvas_imageframe_end_handle_event()(item,event,ifv);
|
||||
return editor->canvas_imageframe_end_handle_event(item,event,ifv);
|
||||
}
|
||||
|
||||
|
||||
|
@ -179,7 +179,7 @@ Editor::_canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent* even
|
|||
{
|
||||
ImageFrameView *ifv = (ImageFrameView *) data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&ifv->get_time_axis_view().editor);
|
||||
return editor->signal_canvas_imageframe_item_view_event() (item, event, ifv) ;
|
||||
return editor->canvas_imageframe_item_view_event (item, event, ifv) ;
|
||||
}
|
||||
|
||||
gint
|
||||
|
@ -187,7 +187,7 @@ Editor::_canvas_imageframe_view_event(GnomeCanvasItem *item, GdkEvent* event, gp
|
|||
{
|
||||
ImageFrameTimeAxis *ifta = (ImageFrameTimeAxis*) data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&ifta->editor);
|
||||
return editor->signal_canvas_imageframe_view_event() (item, event, ifta);
|
||||
return editor->canvas_imageframe_view_event (item, event, ifta);
|
||||
}
|
||||
|
||||
gint
|
||||
|
@ -195,7 +195,7 @@ Editor::_canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* eve
|
|||
{
|
||||
MarkerTimeAxis* mta = (MarkerTimeAxis*)data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&mta->editor);
|
||||
return editor->signal_canvas_marker_time_axis_view_event()(item,event,mta);
|
||||
return editor->canvas_marker_time_axis_view_event(item,event,mta);
|
||||
}
|
||||
|
||||
gint
|
||||
|
@ -203,7 +203,7 @@ Editor::_canvas_markerview_item_view_event(GnomeCanvasItem *item, GdkEvent* even
|
|||
{
|
||||
MarkerView* mv = (MarkerView*) data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&mv->get_time_axis_view().editor);
|
||||
return editor->signal_canvas_markerview_item_view_event()(item,event,mv);
|
||||
return editor->canvas_markerview_item_view_event(item,event,mv);
|
||||
}
|
||||
|
||||
gint
|
||||
|
@ -211,7 +211,7 @@ Editor::_canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* e
|
|||
{
|
||||
MarkerView* mv = (MarkerView*)data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&mv->get_time_axis_view().editor);
|
||||
return editor->signal_canvas_markerview_start_handle_event()(item,event,mv);
|
||||
return editor->canvas_markerview_start_handle_event(item,event,mv);
|
||||
}
|
||||
|
||||
gint
|
||||
|
@ -219,7 +219,7 @@ Editor::_canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* eve
|
|||
{
|
||||
MarkerView* mv = (MarkerView*)data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&mv->get_time_axis_view().editor);
|
||||
return editor->signal_canvas_markerview_end_handle_event()(item,event,mv);
|
||||
return editor->canvas_markerview_end_handle_event(item,event,mv);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -31,14 +31,14 @@ Editor::kbd_driver (sigc::slot<void,GdkEvent*> theslot, bool use_track_canvas, b
|
|||
double dx, dy;
|
||||
GdkEvent ev;
|
||||
GdkModifierType mask;
|
||||
Gdk_Window evw (track_canvas->get_window().get_pointer (x, y, mask));
|
||||
GdkWindow evw (track_canvas->get_window().get_pointer (x, y, mask));
|
||||
bool doit = false;
|
||||
|
||||
if (use_track_canvas && gdk_window_get_pointer (track_canvas_event_box.get_window(),
|
||||
if (use_track_canvas && gdk_window_get_pointer (track_canvas_event_box.get_window()->gobj(),
|
||||
&x, &y, &mask)) {
|
||||
doit = true;
|
||||
|
||||
} else if (use_time_canvas && gdk_window_get_pointer (time_canvas_event_box.get_window(),
|
||||
} else if (use_time_canvas && gdk_window_get_pointer (time_canvas_event_box.get_window()->gobj(),
|
||||
&x, &y, &mask)) {
|
||||
doit = true;
|
||||
}
|
||||
|
|
|
@ -257,7 +257,6 @@ Editor::session_going_away ()
|
|||
last_update_frame = 0;
|
||||
drag_info.item = 0;
|
||||
last_audition_region = 0;
|
||||
region_list_button_region = 0;
|
||||
|
||||
/* hide all tracks */
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "keyboard.h"
|
||||
#include "editing.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "extra_bind.h"
|
||||
|
||||
#include <ardour/types.h>
|
||||
#include <ardour/route.h>
|
||||
|
@ -243,7 +242,7 @@ Editor::set_mouse_mode (MouseMode m, bool force)
|
|||
ignore_mouse_mode_toggle = false;
|
||||
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), current_canvas_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), current_canvas_cursor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -999,7 +998,7 @@ Editor::button_release_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType
|
|||
case MouseObject:
|
||||
switch (item_type) {
|
||||
case AutomationTrackItem:
|
||||
dynamic_cast<AutomationTimeAxisView*>(clicked_trackview)->signal_add_automation_event()
|
||||
dynamic_cast<AutomationTimeAxisView*>(clicked_trackview)->add_automation_event
|
||||
(item,
|
||||
event,
|
||||
where,
|
||||
|
@ -1015,7 +1014,7 @@ Editor::button_release_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType
|
|||
case MouseGain:
|
||||
switch (item_type) {
|
||||
case RegionItem:
|
||||
clicked_regionview->signal_add_gain_point_event() (item, event);
|
||||
clicked_regionview->add_gain_point_event (item, event);
|
||||
return TRUE;
|
||||
break;
|
||||
|
||||
|
@ -1142,7 +1141,7 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
show_verbose_canvas_cursor ();
|
||||
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), fader_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), fader_cursor);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1166,7 +1165,7 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
show_verbose_canvas_cursor ();
|
||||
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), fader_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), fader_cursor);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1174,7 +1173,7 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
if (mouse_mode == MouseGain) {
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", color_map[cEnteredGainLine], NULL);
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), fader_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), fader_cursor);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1184,13 +1183,13 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
case PanAutomationLineItem:
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", color_map[cEnteredAutomationLine], NULL);
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), fader_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), fader_cursor);
|
||||
}
|
||||
break;
|
||||
|
||||
case AudioRegionViewNameHighlight:
|
||||
if (is_drawable() && mouse_mode == MouseObject) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), trimmer_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), trimmer_cursor);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1204,14 +1203,14 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
/* </CMT Additions> */
|
||||
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), trimmer_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), trimmer_cursor);
|
||||
}
|
||||
break;
|
||||
|
||||
case EditCursorItem:
|
||||
case PlayheadCursorItem:
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), grabber_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), grabber_cursor);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1221,7 +1220,7 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
|
||||
if (!reinterpret_cast<AudioRegionView *> (gtk_object_get_data(GTK_OBJECT(item), "regionview"))->name_active()) {
|
||||
if (mouse_mode == MouseObject && is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), trimmer_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), trimmer_cursor);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1242,7 +1241,7 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
break;
|
||||
}
|
||||
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), cursor);
|
||||
|
||||
AutomationTimeAxisView* atv;
|
||||
if ((atv = static_cast<AutomationTimeAxisView*>(gtk_object_get_data(GTK_OBJECT(item), "trackview"))) != 0) {
|
||||
|
@ -1258,7 +1257,7 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
case MeterBarItem:
|
||||
case TempoBarItem:
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (time_canvas_scroller.get_window(), timebar_cursor);
|
||||
gdk_window_set_cursor (time_canvas_scroller.get_window()->gobj(), timebar_cursor);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1271,7 +1270,7 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
case MeterMarkerItem:
|
||||
case TempoMarkerItem:
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (time_canvas_scroller.get_window(), timebar_cursor);
|
||||
gdk_window_set_cursor (time_canvas_scroller.get_window()->gobj(), timebar_cursor);
|
||||
}
|
||||
break;
|
||||
case FadeInHandleItem:
|
||||
|
@ -1336,7 +1335,7 @@ Editor::leave_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
}
|
||||
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), current_canvas_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), current_canvas_cursor);
|
||||
}
|
||||
|
||||
hide_verbose_canvas_cursor ();
|
||||
|
@ -1354,7 +1353,7 @@ Editor::leave_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
case MarkerViewHandleEndItem:
|
||||
/* </CMT Additions> */
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), current_canvas_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), current_canvas_cursor);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1365,7 +1364,7 @@ Editor::leave_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
al = reinterpret_cast<AutomationLine*> (gtk_object_get_data (GTK_OBJECT(item),"line"));
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", al->get_line_color(), NULL);
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), current_canvas_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), current_canvas_cursor);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1373,7 +1372,7 @@ Editor::leave_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
/* see enter_handler() for notes */
|
||||
if (!reinterpret_cast<AudioRegionView *> (gtk_object_get_data(GTK_OBJECT(item), "regionview"))->name_active()) {
|
||||
if (is_drawable() && mouse_mode == MouseObject) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), current_canvas_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), current_canvas_cursor);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1384,7 +1383,7 @@ Editor::leave_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
case TempoBarItem:
|
||||
case MarkerBarItem:
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (time_canvas_scroller.get_window(), timebar_cursor);
|
||||
gdk_window_set_cursor (time_canvas_scroller.get_window()->gobj(), timebar_cursor);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1399,7 +1398,7 @@ Editor::leave_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
case TempoMarkerItem:
|
||||
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (time_canvas_scroller.get_window(), timebar_cursor);
|
||||
gdk_window_set_cursor (time_canvas_scroller.get_window()->gobj(), timebar_cursor);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -1412,10 +1411,10 @@ Editor::leave_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
|
||||
case AutomationTrackItem:
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), current_canvas_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), current_canvas_cursor);
|
||||
|
||||
clear_entered_track = true;
|
||||
Main::idle.connect (mem_fun(*this, &Editor::left_automation_track));
|
||||
Glib::signal_idle().connect (mem_fun(*this, &Editor::left_automation_track));
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
#include "streamview.h"
|
||||
#include "regionview.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "extra_bind.h"
|
||||
#include "selection_templates.h"
|
||||
#include "selection.h"
|
||||
#include "library_ui.h"
|
||||
|
@ -1758,7 +1757,7 @@ Editor::rename_region ()
|
|||
|
||||
region_renamed = false;
|
||||
|
||||
entry.activate.connect (bind (mem_fun(*this, &Editor::rename_region_finished), true));
|
||||
entry.signal_activate().connect (bind (mem_fun(*this, &Editor::rename_region_finished), true));
|
||||
ok_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::rename_region_finished), true));
|
||||
cancel_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::rename_region_finished), false));
|
||||
|
||||
|
@ -1822,7 +1821,7 @@ Editor::build_interthread_progress_window ()
|
|||
{
|
||||
interthread_progress_window = new ArdourDialog (X_("interthread progress"));
|
||||
|
||||
interthread_progress_bar.set_orientation (GTK_PROGRESS_LEFT_TO_RIGHT);
|
||||
interthread_progress_bar.set_orientation (Gtk::PROGRESS_LEFT_TO_RIGHT);
|
||||
|
||||
interthread_progress_vbox.set_border_width (10);
|
||||
interthread_progress_vbox.set_spacing (5);
|
||||
|
@ -1878,7 +1877,7 @@ Editor::import_progress_timeout (void *arg)
|
|||
interthread_progress_bar.set_activity_mode (true);
|
||||
return FALSE;
|
||||
} else {
|
||||
interthread_progress_bar.set_percentage (import_status.progress);
|
||||
interthread_progress_bar.set_fraction (import_status.progress/100);
|
||||
}
|
||||
|
||||
return !(import_status.done || import_status.cancel);
|
||||
|
@ -1933,7 +1932,7 @@ Editor::do_import (vector<string> paths, bool split, bool as_tracks)
|
|||
interthread_progress_window->set_title (_("ardour: audio import in progress"));
|
||||
interthread_progress_window->set_position (Gtk::WIN_POS_MOUSE);
|
||||
interthread_progress_window->show_all ();
|
||||
interthread_progress_bar.set_percentage (0.0f);
|
||||
interthread_progress_bar.set_fraction (0.0f);
|
||||
interthread_cancel_label.set_text (_("Cancel Import"));
|
||||
current_interthread_info = &import_status;
|
||||
|
||||
|
@ -1950,7 +1949,7 @@ Editor::do_import (vector<string> paths, bool split, bool as_tracks)
|
|||
import_status.done = 0.0;
|
||||
|
||||
interthread_progress_connection =
|
||||
Gtk::Main::timeout.connect (bind (mem_fun(*this, &Editor::import_progress_timeout), (gpointer) 0), 100);
|
||||
Glib::signal_timeout().connect (bind (mem_fun(*this, &Editor::import_progress_timeout), (gpointer) 0), 100);
|
||||
|
||||
last_audio_region = 0;
|
||||
|
||||
|
@ -2109,7 +2108,7 @@ Editor::embed_sndfile (string path, bool split, bool multiple_files, bool& check
|
|||
}
|
||||
}
|
||||
|
||||
track_canvas_scroller.get_window().set_cursor (GDK_WATCH);
|
||||
track_canvas_scroller.get_window()->set_cursor (GDK_WATCH);
|
||||
ARDOUR_UI::instance()->flush_pending ();
|
||||
|
||||
/* make the proper number of channels in the region */
|
||||
|
@ -2155,7 +2154,7 @@ Editor::embed_sndfile (string path, bool split, bool multiple_files, bool& check
|
|||
}
|
||||
|
||||
out:
|
||||
track_canvas_scroller.get_window().set_cursor (current_canvas_cursor);
|
||||
track_canvas_scroller.get_window()->set_cursor (current_canvas_cursor);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2293,7 +2292,7 @@ Editor::insert_sndfile_into (string path, bool multi, AudioTimeAxisView* tv, jac
|
|||
return;
|
||||
}
|
||||
|
||||
track_canvas_scroller.get_window().set_cursor (GDK_WATCH);
|
||||
track_canvas_scroller.get_window()->set_cursor (GDK_WATCH);
|
||||
ARDOUR_UI::instance()->flush_pending ();
|
||||
|
||||
/* make the proper number of channels in the region */
|
||||
|
@ -2336,7 +2335,7 @@ Editor::insert_sndfile_into (string path, bool multi, AudioTimeAxisView* tv, jac
|
|||
}
|
||||
|
||||
out:
|
||||
track_canvas_scroller.get_window().set_cursor (current_canvas_cursor);
|
||||
track_canvas_scroller.get_window()->set_cursor (current_canvas_cursor);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2889,7 +2888,7 @@ Editor::freeze_thread ()
|
|||
gint
|
||||
Editor::freeze_progress_timeout (void *arg)
|
||||
{
|
||||
interthread_progress_bar.set_percentage (current_interthread_info->progress);
|
||||
interthread_progress_bar.set_fraction (current_interthread_info->progress/100);
|
||||
return !(current_interthread_info->done || current_interthread_info->cancel);
|
||||
}
|
||||
|
||||
|
@ -2915,7 +2914,7 @@ Editor::freeze_route ()
|
|||
current_interthread_info = &itt;
|
||||
|
||||
interthread_progress_connection =
|
||||
Gtk::Main::timeout.connect (bind (mem_fun(*this, &Editor::freeze_progress_timeout), (gpointer) 0), 100);
|
||||
Glib::signal_timeout().connect (bind (mem_fun(*this, &Editor::freeze_progress_timeout), (gpointer) 0), 100);
|
||||
|
||||
itt.done = false;
|
||||
itt.cancel = false;
|
||||
|
@ -2923,7 +2922,7 @@ Editor::freeze_route ()
|
|||
|
||||
pthread_create (&itt.thread, 0, _freeze_thread, this);
|
||||
|
||||
track_canvas_scroller.get_window().set_cursor (GDK_WATCH);
|
||||
track_canvas_scroller.get_window()->set_cursor (GDK_WATCH);
|
||||
|
||||
while (!itt.done && !itt.cancel) {
|
||||
gtk_main_iteration ();
|
||||
|
@ -2932,7 +2931,7 @@ Editor::freeze_route ()
|
|||
interthread_progress_connection.disconnect ();
|
||||
interthread_progress_window->hide_all ();
|
||||
current_interthread_info = 0;
|
||||
track_canvas_scroller.get_window().set_cursor (current_canvas_cursor);
|
||||
track_canvas_scroller.get_window()->set_cursor (current_canvas_cursor);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3462,7 +3461,7 @@ Editor::normalize_region ()
|
|||
|
||||
begin_reversible_command (_("normalize"));
|
||||
|
||||
track_canvas_scroller.get_window().set_cursor (wait_cursor);
|
||||
track_canvas_scroller.get_window()->set_cursor (wait_cursor);
|
||||
gdk_flush ();
|
||||
|
||||
for (AudioRegionSelection::iterator r = selection->audio_regions.begin(); r != selection->audio_regions.end(); ++r) {
|
||||
|
@ -3472,7 +3471,7 @@ Editor::normalize_region ()
|
|||
}
|
||||
|
||||
commit_reversible_command ();
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), current_canvas_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), current_canvas_cursor);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3519,7 +3518,7 @@ Editor::apply_filter (AudioFilter& filter, string command)
|
|||
|
||||
begin_reversible_command (command);
|
||||
|
||||
track_canvas_scroller.get_window().set_cursor (wait_cursor);
|
||||
track_canvas_scroller.get_window()->set_cursor (wait_cursor);
|
||||
gdk_flush ();
|
||||
|
||||
for (AudioRegionSelection::iterator r = selection->audio_regions.begin(); r != selection->audio_regions.end(); ) {
|
||||
|
@ -3548,7 +3547,7 @@ Editor::apply_filter (AudioFilter& filter, string command)
|
|||
selection->audio_regions.clear ();
|
||||
|
||||
out:
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), current_canvas_cursor);
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window()->gobj(), current_canvas_cursor);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2000 Paul Davis
|
||||
Copyright (C) 2000-2005 Paul Davis
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -205,12 +205,8 @@ Editor::region_hidden (Region* r)
|
|||
void
|
||||
Editor::add_audio_region_to_region_display (AudioRegion *region)
|
||||
{
|
||||
using namespace Gtk::CTree_Helpers;
|
||||
|
||||
vector<const char*> item;
|
||||
RowList::iterator i;
|
||||
RowList::iterator tmpi;
|
||||
string str;
|
||||
TreeModel::Row row;
|
||||
|
||||
if (!show_automatic_regions_in_region_list && region->automatic()) {
|
||||
return;
|
||||
|
@ -218,31 +214,25 @@ Editor::add_audio_region_to_region_display (AudioRegion *region)
|
|||
|
||||
if (region->hidden()) {
|
||||
|
||||
if (region_list_hidden_node == region_list_display.rows().end()) {
|
||||
item.clear ();
|
||||
item.push_back (_("hidden"));
|
||||
region_list_hidden_node = region_list_display.rows().insert (region_list_display.rows().end(),
|
||||
Element (item));
|
||||
(*region_list_hidden_node).set_data (0);
|
||||
(*region_list_hidden_node).set_leaf (false);
|
||||
}
|
||||
TreeModel::iterator iter = region_list_model->get_iter (_("/Hidden"));
|
||||
TreeModel::Row parent;
|
||||
TreeModel::Row child;
|
||||
|
||||
item.clear ();
|
||||
if (region->n_channels() > 1) {
|
||||
str = string_compose("%1 [%2]", region->name(), region->n_channels());
|
||||
item.push_back (str.c_str());
|
||||
if (iter == region_list_model->children().end()) {
|
||||
|
||||
parent = *(region_list_model->append());
|
||||
|
||||
parent[region_list_columns.name] = _("Hidden");
|
||||
parent[region_list_columns.region] = 0;
|
||||
} else {
|
||||
item.push_back (region->name().c_str());
|
||||
parent = *iter;
|
||||
}
|
||||
|
||||
tmpi = region_list_hidden_node->subtree().insert (region_list_hidden_node->subtree().end(),
|
||||
Element (item));
|
||||
(*tmpi).set_data (region);
|
||||
return;
|
||||
row = *(region_list_model->append (parent.children()));
|
||||
|
||||
} else if (region->whole_file()) {
|
||||
|
||||
item.clear ();
|
||||
TreeModel::Row row = *(region_list_model->append());
|
||||
|
||||
if (region->source().name()[0] == '/') { // external file
|
||||
|
||||
|
@ -259,13 +249,8 @@ Editor::add_audio_region_to_region_display (AudioRegion *region)
|
|||
|
||||
}
|
||||
|
||||
item.push_back (str.c_str());
|
||||
|
||||
tmpi = region_list_display.rows().insert (region_list_display.rows().end(),
|
||||
Element (item));
|
||||
|
||||
(*tmpi).set_data (region);
|
||||
(*tmpi).set_leaf (false);
|
||||
row[region_list_columns.name] = str;
|
||||
row[region_list_columns.region] = region;
|
||||
|
||||
return;
|
||||
|
||||
|
@ -273,45 +258,57 @@ Editor::add_audio_region_to_region_display (AudioRegion *region)
|
|||
|
||||
/* find parent node, add as new child */
|
||||
|
||||
for (i = region_list_display.rows().begin(); i != region_list_display.rows().end(); ++i) {
|
||||
TreeModel::iterator i;
|
||||
TreeModel::Children rows = region_list_model->children();
|
||||
|
||||
AudioRegion* r = static_cast<AudioRegion*> ((*i).get_data());
|
||||
for (i = rows.begin(); i != rows.end(); ++i) {
|
||||
|
||||
Region* rr = (*i)[region_list_columns.region];
|
||||
AudioRegion* r = dynamic_cast<AudioRegion*>(rr);
|
||||
|
||||
if (r && r->whole_file()) {
|
||||
|
||||
if (region->source_equivalent (*r)) {
|
||||
|
||||
item.clear ();
|
||||
|
||||
if (region->n_channels() > 1) {
|
||||
str = string_compose("%1 [%2]", region->name(), region->n_channels());
|
||||
item.push_back (str.c_str());
|
||||
} else {
|
||||
item.push_back (region->name().c_str());
|
||||
}
|
||||
|
||||
|
||||
tmpi = i->subtree().insert (i->subtree().end(), Element (item));
|
||||
(*tmpi).set_data (region);
|
||||
|
||||
return;
|
||||
row = *(region_list_model->append ((*i).children()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (i == rows.end()) {
|
||||
TreeModel::Row row = *(region_list_model->append());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
item.clear ();
|
||||
row[region_list_columns.region] = region;
|
||||
|
||||
if (region->n_channels() > 1) {
|
||||
str = string_compose("%1 [%2]", region->name(), region->n_channels());
|
||||
item.push_back (str.c_str());
|
||||
row[region_list_columns.name] = string_compose("%1 [%2]", region->name(), region->n_channels());
|
||||
} else {
|
||||
item.push_back (region->name().c_str());
|
||||
row[region_list_columns.name] = region->name();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::region_list_selection_changed()
|
||||
{
|
||||
bool sensitive;
|
||||
|
||||
if (region_list_display.get_selection()->count_selected_rows() > 0) {
|
||||
sensitive = true;
|
||||
} else {
|
||||
sensitive = false;
|
||||
}
|
||||
|
||||
tmpi = region_list_display.rows().insert (region_list_display.rows().end(), Element (item));
|
||||
(*tmpi).set_data (region);
|
||||
(*tmpi).set_leaf (true);
|
||||
for (vector<Glib::RefPtr<Gtk::Action> >::iterator i = region_list_selection_requiring_actions.begin(); i != region_list_selection_requiring_actions.end(); ++i) {
|
||||
(*i)->set_sensitive (sensitive);
|
||||
}
|
||||
|
||||
// GTK2FIX
|
||||
// set_selected_regionview_from_region_list (*region, false);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -330,9 +327,9 @@ void
|
|||
Editor::redisplay_regions ()
|
||||
{
|
||||
if (session) {
|
||||
region_list_display.freeze ();
|
||||
region_list_clear ();
|
||||
region_list_hidden_node = region_list_display.rows().end();
|
||||
|
||||
region_list_display.set_model (Glib::RefPtr<Gtk::TreeStore>(0));
|
||||
region_list_model.clear ();
|
||||
|
||||
/* now add everything we have, via a temporary list used to help with
|
||||
sorting.
|
||||
|
@ -345,120 +342,31 @@ Editor::redisplay_regions ()
|
|||
add_audio_region_to_region_display (*r);
|
||||
}
|
||||
|
||||
region_list_display.sort ();
|
||||
region_list_display.thaw ();
|
||||
region_list_display.set_model (region_list_sort_model);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::region_list_clear ()
|
||||
{
|
||||
/* ---------------------------------------- */
|
||||
/* XXX MAKE ME A FUNCTION (no CTree::clear() in gtkmm 1.2) */
|
||||
|
||||
gtk_ctree_remove_node (region_list_display.gobj(), NULL);
|
||||
|
||||
/* ---------------------------------------- */
|
||||
}
|
||||
|
||||
void
|
||||
Editor::region_list_column_click (gint col)
|
||||
{
|
||||
bool sensitive;
|
||||
|
||||
if (region_list_menu == 0) {
|
||||
build_region_list_menu ();
|
||||
}
|
||||
|
||||
if (region_list_display.selection().size() != 0) {
|
||||
sensitive = true;
|
||||
} else {
|
||||
sensitive = false;
|
||||
}
|
||||
|
||||
for (vector<MenuItem*>::iterator i = rl_context_menu_region_items.begin(); i != rl_context_menu_region_items.end(); ++i) {
|
||||
(*i)->set_sensitive (sensitive);
|
||||
}
|
||||
|
||||
region_list_menu->popup (0, 0);
|
||||
region_list_model->clear();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::build_region_list_menu ()
|
||||
{
|
||||
using namespace Gtk::Menu_Helpers;
|
||||
region_list_menu = dynamic_cast<Menu*>(ui_manager->get_widget ("/RegionListMenu"));
|
||||
|
||||
/* now grab specific menu items that we need */
|
||||
|
||||
region_list_menu = new Menu;
|
||||
toggle_full_region_list_action = ui_manager->get_action ("<Actions>/RegionList/rlShowAll");
|
||||
|
||||
MenuList& items = region_list_menu->items();
|
||||
region_list_menu->set_name ("ArdourContextMenu");
|
||||
region_list_selection_requiring_actions.push_back (ui_manager->get_action ("<Actions>/RegionList/rlHide"));
|
||||
region_list_selection_requiring_actions.push_back (ui_manager->get_action ("<Actions>/RegionList/rlAudition"));
|
||||
region_list_selection_requiring_actions.push_back (ui_manager->get_action ("<Actions>/RegionList/rlRemove"));
|
||||
|
||||
items.push_back (MenuElem (_("Audition"), mem_fun(*this, &Editor::audition_region_from_region_list)));
|
||||
rl_context_menu_region_items.push_back (items.back());
|
||||
items.push_back (MenuElem (_("Hide"), mem_fun(*this, &Editor::hide_region_from_region_list)));
|
||||
rl_context_menu_region_items.push_back (items.back());
|
||||
items.push_back (MenuElem (_("Remove"), mem_fun(*this, &Editor::remove_region_from_region_list)));
|
||||
rl_context_menu_region_items.push_back (items.back());
|
||||
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
|
||||
// items.push_back (MenuElem (_("Find")));
|
||||
items.push_back (CheckMenuElem (_("Show all"), mem_fun(*this, &Editor::toggle_full_region_list)));
|
||||
toggle_full_region_list_item = static_cast<CheckMenuItem*> (items.back());
|
||||
|
||||
Gtk::Menu *sort_menu = manage (new Menu);
|
||||
MenuList& sort_items = sort_menu->items();
|
||||
sort_menu->set_name ("ArdourContextMenu");
|
||||
RadioMenuItem::Group sort_order_group;
|
||||
RadioMenuItem::Group sort_type_group;
|
||||
|
||||
sort_items.push_back (RadioMenuElem (sort_order_group, _("Ascending"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_direction), true)));
|
||||
sort_items.push_back (RadioMenuElem (sort_order_group, _("Descending"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_direction), false)));
|
||||
sort_items.push_back (SeparatorElem());
|
||||
|
||||
sort_items.push_back (RadioMenuElem (sort_type_group, _("By Region Name"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByName)));
|
||||
sort_items.push_back (RadioMenuElem (sort_type_group, _("By Region Length"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByLength)));
|
||||
sort_items.push_back (RadioMenuElem (sort_type_group, _("By Region Position"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByPosition)));
|
||||
sort_items.push_back (RadioMenuElem (sort_type_group, _("By Region Timestamp"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByTimestamp)));
|
||||
sort_items.push_back (RadioMenuElem (sort_type_group, _("By Region Start in File"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByStartInFile)));
|
||||
sort_items.push_back (RadioMenuElem (sort_type_group, _("By Region End in File"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByEndInFile)));
|
||||
sort_items.push_back (RadioMenuElem (sort_type_group, _("By Source File Name"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileName)));
|
||||
sort_items.push_back (RadioMenuElem (sort_type_group, _("By Source File Length"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileLength)));
|
||||
sort_items.push_back (RadioMenuElem (sort_type_group, _("By Source File Creation Date"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileCreationDate)));
|
||||
sort_items.push_back (RadioMenuElem (sort_type_group, _("By Source Filesystem"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileFS)));
|
||||
|
||||
items.push_back (MenuElem (_("Sorting"), *sort_menu));
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
// items.push_back (CheckMenuElem (_("Display Automatic Regions"), mem_fun(*this, &Editor::toggle_show_auto_regions)));
|
||||
// toggle_auto_regions_item = static_cast<CheckMenuItem*> (items.back());
|
||||
// toggle_auto_regions_item->set_active (show_automatic_regions_in_region_list);
|
||||
// items.push_back (SeparatorElem());
|
||||
|
||||
items.push_back (MenuElem (_("Import audio (copy)"), bind (mem_fun(*this, &Editor::import_audio), false)));
|
||||
import_audio_item = items.back();
|
||||
if (!session) {
|
||||
import_audio_item->set_sensitive (false);
|
||||
}
|
||||
items.push_back (MenuElem (_("Embed audio (link)"), mem_fun(*this, &Editor::embed_audio)));
|
||||
embed_audio_item = items.back();
|
||||
if (!session) {
|
||||
embed_audio_item->set_sensitive (false);
|
||||
}
|
||||
session_requiring_actions.push_back (ui_manager->get_action ("<Actions>/RegionList/rlEmbedAudio"));
|
||||
session_requiring_actions.push_back (ui_manager->get_action ("<Actions>/RegionList/rlImportAudio"));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -472,325 +380,226 @@ Editor::toggle_show_auto_regions ()
|
|||
void
|
||||
Editor::toggle_full_region_list ()
|
||||
{
|
||||
region_list_display.freeze ();
|
||||
if (toggle_full_region_list_item->get_active()) {
|
||||
for (CTree_Helpers::RowIterator r = region_list_display.rows().begin(); r != region_list_display.rows().end(); ++r) {
|
||||
r->expand_recursive ();
|
||||
}
|
||||
region_list_display.expand_all ();
|
||||
} else {
|
||||
for (CTree_Helpers::RowIterator r = region_list_display.rows().begin(); r != region_list_display.rows().end(); ++r) {
|
||||
r->collapse ();
|
||||
}
|
||||
region_list_display.collapse_all ();
|
||||
}
|
||||
region_list_display.thaw ();
|
||||
}
|
||||
|
||||
gint
|
||||
bool
|
||||
Editor::region_list_display_key_press (GdkEventKey* ev)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
gint
|
||||
bool
|
||||
Editor::region_list_display_key_release (GdkEventKey* ev)
|
||||
{
|
||||
switch (ev->keyval) {
|
||||
case GDK_Delete:
|
||||
remove_selected_regions_from_region_list ();
|
||||
return TRUE;
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
gint
|
||||
bool
|
||||
Editor::region_list_display_button_press (GdkEventButton *ev)
|
||||
{
|
||||
int row, col;
|
||||
AudioRegion *region;
|
||||
Region* region;
|
||||
TreeIter iter;
|
||||
TreeModel::Path path;
|
||||
TreeViewColumn* column;
|
||||
int cellx;
|
||||
int celly;
|
||||
|
||||
if (region_list_display.get_path_at_pos ((int)ev->x, (int)ev->y, path, column, cellx, celly)) {
|
||||
if ((iter = region_list_model->get_iter (path))) {
|
||||
region = (*iter)[region_list_columns.region];
|
||||
}
|
||||
}
|
||||
|
||||
if (region == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Keyboard::is_delete_event (ev)) {
|
||||
if (region_list_display.get_selection_info ((int)ev->x, (int)ev->y, &row, &col) != 0) {
|
||||
if ((region = (AudioRegion *) region_list_display.row(row).get_data()) != 0) {
|
||||
delete region;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
session->remove_region_from_region_list (*region);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Keyboard::is_context_menu_event (ev)) {
|
||||
region_list_column_click (-1);
|
||||
return TRUE;
|
||||
if (region_list_menu == 0) {
|
||||
build_region_list_menu ();
|
||||
}
|
||||
region_list_menu->popup (ev->button, ev->time);
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (ev->button) {
|
||||
case 1:
|
||||
if (region_list_display.get_selection_info ((int)ev->x, (int)ev->y, &row, &col) != 0) {
|
||||
if ((region = (AudioRegion *) region_list_display.row(row).get_data()) != 0) {
|
||||
|
||||
if (wave_cursor == 0) {
|
||||
GdkPixmap *source, *mask;
|
||||
GdkColor fg = { 0, 65535, 0, 0 }; /* Red. */
|
||||
GdkColor bg = { 0, 0, 0, 65535 }; /* Blue. */
|
||||
|
||||
source = gdk_bitmap_create_from_data (NULL, wave_cursor_bits,
|
||||
wave_cursor_width, wave_cursor_height);
|
||||
mask = gdk_bitmap_create_from_data (NULL, wave_cursor_mask_bits,
|
||||
wave_cursor_mask_width, wave_cursor_mask_height);
|
||||
|
||||
wave_cursor = gdk_cursor_new_from_pixmap (source,
|
||||
mask,
|
||||
&fg,
|
||||
&bg,
|
||||
wave_cursor_x_hot,
|
||||
wave_cursor_y_hot);
|
||||
gdk_pixmap_unref (source);
|
||||
gdk_pixmap_unref (mask);
|
||||
}
|
||||
region_list_display_drag_region = region;
|
||||
need_wave_cursor = 1;
|
||||
|
||||
/* audition on double click */
|
||||
if (ev->type == GDK_2BUTTON_PRESS) {
|
||||
consider_auditioning (region);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* audition on double click */
|
||||
if (ev->type == GDK_2BUTTON_PRESS) {
|
||||
consider_auditioning (*region);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
if (region_list_display.get_selection_info ((int)ev->x, (int)ev->y, &row, &col) != 0) {
|
||||
if ((region = (AudioRegion *) region_list_display.get_row_data (row)) != 0) {
|
||||
if (consider_auditioning (region)) {
|
||||
region_list_display.row(row).select();
|
||||
}
|
||||
else {
|
||||
region_list_display.row(row).unselect();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* to prevent regular selection -- i dont think this is needed JLC */
|
||||
return stop_signal (region_list_display, "button_press_event");
|
||||
consider_auditioning (*region);
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
gint
|
||||
bool
|
||||
Editor::region_list_display_button_release (GdkEventButton *ev)
|
||||
{
|
||||
int row, col;
|
||||
TreeIter iter;
|
||||
TreeModel::Path path;
|
||||
TreeViewColumn* column;
|
||||
int cellx;
|
||||
int celly;
|
||||
Region* region;
|
||||
|
||||
if (region_list_display.get_selection_info ((int)ev->x, (int)ev->y, &row, &col) != 0) {
|
||||
region_list_button_region = (AudioRegion *) region_list_display.get_row_data (row);
|
||||
} else {
|
||||
region_list_button_region = 0;
|
||||
if (region_list_display.get_path_at_pos ((int)ev->x, (int)ev->y, path, column, cellx, celly)) {
|
||||
if ((iter = region_list_model->get_iter (path))) {
|
||||
region = (*iter)[region_list_columns.region];
|
||||
}
|
||||
}
|
||||
|
||||
if (Keyboard::is_delete_event (ev)) {
|
||||
remove_region_from_region_list ();
|
||||
return TRUE;
|
||||
session->remove_region_from_region_list (*region);
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (ev->button) {
|
||||
case 1:
|
||||
if (region_list_display_drag_region) {
|
||||
insert_region_list_drag (*region_list_display_drag_region);
|
||||
}
|
||||
|
||||
track_canvas_scroller.get_window().set_cursor (current_canvas_cursor);
|
||||
region_list_display.get_window().set_cursor (0);
|
||||
|
||||
region_list_display_drag_region = 0;
|
||||
need_wave_cursor = 0;
|
||||
|
||||
return TRUE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
|
||||
if (region_list_menu == 0) {
|
||||
build_region_list_menu ();
|
||||
}
|
||||
|
||||
bool sensitive;
|
||||
|
||||
if (region_list_display.selection().size() != 0) {
|
||||
sensitive = true;
|
||||
} else {
|
||||
sensitive = false;
|
||||
}
|
||||
|
||||
for (vector<MenuItem*>::iterator i = rl_context_menu_region_items.begin(); i != rl_context_menu_region_items.end(); ++i) {
|
||||
(*i)->set_sensitive (sensitive);
|
||||
}
|
||||
|
||||
region_list_menu->popup (0, 0);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::region_list_display_motion (GdkEventMotion *ev)
|
||||
{
|
||||
if (need_wave_cursor == 1) {
|
||||
track_canvas_scroller.get_window().set_cursor (wave_cursor);
|
||||
region_list_display.get_window().set_cursor (wave_cursor);
|
||||
gdk_flush ();
|
||||
need_wave_cursor = 2;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
Editor::region_list_display_selected (gint row, gint col, GdkEvent *ev)
|
||||
Editor::consider_auditioning (Region& region)
|
||||
{
|
||||
AudioRegion* region = static_cast<AudioRegion *>(region_list_display.get_row_data (row));
|
||||
AudioRegion* r = dynamic_cast<AudioRegion*> (®ion);
|
||||
|
||||
if (session == 0 || region == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
set_selected_regionview_from_region_list (*region, false);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::region_list_display_unselected (gint row, gint col, GdkEvent *ev)
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::consider_auditioning (AudioRegion *r)
|
||||
{
|
||||
if (r == 0) {
|
||||
session->cancel_audition ();
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (session->is_auditioning()) {
|
||||
session->cancel_audition ();
|
||||
if (r == last_audition_region) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
session->audition_region (*r);
|
||||
last_audition_region = r;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::region_list_display_enter_notify (GdkEventCrossing *ev)
|
||||
int
|
||||
Editor::region_list_sorter (TreeModel::iterator a, TreeModel::iterator b)
|
||||
{
|
||||
ARDOUR_UI::instance()->allow_focus (true);
|
||||
region_list_display.grab_focus ();
|
||||
return FALSE;
|
||||
}
|
||||
int cmp;
|
||||
|
||||
gint
|
||||
Editor::region_list_display_leave_notify (GdkEventCrossing *ev)
|
||||
{
|
||||
ARDOUR_UI::instance()->allow_focus (false);
|
||||
return FALSE;
|
||||
}
|
||||
Region* r1 = (*a)[region_list_columns.region];
|
||||
Region* r2 = (*b)[region_list_columns.region];
|
||||
|
||||
gint
|
||||
Editor::_region_list_sorter (GtkCList* clist, gconstpointer a, gconstpointer b)
|
||||
{
|
||||
Editor* editor = static_cast<Editor*> (gtk_object_get_data (GTK_OBJECT(clist), "editor"));
|
||||
return editor->region_list_sorter (a, b);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::region_list_sorter (gconstpointer a, gconstpointer b)
|
||||
{
|
||||
GtkCListRow* row1 = (GtkCListRow *) a;
|
||||
GtkCListRow* row2 = (GtkCListRow *) b;
|
||||
|
||||
AudioRegion* region1 = static_cast<AudioRegion*> (row1->data);
|
||||
AudioRegion* region2 = static_cast<AudioRegion*> (row2->data);
|
||||
AudioRegion* region1 = dynamic_cast<AudioRegion*> (r1);
|
||||
AudioRegion* region2 = dynamic_cast<AudioRegion*> (r2);
|
||||
|
||||
if (region1 == 0 || region2 == 0) {
|
||||
Glib::ustring s1;
|
||||
Glib::ustring s2;
|
||||
switch (region_list_sort_type) {
|
||||
case ByName:
|
||||
return true; /* XXX compare text in rows */
|
||||
s1 = (*a)[region_list_columns.name];
|
||||
s2 = (*b)[region_list_columns.name];
|
||||
return (s1.compare (s2));
|
||||
default:
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
switch (region_list_sort_type) {
|
||||
case ByName:
|
||||
return strcasecmp (region1->name().c_str(), region2->name().c_str());
|
||||
cmp = strcasecmp (region1->name().c_str(), region2->name().c_str());
|
||||
break;
|
||||
|
||||
case ByLength:
|
||||
return region1->length() - region2->length();
|
||||
cmp = region1->length() - region2->length();
|
||||
break;
|
||||
|
||||
case ByPosition:
|
||||
return region1->position() - region2->position();
|
||||
cmp = region1->position() - region2->position();
|
||||
break;
|
||||
|
||||
case ByTimestamp:
|
||||
return region1->source().timestamp() - region2->source().timestamp();
|
||||
cmp = region1->source().timestamp() - region2->source().timestamp();
|
||||
break;
|
||||
|
||||
case ByStartInFile:
|
||||
return region1->start() - region2->start();
|
||||
cmp = region1->start() - region2->start();
|
||||
break;
|
||||
|
||||
case ByEndInFile:
|
||||
return (region1->start() + region1->length()) - (region2->start() + region2->length());
|
||||
cmp = (region1->start() + region1->length()) - (region2->start() + region2->length());
|
||||
break;
|
||||
|
||||
case BySourceFileName:
|
||||
return strcasecmp (region1->source().name().c_str(), region2->source().name().c_str());
|
||||
cmp = strcasecmp (region1->source().name().c_str(), region2->source().name().c_str());
|
||||
break;
|
||||
|
||||
case BySourceFileLength:
|
||||
return region1->source().length() - region2->source().length();
|
||||
cmp = region1->source().length() - region2->source().length();
|
||||
break;
|
||||
|
||||
case BySourceFileCreationDate:
|
||||
return region1->source().timestamp() - region2->source().timestamp();
|
||||
cmp = region1->source().timestamp() - region2->source().timestamp();
|
||||
break;
|
||||
|
||||
case BySourceFileFS:
|
||||
if (region1->source().name() == region2->source().name()) {
|
||||
return strcasecmp (region1->name().c_str(), region2->name().c_str());
|
||||
cmp = strcasecmp (region1->name().c_str(), region2->name().c_str());
|
||||
} else {
|
||||
return strcasecmp (region1->source().name().c_str(), region2->source().name().c_str());
|
||||
cmp = strcasecmp (region1->source().name().c_str(), region2->source().name().c_str());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
if (cmp < 0) {
|
||||
return -1;
|
||||
} else if (cmp > 0) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -801,110 +610,107 @@ Editor::reset_region_list_sort_type (RegionListSortType type)
|
|||
|
||||
switch (type) {
|
||||
case ByName:
|
||||
region_list_display.set_column_title(0, _("Regions/name"));
|
||||
region_list_display.get_column (0)->set_title (_("Regions/name"));
|
||||
break;
|
||||
|
||||
case ByLength:
|
||||
region_list_display.set_column_title (0, _("Regions/length"));
|
||||
region_list_display.get_column (0)->set_title (_("Regions/length"));
|
||||
break;
|
||||
|
||||
case ByPosition:
|
||||
region_list_display.set_column_title (0, _("Regions/position"));
|
||||
region_list_display.get_column (0)->set_title (_("Regions/position"));
|
||||
break;
|
||||
|
||||
case ByTimestamp:
|
||||
region_list_display.set_column_title (0, _("Regions/creation"));
|
||||
region_list_display.get_column (0)->set_title (_("Regions/creation"));
|
||||
break;
|
||||
|
||||
case ByStartInFile:
|
||||
region_list_display.set_column_title (0, _("Regions/start"));
|
||||
region_list_display.get_column (0)->set_title (_("Regions/start"));
|
||||
break;
|
||||
|
||||
case ByEndInFile:
|
||||
region_list_display.set_column_title (0, _("Regions/end"));
|
||||
region_list_display.get_column (0)->set_title (_("Regions/end"));
|
||||
break;
|
||||
|
||||
case BySourceFileName:
|
||||
region_list_display.set_column_title (0, _("Regions/file name"));
|
||||
region_list_display.get_column (0)->set_title (_("Regions/file name"));
|
||||
break;
|
||||
|
||||
case BySourceFileLength:
|
||||
region_list_display.set_column_title (0, _("Regions/file size"));
|
||||
region_list_display.get_column (0)->set_title (_("Regions/file size"));
|
||||
break;
|
||||
|
||||
case BySourceFileCreationDate:
|
||||
region_list_display.set_column_title (0, _("Regions/file date"));
|
||||
region_list_display.get_column (0)->set_title (_("Regions/file date"));
|
||||
break;
|
||||
|
||||
case BySourceFileFS:
|
||||
region_list_display.set_column_title (0, _("Regions/file system"));
|
||||
region_list_display.get_column (0)->set_title (_("Regions/file system"));
|
||||
break;
|
||||
}
|
||||
|
||||
region_list_display.sort ();
|
||||
region_list_sort_model->set_sort_func (0, mem_fun (*this, &Editor::region_list_sorter));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::reset_region_list_sort_direction (bool up)
|
||||
{
|
||||
region_list_display.set_sort_type (up ? GTK_SORT_ASCENDING : GTK_SORT_DESCENDING);
|
||||
region_list_display.sort ();
|
||||
// GTK2FIX
|
||||
//region_list_display.set_sort_type (up ? GTK_SORT_ASCENDING : GTK_SORT_DESCENDING);
|
||||
/* reset to force resort */
|
||||
region_list_sort_model->set_sort_func (0, mem_fun (*this, &Editor::region_list_sorter));
|
||||
}
|
||||
|
||||
void
|
||||
Editor::region_list_selection_mapover (slot<void,Region&> sl)
|
||||
{
|
||||
Glib::RefPtr<TreeSelection> selection = region_list_display.get_selection();
|
||||
TreeView::Selection::ListHandle_Path rows = selection->get_selected_rows ();
|
||||
TreeView::Selection::ListHandle_Path::iterator i = rows.begin();
|
||||
|
||||
if (selection->count_selected_rows() == 0 || session == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (; i != rows.end(); ++i) {
|
||||
TreeIter iter;
|
||||
|
||||
if ((iter = region_list_model->get_iter (*i))) {
|
||||
sl (*((*iter)[region_list_columns.region]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::hide_a_region (Region& r)
|
||||
{
|
||||
r.set_hidden (true);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::remove_a_region (Region& r)
|
||||
{
|
||||
session->remove_region_from_region_list (r);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::audition_region_from_region_list ()
|
||||
{
|
||||
if (region_list_button_region) {
|
||||
consider_auditioning (dynamic_cast<AudioRegion*> (region_list_button_region));
|
||||
}
|
||||
region_list_selection_mapover (mem_fun (*this, &Editor::consider_auditioning));
|
||||
}
|
||||
|
||||
void
|
||||
Editor::hide_region_from_region_list ()
|
||||
{
|
||||
if (session == 0 || region_list_button_region == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
region_list_button_region->set_hidden (true);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::remove_region_from_region_list ()
|
||||
{
|
||||
if (session == 0 || region_list_button_region == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
session->remove_region_from_region_list (*region_list_button_region);
|
||||
region_list_selection_mapover (mem_fun (*this, &Editor::hide_a_region));
|
||||
}
|
||||
|
||||
void
|
||||
Editor::remove_selected_regions_from_region_list ()
|
||||
{
|
||||
using namespace Gtk::CTree_Helpers;
|
||||
SelectionList& selected = region_list_display.selection();
|
||||
|
||||
/* called from idle context to avoid snafus with the list
|
||||
state.
|
||||
*/
|
||||
|
||||
if (selected.empty() || session == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
vector<Region*> to_be_deleted;
|
||||
|
||||
for (SelectionList::iterator i = selected.begin(); i != selected.end(); ++i) {
|
||||
to_be_deleted.push_back (static_cast<Region*> ((*i).get_data()));
|
||||
}
|
||||
|
||||
for (vector<Region*>::iterator i = to_be_deleted.begin(); i != to_be_deleted.end(); ++i) {
|
||||
session->remove_region_from_region_list (**i);
|
||||
}
|
||||
|
||||
return;
|
||||
region_list_selection_mapover (mem_fun (*this, &Editor::remove_a_region));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -56,27 +56,27 @@ Editor::initialize_rulers ()
|
|||
ruler_grabbed_widget = 0;
|
||||
|
||||
_smpte_ruler = gtk_custom_hruler_new ();
|
||||
smpte_ruler = wrap (_smpte_ruler);
|
||||
smpte_ruler = Glib::wrap (_smpte_ruler);
|
||||
smpte_ruler->set_name ("SMPTERuler");
|
||||
smpte_ruler->set_size_request (-1, (int)timebar_height);
|
||||
gtk_custom_ruler_set_metric (GTK_CUSTOM_RULER(_smpte_ruler), &ruler_metrics[ruler_metric_smpte]);
|
||||
ruler_shown[ruler_metric_smpte] = true;
|
||||
|
||||
_bbt_ruler = gtk_custom_hruler_new ();
|
||||
bbt_ruler = wrap (_bbt_ruler);
|
||||
bbt_ruler = Glib::wrap (_bbt_ruler);
|
||||
bbt_ruler->set_name ("BBTRuler");
|
||||
bbt_ruler->set_size_request (-1, (int)timebar_height);
|
||||
gtk_custom_ruler_set_metric (GTK_CUSTOM_RULER(_bbt_ruler), &ruler_metrics[ruler_metric_bbt]);
|
||||
ruler_shown[ruler_metric_bbt] = true;
|
||||
|
||||
_frames_ruler = gtk_custom_hruler_new ();
|
||||
frames_ruler = wrap (_frames_ruler);
|
||||
frames_ruler = Glib::wrap (_frames_ruler);
|
||||
frames_ruler->set_name ("FramesRuler");
|
||||
frames_ruler->set_size_request (-1, (int)timebar_height);
|
||||
gtk_custom_ruler_set_metric (GTK_CUSTOM_RULER(_frames_ruler), &ruler_metrics[ruler_metric_frames]);
|
||||
|
||||
_minsec_ruler = gtk_custom_hruler_new ();
|
||||
minsec_ruler = wrap (_minsec_ruler);
|
||||
minsec_ruler = Glib::wrap (_minsec_ruler);
|
||||
minsec_ruler->set_name ("MinSecRuler");
|
||||
minsec_ruler->set_size_request (-1, (int)timebar_height);
|
||||
gtk_custom_ruler_set_metric (GTK_CUSTOM_RULER(_minsec_ruler), &ruler_metrics[ruler_metric_minsec]);
|
||||
|
@ -89,10 +89,10 @@ Editor::initialize_rulers ()
|
|||
ruler_shown[ruler_metric_frames] = false;
|
||||
ruler_shown[ruler_metric_minsec] = false;
|
||||
|
||||
smpte_ruler->signal_set_event()s (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
bbt_ruler->signal_set_event()s (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
frames_ruler->signal_set_event()s (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
minsec_ruler->signal_set_event()s (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
smpte_ruler->set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
bbt_ruler->set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
frames_ruler->set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
minsec_ruler->set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
|
||||
smpte_ruler->signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_button_release));
|
||||
bbt_ruler->signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_button_release));
|
||||
|
@ -127,10 +127,10 @@ Editor::ruler_button_press (GdkEventButton* ev)
|
|||
//Gtk::Main::grab_add (*minsec_ruler);
|
||||
Widget * grab_widget = 0;
|
||||
|
||||
if (smpte_ruler->is_realized() && ev->window == smpte_ruler->get_window()) grab_widget = smpte_ruler;
|
||||
else if (bbt_ruler->is_realized() && ev->window == bbt_ruler->get_window()) grab_widget = bbt_ruler;
|
||||
else if (frames_ruler->is_realized() && ev->window == frames_ruler->get_window()) grab_widget = frames_ruler;
|
||||
else if (minsec_ruler->is_realized() && ev->window == minsec_ruler->get_window()) grab_widget = minsec_ruler;
|
||||
if (smpte_ruler->is_realized() && ev->window == smpte_ruler->get_window()->gobj()) grab_widget = smpte_ruler;
|
||||
else if (bbt_ruler->is_realized() && ev->window == bbt_ruler->get_window()->gobj()) grab_widget = bbt_ruler;
|
||||
else if (frames_ruler->is_realized() && ev->window == frames_ruler->get_window()->gobj()) grab_widget = frames_ruler;
|
||||
else if (minsec_ruler->is_realized() && ev->window == minsec_ruler->get_window()->gobj()) grab_widget = minsec_ruler;
|
||||
|
||||
if (grab_widget) {
|
||||
Gtk::Main::grab_add (*grab_widget);
|
||||
|
@ -144,10 +144,10 @@ gint
|
|||
Editor::ruler_button_release (GdkEventButton* ev)
|
||||
{
|
||||
gint x,y;
|
||||
GdkModifierType state;
|
||||
Gdk::ModifierType state;
|
||||
|
||||
/* need to use the correct x,y, the event lies */
|
||||
time_canvas_event_box.get_window().get_pointer (x, y, state);
|
||||
time_canvas_event_box.get_window()->get_pointer (x, y, state);
|
||||
|
||||
|
||||
ruler_pressed_button = 0;
|
||||
|
@ -219,10 +219,10 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev)
|
|||
double cx=0,cy=0;
|
||||
|
||||
gint x,y;
|
||||
GdkModifierType state;
|
||||
Gdk::ModifierType state;
|
||||
|
||||
/* need to use the correct x,y, the event lies */
|
||||
time_canvas_event_box.get_window().get_pointer (x, y, state);
|
||||
time_canvas_event_box.get_window()->get_pointer (x, y, state);
|
||||
|
||||
|
||||
gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &wcx, &wcy);
|
||||
|
@ -339,25 +339,25 @@ Editor::popup_ruler_menu (jack_nframes_t where, ItemType t)
|
|||
}
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (_("Min:Secs"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_minsec)));
|
||||
mitem = (CheckMenuItem *) ruler_items.back();
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_metric_minsec]) {
|
||||
mitem->set_active(true);
|
||||
}
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (X_("SMPTE"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_smpte)));
|
||||
mitem = (CheckMenuItem *) ruler_items.back();
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_metric_smpte]) {
|
||||
mitem->set_active(true);
|
||||
}
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (_("Frames"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_frames)));
|
||||
mitem = (CheckMenuItem *) ruler_items.back();
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_metric_frames]) {
|
||||
mitem->set_active(true);
|
||||
}
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (_("Bars:Beats"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_bbt)));
|
||||
mitem = (CheckMenuItem *) ruler_items.back();
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_metric_bbt]) {
|
||||
mitem->set_active(true);
|
||||
}
|
||||
|
@ -365,31 +365,31 @@ Editor::popup_ruler_menu (jack_nframes_t where, ItemType t)
|
|||
ruler_items.push_back (SeparatorElem ());
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (_("Meter"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_time_meter)));
|
||||
mitem = (CheckMenuItem *) ruler_items.back();
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_time_meter]) {
|
||||
mitem->set_active(true);
|
||||
}
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (_("Tempo"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_time_tempo)));
|
||||
mitem = (CheckMenuItem *) ruler_items.back();
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_time_tempo]) {
|
||||
mitem->set_active(true);
|
||||
}
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (_("Location Markers"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_time_marker)));
|
||||
mitem = (CheckMenuItem *) ruler_items.back();
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_time_marker]) {
|
||||
mitem->set_active(true);
|
||||
}
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (_("Range Markers"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_time_range_marker)));
|
||||
mitem = (CheckMenuItem *) ruler_items.back();
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_time_range_marker]) {
|
||||
mitem->set_active(true);
|
||||
}
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (_("Loop/Punch Ranges"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_time_transport_marker)));
|
||||
mitem = (CheckMenuItem *) ruler_items.back();
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_time_transport_marker]) {
|
||||
mitem->set_active(true);
|
||||
}
|
||||
|
@ -528,34 +528,34 @@ Editor::update_ruler_visibility ()
|
|||
BoxList::iterator canvaspos = ruler_children.begin();
|
||||
|
||||
_smpte_ruler = gtk_custom_hruler_new ();
|
||||
smpte_ruler = wrap (_smpte_ruler);
|
||||
smpte_ruler = Glib::wrap (_smpte_ruler);
|
||||
smpte_ruler->set_name ("SMPTERuler");
|
||||
smpte_ruler->set_size_request (-1, (int)timebar_height);
|
||||
gtk_custom_ruler_set_metric (GTK_CUSTOM_RULER(_smpte_ruler), &ruler_metrics[ruler_metric_smpte]);
|
||||
|
||||
_bbt_ruler = gtk_custom_hruler_new ();
|
||||
bbt_ruler = wrap (_bbt_ruler);
|
||||
bbt_ruler = Glib::wrap (_bbt_ruler);
|
||||
bbt_ruler->set_name ("BBTRuler");
|
||||
bbt_ruler->set_size_request (-1, (int)timebar_height);
|
||||
gtk_custom_ruler_set_metric (GTK_CUSTOM_RULER(_bbt_ruler), &ruler_metrics[ruler_metric_bbt]);
|
||||
|
||||
_frames_ruler = gtk_custom_hruler_new ();
|
||||
frames_ruler = wrap (_frames_ruler);
|
||||
frames_ruler = Glib::wrap (_frames_ruler);
|
||||
frames_ruler->set_name ("FramesRuler");
|
||||
frames_ruler->set_size_request (-1, (int)timebar_height);
|
||||
gtk_custom_ruler_set_metric (GTK_CUSTOM_RULER(_frames_ruler), &ruler_metrics[ruler_metric_frames]);
|
||||
|
||||
_minsec_ruler = gtk_custom_hruler_new ();
|
||||
minsec_ruler = wrap (_minsec_ruler);
|
||||
minsec_ruler = Glib::wrap (_minsec_ruler);
|
||||
minsec_ruler->set_name ("MinSecRuler");
|
||||
minsec_ruler->set_size_request (-1, (int)timebar_height);
|
||||
gtk_custom_ruler_set_metric (GTK_CUSTOM_RULER(_minsec_ruler), &ruler_metrics[ruler_metric_minsec]);
|
||||
|
||||
|
||||
smpte_ruler->signal_set_event()s (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
bbt_ruler->signal_set_event()s (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
frames_ruler->signal_set_event()s (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
minsec_ruler->signal_set_event()s (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
smpte_ruler->set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
bbt_ruler->set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
frames_ruler->set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
minsec_ruler->set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
|
||||
smpte_ruler->signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_button_release));
|
||||
bbt_ruler->signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_button_release));
|
||||
|
@ -574,26 +574,26 @@ Editor::update_ruler_visibility ()
|
|||
|
||||
|
||||
if (ruler_shown[ruler_metric_minsec]) {
|
||||
lab_children.push_back (Element(minsec_label, false, false));
|
||||
ruler_children.insert (canvaspos, Element(*minsec_ruler, false, false));
|
||||
lab_children.push_back (Element(minsec_label, PACK_SHRINK, PACK_START));
|
||||
ruler_children.insert (canvaspos, Element(*minsec_ruler, PACK_SHRINK, PACK_START));
|
||||
visible_timebars++;
|
||||
}
|
||||
|
||||
if (ruler_shown[ruler_metric_smpte]) {
|
||||
lab_children.push_back (Element(smpte_label, false, false));
|
||||
ruler_children.insert (canvaspos, Element(*smpte_ruler, false, false));
|
||||
lab_children.push_back (Element(smpte_label, PACK_SHRINK, PACK_START));
|
||||
ruler_children.insert (canvaspos, Element(*smpte_ruler, PACK_SHRINK, PACK_START));
|
||||
visible_timebars++;
|
||||
}
|
||||
|
||||
if (ruler_shown[ruler_metric_frames]) {
|
||||
lab_children.push_back (Element(frame_label, false, false));
|
||||
ruler_children.insert (canvaspos, Element(*frames_ruler, false, false));
|
||||
lab_children.push_back (Element(frame_label, PACK_SHRINK, PACK_START));
|
||||
ruler_children.insert (canvaspos, Element(*frames_ruler, PACK_SHRINK, PACK_START));
|
||||
visible_timebars++;
|
||||
}
|
||||
|
||||
if (ruler_shown[ruler_metric_bbt]) {
|
||||
lab_children.push_back (Element(bbt_label, false, false));
|
||||
ruler_children.insert (canvaspos, Element(*bbt_ruler, false, false));
|
||||
lab_children.push_back (Element(bbt_label, PACK_SHRINK, PACK_START));
|
||||
ruler_children.insert (canvaspos, Element(*bbt_ruler, PACK_SHRINK, PACK_START));
|
||||
visible_timebars++;
|
||||
}
|
||||
|
||||
|
@ -603,7 +603,7 @@ Editor::update_ruler_visibility ()
|
|||
args[0].name = "y";
|
||||
|
||||
if (ruler_shown[ruler_time_meter]) {
|
||||
lab_children.push_back (Element(meter_label, false, false));
|
||||
lab_children.push_back (Element(meter_label, PACK_SHRINK, PACK_START));
|
||||
|
||||
gtk_object_getv (GTK_OBJECT(meter_group), 1, args) ;
|
||||
old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
|
||||
|
@ -621,7 +621,7 @@ Editor::update_ruler_visibility ()
|
|||
}
|
||||
|
||||
if (ruler_shown[ruler_time_tempo]) {
|
||||
lab_children.push_back (Element(tempo_label, false, false));
|
||||
lab_children.push_back (Element(tempo_label, PACK_SHRINK, PACK_START));
|
||||
gtk_object_getv (GTK_OBJECT(tempo_group), 1, args) ;
|
||||
old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
|
||||
if (tbpos != old_unit_pos) {
|
||||
|
@ -637,7 +637,7 @@ Editor::update_ruler_visibility ()
|
|||
}
|
||||
|
||||
if (ruler_shown[ruler_time_marker]) {
|
||||
lab_children.push_back (Element(mark_label, false, false));
|
||||
lab_children.push_back (Element(mark_label, PACK_SHRINK, PACK_START));
|
||||
gtk_object_getv (GTK_OBJECT(marker_group), 1, args) ;
|
||||
old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
|
||||
if (tbpos != old_unit_pos) {
|
||||
|
@ -653,7 +653,7 @@ Editor::update_ruler_visibility ()
|
|||
}
|
||||
|
||||
if (ruler_shown[ruler_time_range_marker]) {
|
||||
lab_children.push_back (Element(range_mark_label, false, false));
|
||||
lab_children.push_back (Element(range_mark_label, PACK_SHRINK, PACK_START));
|
||||
gtk_object_getv (GTK_OBJECT(range_marker_group), 1, args) ;
|
||||
old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
|
||||
if (tbpos != old_unit_pos) {
|
||||
|
@ -669,7 +669,7 @@ Editor::update_ruler_visibility ()
|
|||
}
|
||||
|
||||
if (ruler_shown[ruler_time_transport_marker]) {
|
||||
lab_children.push_back (Element(transport_mark_label, false, false));
|
||||
lab_children.push_back (Element(transport_mark_label, PACK_SHRINK, PACK_START));
|
||||
gtk_object_getv (GTK_OBJECT(transport_marker_group), 1, args) ;
|
||||
old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
|
||||
if (tbpos != old_unit_pos) {
|
||||
|
|
|
@ -141,8 +141,8 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r)
|
|||
file_selector = 0;
|
||||
spec.running = false;
|
||||
|
||||
file_entry.signal_focus_in_event()().connect (ptr_fun (ARDOUR_UI::generic_focus_in_event));
|
||||
file_entry.signal_focus_out_event()().connect (ptr_fun (ARDOUR_UI::generic_focus_out_event));
|
||||
file_entry.signal_focus_in_event().connect (sigc::ptr_fun (ARDOUR_UI::generic_focus_in_event));
|
||||
file_entry.signal_focus_out_event().connect (sigc::ptr_fun (ARDOUR_UI::generic_focus_out_event));
|
||||
|
||||
file_entry.set_name ("ExportFileNameEntry");
|
||||
|
||||
|
@ -155,7 +155,7 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r)
|
|||
master_selector.set_column_auto_resize(2, true);
|
||||
master_selector.set_column_title (0, _("Output"));
|
||||
master_selector.column_titles_show ();
|
||||
master_selector.set_selection_mode (GTK_SELECTION_MULTIPLE);
|
||||
master_selector.set_selection_mode (Gtk::SELECTION_MULTIPLE);
|
||||
master_selector.signal_button_press_event().connect (mem_fun(*this, &ExportDialog::master_selector_button_press_event));
|
||||
|
||||
track_selector.set_name ("ExportTrackSelector");
|
||||
|
@ -167,7 +167,7 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r)
|
|||
track_selector.set_column_auto_resize(2, true);
|
||||
track_selector.set_column_title (0, _("Track"));
|
||||
track_selector.column_titles_show ();
|
||||
track_selector.set_selection_mode (GTK_SELECTION_MULTIPLE);
|
||||
track_selector.set_selection_mode (Gtk::SELECTION_MULTIPLE);
|
||||
track_selector.signal_button_press_event().connect (mem_fun(*this, &ExportDialog::track_selector_button_press_event));
|
||||
|
||||
check_pixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL,
|
||||
|
@ -178,7 +178,7 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r)
|
|||
&empty_mask, NULL, (gchar**) empty_xpm);
|
||||
|
||||
progress_bar.set_show_text (false);
|
||||
progress_bar.set_orientation (GTK_PROGRESS_LEFT_TO_RIGHT);
|
||||
progress_bar.set_orientation (PROGRESS_LEFT_TO_RIGHT);
|
||||
progress_bar.set_name ("ExportProgress");
|
||||
|
||||
format_frame.add (format_table);
|
||||
|
@ -603,7 +603,7 @@ ExportDialog::set_range (jack_nframes_t start, jack_nframes_t end)
|
|||
gint
|
||||
ExportDialog::progress_timeout ()
|
||||
{
|
||||
progress_bar.set_percentage (spec.progress);
|
||||
progress_bar.set_fraction (spec.progress/100);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1125,7 +1125,7 @@ ExportDialog::start_export ()
|
|||
file_entry.set_text (dir);
|
||||
}
|
||||
|
||||
progress_bar.set_percentage (0);
|
||||
progress_bar.set_fraction (0);
|
||||
cancel_label.set_text (_("Cancel"));
|
||||
|
||||
show_all ();
|
||||
|
@ -1350,8 +1350,8 @@ ExportDialog::initiate_browse ()
|
|||
file_selector = new FileSelection;
|
||||
file_selector->set_modal (true);
|
||||
|
||||
file_selector->get_cancel_button()-.signal_clicked().connect (bind (mem_fun(*this, &ExportDialog::finish_browse), -1));
|
||||
file_selector->get_ok_button()-.signal_clicked().connect (bind (mem_fun(*this, &ExportDialog::finish_browse), 1));
|
||||
file_selector->get_cancel_button()->signal_clicked().connect (bind (mem_fun(*this, &ExportDialog::finish_browse), -1));
|
||||
file_selector->get_ok_button()->signal_clicked().connect (bind (mem_fun(*this, &ExportDialog::finish_browse), 1));
|
||||
file_selector->signal_map_event().connect (bind (mem_fun(*this, &ExportDialog::change_focus_policy), true));
|
||||
file_selector->signal_unmap_event().connect (bind (mem_fun(*this, &ExportDialog::change_focus_policy), false));
|
||||
}
|
||||
|
|
|
@ -52,8 +52,8 @@ using namespace Gtkmm2ext;
|
|||
using namespace Gtk;
|
||||
using namespace sigc;
|
||||
|
||||
Signal0<void> GainMeter::ResetAllPeakDisplays;
|
||||
Signal1<void,RouteGroup*> GainMeter::ResetGroupPeakDisplays;
|
||||
sigc::signal<void> GainMeter::ResetAllPeakDisplays;
|
||||
sigc::signal<void,RouteGroup*> GainMeter::ResetGroupPeakDisplays;
|
||||
Pix* GainMeter::slider_pix = 0;
|
||||
|
||||
int
|
||||
|
@ -194,7 +194,7 @@ GainMeter::GainMeter (IO& io, Session& s)
|
|||
_io.gain_changed.connect (mem_fun(*this, &GainMeter::gain_changed));
|
||||
|
||||
meter_metric_area.signal_expose_event().connect (mem_fun(*this, &GainMeter::meter_metrics_expose));
|
||||
gain_adjustment.value_changed.connect (mem_fun(*this, &GainMeter::gain_adjusted));
|
||||
gain_adjustment.signal_value_changed().connect (mem_fun(*this, &GainMeter::gain_adjusted));
|
||||
peak_display.signal_button_release_event().connect (mem_fun(*this, &GainMeter::peak_button_release));
|
||||
|
||||
_session.MeterHoldChanged.connect (mem_fun(*this, &GainMeter::meter_hold_changed));
|
||||
|
@ -229,7 +229,7 @@ GainMeter::meter_metrics_expose (GdkEventExpose *ev)
|
|||
|
||||
double fraction;
|
||||
|
||||
Gdk_Window win (meter_metric_area.get_window());
|
||||
GdkWindow win (meter_metric_area.get_window());
|
||||
Gdk_GC fg_gc (meter_metric_area.get_style()->get_fg_gc (Gtk::STATE_NORMAL));
|
||||
Gdk_GC bg_gc (meter_metric_area.get_style()->get_bg_gc (Gtk::STATE_NORMAL));
|
||||
Gdk_Font font (meter_metric_area.get_style()->get_font());
|
||||
|
@ -433,7 +433,7 @@ GainMeter::setup_meters ()
|
|||
meters[n].meter = new FastMeter ((uint32_t) floor (_session.meter_hold()), width, FastMeter::Vertical);
|
||||
meters[n].width = width;
|
||||
|
||||
meters[n].meter->signal_add_event()s (Gdk::BUTTON_RELEASE_MASK);
|
||||
meters[n].meter->add_events (Gdk::BUTTON_RELEASE_MASK);
|
||||
meters[n].meter->signal_button_release_event().connect
|
||||
(bind (mem_fun(*this, &GainMeter::meter_button_release), n));
|
||||
meters[n].meter->signal_button_release_event().connect_after (ptr_fun (do_not_propagate));
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include "marker_time_axis_view.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "public_editor.h"
|
||||
#include "extra_bind.h"
|
||||
#include "gui_thread.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
@ -555,7 +554,7 @@ ImageFrameSocketHandler::send_imageframe_view_position_change(jack_nframes_t pos
|
|||
msgBuffer << ardourvis::ITEM_UPDATE << ardourvis::IMAGEFRAME_ITEM << ardourvis::POSITION_CHANGE ;
|
||||
|
||||
// add the item description
|
||||
this->string_compose_imageframe_item_desc(item, msgBuffer) ;
|
||||
this->compose_imageframe_item_desc(item, msgBuffer) ;
|
||||
|
||||
msgBuffer << std::setw(ardourvis::TIME_VALUE_CHARS) << pos ;
|
||||
|
||||
|
@ -590,7 +589,7 @@ ImageFrameSocketHandler::send_imageframe_view_duration_change(jack_nframes_t dur
|
|||
// add the msg type
|
||||
msgBuffer << ardourvis::ITEM_UPDATE << ardourvis::IMAGEFRAME_ITEM << ardourvis::DURATION_CHANGE ;
|
||||
|
||||
this->string_compose_imageframe_item_desc(item, msgBuffer) ;
|
||||
this->compose_imageframe_item_desc(item, msgBuffer) ;
|
||||
|
||||
msgBuffer << std::setw(ardourvis::TIME_VALUE_CHARS) << dur ;
|
||||
|
||||
|
@ -624,7 +623,7 @@ ImageFrameSocketHandler::send_imageframe_view_renamed(std::string new_id, std::s
|
|||
// add the msg type
|
||||
msgBuffer << ardourvis::RENAME_ITEM << ardourvis::IMAGEFRAME_ITEM ;
|
||||
|
||||
this->string_compose_imageframe_item_desc(item, msgBuffer) ;
|
||||
this->compose_imageframe_item_desc(item, msgBuffer) ;
|
||||
|
||||
// add the old id and length
|
||||
msgBuffer << std::setw(3) << old_id.length() ;
|
||||
|
@ -703,7 +702,7 @@ ImageFrameSocketHandler::send_marker_view_position_change(jack_nframes_t pos, vo
|
|||
msgBuffer << ardourvis::ITEM_UPDATE << ardourvis::MARKER_ITEM << ardourvis::POSITION_CHANGE ;
|
||||
|
||||
// add the item description
|
||||
this->string_compose_marker_item_desc(item, msgBuffer) ;
|
||||
this->compose_marker_item_desc(item, msgBuffer) ;
|
||||
|
||||
msgBuffer << std::setw(ardourvis::TIME_VALUE_CHARS) << pos ;
|
||||
|
||||
|
@ -736,7 +735,7 @@ ImageFrameSocketHandler::send_marker_view_duration_change(jack_nframes_t dur, vo
|
|||
// add the msg type
|
||||
msgBuffer << ardourvis::ITEM_UPDATE << ardourvis::MARKER_ITEM << ardourvis::DURATION_CHANGE ;
|
||||
|
||||
this->string_compose_marker_item_desc(item, msgBuffer) ;
|
||||
this->compose_marker_item_desc(item, msgBuffer) ;
|
||||
|
||||
msgBuffer << std::setw(ardourvis::TIME_VALUE_CHARS) << dur ;
|
||||
|
||||
|
@ -772,7 +771,7 @@ ImageFrameSocketHandler::send_marker_view_renamed(std::string new_id, std::strin
|
|||
// add the msg type
|
||||
msgBuffer << ardourvis::RENAME_ITEM << ardourvis::MARKER_ITEM ;
|
||||
|
||||
this->string_compose_marker_item_desc(item, msgBuffer) ;
|
||||
this->compose_marker_item_desc(item, msgBuffer) ;
|
||||
|
||||
// add the old id and length
|
||||
msgBuffer << std::setw(3) << old_id.length() ;
|
||||
|
@ -1066,7 +1065,7 @@ ImageFrameSocketHandler::handle_item_selected(const char* msg)
|
|||
int scene_id_size ;
|
||||
int item_id_size ;
|
||||
|
||||
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
|
||||
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
|
||||
|
||||
// get the named time axis
|
||||
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(thePublicEditor.get_named_time_axis(track_id)) ;
|
||||
|
@ -1165,7 +1164,7 @@ ImageFrameSocketHandler::handle_insert_imageframe_time_axis(const char* msg)
|
|||
{
|
||||
ImageFrameTimeAxis* ifta = (ImageFrameTimeAxis*)new_tav ;
|
||||
ifta->VisualTimeAxisRemoved.connect(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_removed)) ;
|
||||
ifta->NameChanged.connect(SigC::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_renamed), ifta)) ;
|
||||
ifta->NameChanged.connect(sigc::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_renamed), ifta)) ;
|
||||
|
||||
send_return_success() ;
|
||||
}
|
||||
|
@ -1671,7 +1670,7 @@ ImageFrameSocketHandler::handle_imageframe_view_position_update(const char* msg)
|
|||
int scene_id_size ;
|
||||
int item_id_size ;
|
||||
|
||||
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
|
||||
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
|
||||
|
||||
jack_nframes_t start_frame = strtoul(get_message_part(position, ardourvis::TIME_VALUE_CHARS, msg).c_str(), 0, 10) ;
|
||||
position += ardourvis::TIME_VALUE_CHARS ;
|
||||
|
@ -1723,7 +1722,7 @@ ImageFrameSocketHandler::handle_imageframe_view_duration_update(const char* msg)
|
|||
int scene_id_size ;
|
||||
int item_id_size ;
|
||||
|
||||
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
|
||||
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
|
||||
|
||||
jack_nframes_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
|
||||
position += ardourvis::TIME_VALUE_CHARS ;
|
||||
|
@ -1774,7 +1773,7 @@ ImageFrameSocketHandler::handle_imageframe_position_lock_update(const char* msg)
|
|||
int group_id_size ;
|
||||
int item_id_size ;
|
||||
|
||||
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
|
||||
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
|
||||
|
||||
std::string pos_lock = get_message_part(position,1,msg) ;
|
||||
bool pos_lock_active = false ;
|
||||
|
@ -1826,7 +1825,7 @@ ImageFrameSocketHandler::handle_imageframe_view_max_duration_update(const char*
|
|||
int group_id_size ;
|
||||
int item_id_size ;
|
||||
|
||||
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
|
||||
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
|
||||
|
||||
jack_nframes_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
|
||||
position += ardourvis::TIME_VALUE_CHARS ;
|
||||
|
@ -1862,7 +1861,7 @@ ImageFrameSocketHandler::handle_imageframe_view_max_duration_enable_update(const
|
|||
int group_id_size ;
|
||||
int item_id_size ;
|
||||
|
||||
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
|
||||
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
|
||||
|
||||
std::string active = get_message_part(position,1,msg) ;
|
||||
bool max_duration_active = false ;
|
||||
|
@ -1914,7 +1913,7 @@ ImageFrameSocketHandler::handle_imageframe_view_min_duration_update(const char*
|
|||
int group_id_size ;
|
||||
int item_id_size ;
|
||||
|
||||
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
|
||||
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
|
||||
|
||||
jack_nframes_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
|
||||
position += ardourvis::TIME_VALUE_CHARS ;
|
||||
|
@ -1950,7 +1949,7 @@ ImageFrameSocketHandler::handle_imageframe_view_min_duration_enable_update(const
|
|||
int group_id_size ;
|
||||
int item_id_size ;
|
||||
|
||||
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
|
||||
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
|
||||
|
||||
std::string active = get_message_part(position,1,msg) ;
|
||||
bool min_duration_active = false ;
|
||||
|
@ -2146,7 +2145,7 @@ ImageFrameSocketHandler::get_message_part(int start, int32_t num_chars, const ch
|
|||
* @param item_id_size
|
||||
*/
|
||||
void
|
||||
ImageFrameSocketHandler::dstring_ecompose_imageframe_item_desc(const char* msg, int& position, std::string& track_id,
|
||||
ImageFrameSocketHandler::decompose_imageframe_item_desc(const char* msg, int& position, std::string& track_id,
|
||||
int& track_id_size, std::string& scene_id, int& scene_id_size, std::string& item_id, int& item_id_size)
|
||||
{
|
||||
// get the track Id size
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "utils.h"
|
||||
#include "ardour_message.h"
|
||||
#include "io_selector.h"
|
||||
#include "extra_bind.h"
|
||||
#include "keyboard.h"
|
||||
#include "gui_thread.h"
|
||||
|
||||
|
@ -95,7 +94,7 @@ IOSelectorWindow::IOSelectorWindow (Session& sess, IO& ior, bool input, bool can
|
|||
set_position (Gtk::WIN_POS_MOUSE);
|
||||
add (vbox);
|
||||
|
||||
delete_event.connect (bind (ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
|
||||
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
|
||||
}
|
||||
|
||||
IOSelectorWindow::~IOSelectorWindow()
|
||||
|
@ -123,7 +122,7 @@ IOSelectorWindow::accept ()
|
|||
}
|
||||
|
||||
|
||||
gint
|
||||
bool
|
||||
IOSelectorWindow::on_map (GdkEventAny *ev)
|
||||
{
|
||||
_selector.redisplay ();
|
||||
|
@ -276,7 +275,7 @@ IOSelector::rescan ()
|
|||
using namespace Notebook_Helpers;
|
||||
using namespace CList_Helpers;
|
||||
|
||||
typedef map<string,vector<pair<string,string> > > PortMap;
|
||||
typedef std::map<string,vector<pair<string,string> > > PortMap;
|
||||
PortMap portmap;
|
||||
const char **ports;
|
||||
PageList& pages = notebook.pages();
|
||||
|
@ -300,7 +299,7 @@ IOSelector::rescan ()
|
|||
|
||||
pair<string,vector<pair<string,string> > > newpair;
|
||||
pair<string,string> strpair;
|
||||
pair<PortMap::iterator,bool> result;
|
||||
std::pair<PortMap::iterator,bool> result;
|
||||
|
||||
string str = ports[n];
|
||||
string::size_type pos;
|
||||
|
@ -338,7 +337,7 @@ IOSelector::rescan ()
|
|||
|
||||
client_box->pack_start (*scroller);
|
||||
|
||||
client_port_display->set_selection_mode (GTK_SELECTION_BROWSE);
|
||||
client_port_display->set_selection_mode (Gtk::SELECTION_BROWSE);
|
||||
client_port_display->set_name ("IOSelectorList");
|
||||
|
||||
for (vector<pair<string,string> >::iterator s = i->second.begin(); s != i->second.end(); ++s) {
|
||||
|
@ -361,7 +360,7 @@ IOSelector::rescan ()
|
|||
}
|
||||
|
||||
notebook.set_page (current_page);
|
||||
notebook.show.connect (bind (mem_fun (notebook, &Notebook::set_page), current_page));
|
||||
notebook.signal_show().connect (bind (mem_fun (notebook, &Notebook::set_current_page), current_page));
|
||||
selector_box.show_all ();
|
||||
}
|
||||
|
||||
|
@ -430,7 +429,7 @@ IOSelector::display_ports ()
|
|||
|
||||
clist->column(0).get_widget(); // force the column title button to be created
|
||||
GtkButton *b = GTK_BUTTON(clist->gobj()->column[0].button); // no API to access this
|
||||
Gtk::Button *B = wrap (b); // make C++ signal handling easier.
|
||||
Gtk::Button *B = Glib::wrap (b); // make C++ signal handling easier.
|
||||
|
||||
clist->column_titles_show ();
|
||||
clist->column_titles_active ();
|
||||
|
@ -465,7 +464,7 @@ IOSelector::display_ports ()
|
|||
}
|
||||
|
||||
clist->set_name ("IOSelectorPortList");
|
||||
clist->set_selection_mode (GTK_SELECTION_SINGLE);
|
||||
clist->set_selection_mode (Gtk::SELECTION_SINGLE);
|
||||
clist->set_shadow_type (Gtk::SHADOW_IN);
|
||||
clist->set_size_request (-1, 75);
|
||||
|
||||
|
@ -646,7 +645,7 @@ IOSelector::port_column_button_release (GdkEventButton *event, CList *clist)
|
|||
for whom we are handling an event. not good.
|
||||
*/
|
||||
|
||||
Gtk::Main::idle.connect (bind (mem_fun(*this, &IOSelector::remove_port_when_idle), port));
|
||||
Glib::signal_idle().connect (bind (mem_fun(*this, &IOSelector::remove_port_when_idle), port));
|
||||
|
||||
} else {
|
||||
select_clist(clist);
|
||||
|
@ -816,7 +815,7 @@ PortInsertWindow::PortInsertWindow (Session& sess, PortInsert& pi, bool can_canc
|
|||
cancel_button.signal_clicked().connect (mem_fun(*this, &PortInsertWindow::cancel));
|
||||
rescan_button.signal_clicked().connect (mem_fun(*this, &PortInsertWindow::rescan));
|
||||
|
||||
delete_event.connect (bind (ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
|
||||
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
|
||||
pi.GoingAway.connect (mem_fun(*this, &PortInsertWindow::plugin_going_away));
|
||||
}
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ SoundFileBrowser::SoundFileBrowser()
|
|||
|
||||
dir_list->reparent(*dir_scroll);
|
||||
file_list->reparent(*file_scroll);
|
||||
file_list->set_selection_mode (GTK_SELECTION_MULTIPLE);
|
||||
file_list->set_selection_mode (Gtk::SELECTION_MULTIPLE);
|
||||
hbox->pack_start(*dir_scroll);
|
||||
hbox->pack_start(*file_scroll);
|
||||
vbox->pack_start(*hbox, true, true);
|
||||
|
@ -443,7 +443,7 @@ LibraryTree::LibraryTree ()
|
|||
scroll.set_size_request (200, 150);
|
||||
scroll.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
|
||||
scroll.add_with_viewport(tree);
|
||||
tree.set_selection_mode(GTK_SELECTION_MULTIPLE);
|
||||
tree.set_selection_mode(Gtk::SELECTION_MULTIPLE);
|
||||
|
||||
btn_box_top.pack_start(add_btn);
|
||||
btn_box_top.pack_start(folder_btn);
|
||||
|
|
|
@ -146,7 +146,7 @@ class SearchResults : public ArdourDialog
|
|||
sigc::signal<void, string, bool> file_chosen;
|
||||
|
||||
private:
|
||||
map<string,string> search_info;
|
||||
std::map<string,string> search_info;
|
||||
bool search_and;
|
||||
string selection;
|
||||
|
||||
|
@ -185,8 +185,8 @@ class LibraryTree : public Gtk::VBox
|
|||
void clear_selection ();
|
||||
|
||||
private:
|
||||
map<string, Gtk::TreeItem*> uri_mapping;
|
||||
map<string, string> uri_parent; // this ugly, but necessary
|
||||
std::map<string, Gtk::TreeItem*> uri_mapping;
|
||||
std::map<string, string> uri_parent; // this ugly, but necessary
|
||||
|
||||
string current_member;
|
||||
string current_group;
|
||||
|
|
|
@ -61,7 +61,7 @@ MeterBridge::MeterBridge ()
|
|||
meter_scroll_base.add (metering_hbox);
|
||||
|
||||
meter_viewport.add (meter_scroll_base);
|
||||
meter_viewport.set_shadow_type (GTK_SHADOW_NONE);
|
||||
meter_viewport.set_shadow_type (Gtk::SHADOW_NONE);
|
||||
|
||||
meter_scroller.add (meter_viewport);
|
||||
meter_scroller.set_name ("MeterBridgeWindow");
|
||||
|
@ -75,7 +75,7 @@ MeterBridge::MeterBridge ()
|
|||
set_wmclass (_("ardour_meter_bridge"), "Ardour");
|
||||
// set_policy (false, false, false); // no user resizing of any kind
|
||||
|
||||
delete_event.connect (bind (ptr_fun (just_hide_it), static_cast<Gtk::Window*>(this)));
|
||||
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), static_cast<Gtk::Window*>(this)));
|
||||
|
||||
metering = false;
|
||||
|
||||
|
@ -240,14 +240,14 @@ MeterBridge::toggle_metering ()
|
|||
}
|
||||
}
|
||||
|
||||
gint
|
||||
bool
|
||||
MeterBridge::on_map (GdkEventAny *ev)
|
||||
{
|
||||
start_metering ();
|
||||
return Window::on_map (ev);
|
||||
}
|
||||
|
||||
gint
|
||||
bool
|
||||
MeterBridge::on_unmap (GdkEventAny *ev)
|
||||
{
|
||||
stop_metering ();
|
||||
|
|
|
@ -176,7 +176,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
|
|||
ARDOUR_UI::instance()->tooltips().set_tip (pan_automation_style_button, _("Pan automation type"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_style_button, _("Gain automation type"));
|
||||
|
||||
hide_button.signal_set_event()s (hide_button.signal_get_event()s() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
hide_button.set_events (hide_button.get_events() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK));
|
||||
|
||||
width_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
hide_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
|
@ -388,7 +388,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
|
|||
pan_automation_state_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::pan_automation_state_button_event));
|
||||
pan_automation_state_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::pan_automation_state_button_event));
|
||||
|
||||
polarity_button.toggled.connect (mem_fun(*this, &MixerStrip::polarity_toggled));
|
||||
polarity_button.signal_toggled().connect (mem_fun(*this, &MixerStrip::polarity_toggled));
|
||||
|
||||
name_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::name_button_button_release));
|
||||
|
||||
|
@ -587,7 +587,7 @@ MixerStrip::edit_output_configuration ()
|
|||
}
|
||||
|
||||
if (output_selector->is_visible()) {
|
||||
output_selector->get_toplevel()->get_window().raise();
|
||||
output_selector->get_toplevel()->get_window()->raise();
|
||||
} else {
|
||||
output_selector->show_all ();
|
||||
}
|
||||
|
@ -601,7 +601,7 @@ MixerStrip::edit_input_configuration ()
|
|||
}
|
||||
|
||||
if (input_selector->is_visible()) {
|
||||
input_selector->get_toplevel()->get_window().raise();
|
||||
input_selector->get_toplevel()->get_window()->raise();
|
||||
} else {
|
||||
input_selector->show_all ();
|
||||
}
|
||||
|
@ -689,7 +689,7 @@ MixerStrip::add_connection_to_input_menu (ARDOUR::Connection* c)
|
|||
|
||||
if (current == c) {
|
||||
ignore_toggle = true;
|
||||
dynamic_cast<CheckMenuItem *> (citems.back())->set_active (true);
|
||||
dynamic_cast<CheckMenuItem *> (&citems.back())->set_active (true);
|
||||
ignore_toggle = false;
|
||||
}
|
||||
}
|
||||
|
@ -713,7 +713,7 @@ MixerStrip::add_connection_to_output_menu (ARDOUR::Connection* c)
|
|||
|
||||
if (current == c) {
|
||||
ignore_toggle = true;
|
||||
dynamic_cast<CheckMenuItem *> (citems.back())->set_active (true);
|
||||
dynamic_cast<CheckMenuItem *> (&citems.back())->set_active (true);
|
||||
ignore_toggle = false;
|
||||
}
|
||||
}
|
||||
|
@ -738,7 +738,7 @@ MixerStrip::select_stream_input ()
|
|||
|
||||
if (get_diskstream() == *i) {
|
||||
ignore_toggle = true;
|
||||
static_cast<CheckMenuItem *> (items.back())->set_active (true);
|
||||
static_cast<CheckMenuItem *> (&items.back())->set_active (true);
|
||||
ignore_toggle = false;
|
||||
}
|
||||
}
|
||||
|
@ -1127,7 +1127,7 @@ MixerStrip::comment_button_clicked ()
|
|||
void
|
||||
MixerStrip::setup_comment_editor ()
|
||||
{
|
||||
comment_window = new Window (GTK_WINDOW_TOPLEVEL);
|
||||
comment_window = new Window (WINDOW_TOPLEVEL);
|
||||
|
||||
string str;
|
||||
str = _route.name();
|
||||
|
@ -1136,8 +1136,8 @@ MixerStrip::setup_comment_editor ()
|
|||
|
||||
comment_area.set_name ("MixerTrackCommentArea");
|
||||
comment_area.set_editable (true);
|
||||
comment_area.signal_focus_in_event()().connect (ptr_fun (ARDOUR_UI::generic_focus_in_event));
|
||||
comment_area.signal_focus_out_event()().connect (ptr_fun (ARDOUR_UI::generic_focus_out_event));
|
||||
comment_area.signal_focus_in_event().connect (ptr_fun (ARDOUR_UI::generic_focus_in_event));
|
||||
comment_area.signal_focus_out_event().connect (ptr_fun (ARDOUR_UI::generic_focus_out_event));
|
||||
comment_area.changed.connect (mem_fun(*this, &MixerStrip::comment_edited));
|
||||
comment_area.signal_button_release_event().connect_after (ptr_fun (do_not_propagate));
|
||||
comment_area.show ();
|
||||
|
@ -1286,7 +1286,7 @@ MixerStrip::build_route_ops_menu ()
|
|||
items.push_back (MenuElem (_("Rename"), mem_fun(*this, &RouteUI::route_rename)));
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (CheckMenuElem (_("Active"), mem_fun(*this, &RouteUI::toggle_route_active)));
|
||||
route_active_menu_item = dynamic_cast<CheckMenuItem *> (items.back());
|
||||
route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
||||
route_active_menu_item->set_active (_route.active());
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
@ -1354,7 +1354,7 @@ MixerStrip::set_selected (bool yn)
|
|||
{
|
||||
AxisView::set_selected (yn);
|
||||
if (_selected) {
|
||||
global_frame.set_shadow_type (GTK_SHADOW_ETCHED_OUT);
|
||||
global_frame.set_shadow_type (Gtk::SHADOW_ETCHED_OUT);
|
||||
global_frame.set_name ("MixerStripSelectedFrame");
|
||||
} else {
|
||||
global_frame.set_shadow_type (Gtk::SHADOW_IN);
|
||||
|
|
|
@ -1097,10 +1097,10 @@ OptionEditor::setup_midi_options ()
|
|||
|
||||
midi_packer.pack_start (*mmcbuttonbox, false, false);
|
||||
|
||||
mmc_control_button.toggled.connect (bind (mem_fun(*this, &OptionEditor::mmc_control_toggled), &mmc_control_button));
|
||||
midi_control_button.toggled.connect (bind (mem_fun(*this, &OptionEditor::midi_control_toggled), &midi_control_button));
|
||||
send_mmc_button.toggled.connect (bind (mem_fun(*this, &OptionEditor::send_mmc_toggled), &send_mmc_button));
|
||||
midi_feedback_button.toggled.connect (bind (mem_fun(*this, &OptionEditor::midi_feedback_toggled), &midi_feedback_button));
|
||||
mmc_control_button.signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::mmc_control_toggled), &mmc_control_button));
|
||||
midi_control_button.signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::midi_control_toggled), &midi_control_button));
|
||||
send_mmc_button.signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::send_mmc_toggled), &send_mmc_button));
|
||||
midi_feedback_button.signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::midi_feedback_toggled), &midi_feedback_button));
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
|
@ -114,9 +114,9 @@ PannerUI::PannerUI (IO& io, Session& s)
|
|||
we need a pixmap in the button just to get started.
|
||||
*/
|
||||
|
||||
panning_link_direction_button.add (*(manage (new Pixmap (forwdblarrow_xpm))));
|
||||
panning_link_direction_button.add (*(manage (new Image (forwdblarrow_xpm))));
|
||||
|
||||
panning_link_direction_button.clicked.connect
|
||||
panning_link_direction_button.signal_clicked().connect
|
||||
(mem_fun(*this, &PannerUI::panning_link_direction_clicked));
|
||||
|
||||
panning_link_button.signal_button_press_event().connect
|
||||
|
@ -319,7 +319,7 @@ PannerUI::setup_pan ()
|
|||
_io.panner()[asz]->get_position (x);
|
||||
|
||||
pan_adjustments.push_back (new Adjustment (x, 0, 1.0, 0.05, 0.1));
|
||||
pan_adjustments.back()->value_changed.connect (bind (mem_fun(*this, &PannerUI::pan_adjustment_changed), (uint32_t) asz));
|
||||
pan_adjustments.back()->signal_value_changed().connect (bind (mem_fun(*this, &PannerUI::pan_adjustment_changed), (uint32_t) asz));
|
||||
|
||||
_io.panner()[asz]->Changed.connect (bind (mem_fun(*this, &PannerUI::pan_value_changed), (uint32_t) asz));
|
||||
|
||||
|
@ -332,10 +332,10 @@ PannerUI::setup_pan ()
|
|||
}
|
||||
|
||||
bc->set_name ("PanSlider");
|
||||
bc->set_shadow_type (GTK_SHADOW_NONE);
|
||||
bc->set_shadow_type (Gtk::SHADOW_NONE);
|
||||
bc->set_style (BarController::Line);
|
||||
bc->get_spin_button().signal_focus_in_event()().connect (mem_fun(*this, &PannerUI::entry_focus_event));
|
||||
bc->get_spin_button().signal_focus_out_event()().connect (mem_fun(*this, &PannerUI::entry_focus_event));
|
||||
bc->get_spin_button().signal_focus_in_event().connect (mem_fun(*this, &PannerUI::entry_focus_event));
|
||||
bc->get_spin_button().signal_focus_out_event().connect (mem_fun(*this, &PannerUI::entry_focus_event));
|
||||
|
||||
bc->StartGesture.connect (bind (mem_fun (_io, &IO::start_pan_touch), (uint32_t) asz));
|
||||
bc->StopGesture.connect (bind (mem_fun (_io, &IO::end_pan_touch), (uint32_t) asz));
|
||||
|
@ -434,17 +434,17 @@ PannerUI::build_pan_menu (uint32_t which)
|
|||
|
||||
/* set state first, connect second */
|
||||
|
||||
(dynamic_cast<CheckMenuItem*> (items.back()))->set_active (_io.panner()[which]->muted());
|
||||
(dynamic_cast<CheckMenuItem*> (items.back()))->toggled.connect
|
||||
(dynamic_cast<CheckMenuItem*> (&items.back()))->set_active (_io.panner()[which]->muted());
|
||||
(dynamic_cast<CheckMenuItem*> (&items.back()))->signal_toggled().connect
|
||||
(bind (mem_fun(*this, &PannerUI::pan_mute), which));
|
||||
|
||||
items.push_back (CheckMenuElem (_("Bypass"), mem_fun(*this, &PannerUI::pan_bypass_toggle)));
|
||||
bypass_menu_item = static_cast<CheckMenuItem*> (items.back());
|
||||
bypass_menu_item = static_cast<CheckMenuItem*> (&items.back());
|
||||
|
||||
/* set state first, connect second */
|
||||
|
||||
bypass_menu_item->set_active (_io.panner().bypassed());
|
||||
bypass_menu_item->toggled.connect (mem_fun(*this, &PannerUI::pan_bypass_toggle));
|
||||
bypass_menu_item->signal_toggled().connect (mem_fun(*this, &PannerUI::pan_bypass_toggle));
|
||||
|
||||
items.push_back (MenuElem (_("Reset"), mem_fun(*this, &PannerUI::pan_reset)));
|
||||
items.push_back (SeparatorElem());
|
||||
|
|
|
@ -97,13 +97,13 @@ PluginSelector::PluginSelector (PluginManager *mgr)
|
|||
table->set_size_request(750, 500);
|
||||
table->attach(notebook, 0, 7, 0, 5);
|
||||
|
||||
table->attach(*btn_add, 1, 2, 5, 6, Gtk::FILL, 0, 5, 5);
|
||||
table->attach(*btn_remove, 3, 4, 5, 6, Gtk::FILL, 0, 5, 5);
|
||||
table->attach(*btn_update, 5, 6, 5, 6, Gtk::FILL, 0, 5, 5);
|
||||
table->attach(*btn_add, 1, 2, 5, 6, Gtk::FILL, Gtk::FILL, 5, 5);
|
||||
table->attach(*btn_remove, 3, 4, 5, 6, Gtk::FILL, Gtk::FILL, 5, 5);
|
||||
table->attach(*btn_update, 5, 6, 5, 6, Gtk::FILL, Gtk::FILL, 5, 5);
|
||||
|
||||
table->attach(o_selector, 0, 7, 7, 9);
|
||||
table->attach(*btn_ok, 1, 3, 9, 10, Gtk::FILL, 0, 5, 5);
|
||||
table->attach(*btn_cancel, 3, 4, 9, 10, Gtk::FILL, 0, 5, 5);
|
||||
table->attach(*btn_ok, 1, 3, 9, 10, Gtk::FILL, Gtk::FILL, 5, 5);
|
||||
table->attach(*btn_cancel, 3, 4, 9, 10, Gtk::FILL, Gtk::FILL, 5, 5);
|
||||
add (*table);
|
||||
|
||||
using namespace Gtk::Notebook_Helpers;
|
||||
|
@ -138,12 +138,12 @@ PluginSelector::PluginSelector (PluginManager *mgr)
|
|||
#endif
|
||||
o_selector.selection_made.connect(mem_fun(*this, &PluginSelector::o_plugin_selected));
|
||||
o_selector.choice_made.connect(mem_fun(*this,&PluginSelector::o_plugin_chosen));
|
||||
btn_update-.signal_clicked().connect (mem_fun(*this, &PluginSelector::btn_update_clicked));
|
||||
btn_update->signal_clicked().connect (mem_fun(*this, &PluginSelector::btn_update_clicked));
|
||||
btn_add->clicked.connect(mem_fun(*this, &PluginSelector::btn_add_clicked));
|
||||
btn_remove->clicked.connect(mem_fun(*this, &PluginSelector::btn_remove_clicked));
|
||||
btn_ok->clicked.connect(mem_fun(*this, &PluginSelector::btn_ok_clicked));
|
||||
btn_cancel->clicked.connect(mem_fun(*this,&PluginSelector::btn_cancel_clicked));
|
||||
delete_event.connect (mem_fun(*this, &PluginSelector::wm_close));
|
||||
btn_remove->signal_clicked().connect(mem_fun(*this, &PluginSelector::btn_remove_clicked));
|
||||
btn_ok->signal_clicked().connect(mem_fun(*this, &PluginSelector::btn_ok_clicked));
|
||||
btn_cancel->signal_clicked().connect(mem_fun(*this,&PluginSelector::btn_cancel_clicked));
|
||||
signal_delete_event().connect (mem_fun(*this, &PluginSelector::wm_close));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ PluginUIWindow::PluginUIWindow (AudioEngine &engine, PluginInsert& insert, bool
|
|||
set_name ("PluginEditor");
|
||||
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
|
||||
|
||||
delete_event.connect (bind (ptr_fun (just_hide_it), reinterpret_cast<Window*> (this)));
|
||||
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window*> (this)));
|
||||
insert.GoingAway.connect (mem_fun(*this, &PluginUIWindow::plugin_going_away));
|
||||
|
||||
if (scrollable) {
|
||||
|
@ -285,7 +285,7 @@ PluginUI::build (AudioEngine &engine)
|
|||
}
|
||||
|
||||
button_table.attach (*cui, button_col, button_col + 1, button_row, button_row+1,
|
||||
Gtk::FILL|Gtk::EXPAND, 0);
|
||||
FILL|EXPAND, FILL);
|
||||
button_row++;
|
||||
|
||||
} else if (cui->display) {
|
||||
|
@ -299,7 +299,7 @@ PluginUI::build (AudioEngine &engine)
|
|||
}
|
||||
|
||||
output_table.attach (*cui, output_col, output_col + 1, output_row, output_row+1,
|
||||
Gtk::FILL|Gtk::EXPAND, 0);
|
||||
FILL|EXPAND, FILL);
|
||||
|
||||
output_row++;
|
||||
}
|
||||
|
@ -476,7 +476,7 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, MIDI::Contr
|
|||
control_ui->combo = new Gtk::Combo;
|
||||
control_ui->combo->set_value_in_list(true, false);
|
||||
set_popdown_strings (*control_ui->combo, setup_scale_values(port_index, control_ui));
|
||||
control_ui->combo->get_popwin()->signal_unmap_event(), un(*this, &PluginUI::control_combo_changed), control_ui));
|
||||
control_ui->combo->get_popwin()->signal_unmap_event(), mem_fun(*this, &PluginUI::control_combo_changed), control_ui));
|
||||
plugin.ParameterChanged.connect (bind (mem_fun(*this, &PluginUI::parameter_changed), control_ui));
|
||||
control_ui->pack_start(control_ui->label, true, true);
|
||||
control_ui->pack_start(*control_ui->combo, false, true);
|
||||
|
@ -500,7 +500,7 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, MIDI::Contr
|
|||
control_ui->pack_start (*control_ui->button, false, true);
|
||||
control_ui->pack_start (control_ui->automate_button, false, false);
|
||||
|
||||
control_ui->button-.signal_clicked().connect (bind (mem_fun(*this, &PluginUI::control_port_toggled), control_ui));
|
||||
control_ui->button->signal_clicked().connect (bind (mem_fun(*this, &PluginUI::control_port_toggled), control_ui));
|
||||
|
||||
if(plugin.get_parameter (port_index) == 1){
|
||||
control_ui->button->set_active(true);
|
||||
|
@ -550,8 +550,8 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, MIDI::Contr
|
|||
control_ui->control->set_style (BarController::LeftToRight);
|
||||
control_ui->control->set_use_parent (true);
|
||||
|
||||
control_ui->control->get_spin_button().signal_focus_in_event()().connect (mem_fun(*this, &PluginUI::entry_focus_event));
|
||||
control_ui->control->get_spin_button().signal_focus_out_event()().connect (mem_fun(*this, &PluginUI::entry_focus_event));
|
||||
control_ui->control->get_spin_button().signal_focus_in_event().connect (mem_fun(*this, &PluginUI::entry_focus_event));
|
||||
control_ui->control->get_spin_button().signal_focus_out_event().connect (mem_fun(*this, &PluginUI::entry_focus_event));
|
||||
|
||||
control_ui->control->StartGesture.connect (bind (mem_fun(*this, &PluginUI::start_touch), control_ui));
|
||||
control_ui->control->StopGesture.connect (bind (mem_fun(*this, &PluginUI::stop_touch), control_ui));
|
||||
|
@ -577,7 +577,7 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, MIDI::Contr
|
|||
}
|
||||
|
||||
control_ui->pack_start (control_ui->automate_button, false, false);
|
||||
control_ui->adjustment->value_changed.connect (bind (mem_fun(*this, &PluginUI::control_adjustment_changed), control_ui));
|
||||
control_ui->adjustment->signal_value_changed().connect (bind (mem_fun(*this, &PluginUI::control_adjustment_changed), control_ui));
|
||||
control_ui->automate_button.signal_clicked().connect (bind (mem_fun(*this, &PluginUI::astate_clicked), control_ui, (uint32_t) port_index));
|
||||
|
||||
automation_state_changed (control_ui);
|
||||
|
@ -712,7 +712,7 @@ PluginUI::update_control_display (ControlUI* cui)
|
|||
|
||||
cui->ignore_change++;
|
||||
if (cui->combo) {
|
||||
map<string,float>::iterator it;
|
||||
std::map<string,float>::iterator it;
|
||||
for (it = cui->combo_map->begin(); it != cui->combo_map->end(); ++it) {
|
||||
if (it->second == val) {
|
||||
cui->combo->get_entry()->set_text(it->first);
|
||||
|
@ -751,7 +751,7 @@ PluginUI::control_combo_changed (GdkEventAny* ignored, ControlUI* cui)
|
|||
{
|
||||
if (!cui->ignore_change) {
|
||||
string value = cui->combo->get_entry()->get_text();
|
||||
map<string,float> mapping = *cui->combo_map;
|
||||
std::map<string,float> mapping = *cui->combo_map;
|
||||
insert.set_parameter (cui->port_index, mapping[value]);
|
||||
}
|
||||
|
||||
|
@ -846,7 +846,7 @@ PluginUI::setup_scale_values(guint32 port_index, ControlUI* cui)
|
|||
list<string> enums;
|
||||
LadspaPlugin* lp = dynamic_cast<LadspaPlugin*> (&plugin);
|
||||
|
||||
cui->combo_map = new map<string, float>;
|
||||
cui->combo_map = new std::map<string, float>;
|
||||
lrdf_defaults* defaults = lrdf_get_scale_values(lp->unique_id(), port_index);
|
||||
if (defaults) {
|
||||
for (uint32_t i = 0; i < defaults->count; ++i) {
|
||||
|
@ -877,10 +877,10 @@ PlugUIBase::PlugUIBase (PluginInsert& pi)
|
|||
combo.get_popwin()->signal_unmap_event().connect(mem_fun(*this, &PlugUIBase::setting_selected));
|
||||
|
||||
save_button.set_name ("PluginSaveButton");
|
||||
save_button.clicked.connect(mem_fun(*this, &PlugUIBase::save_plugin_setting));
|
||||
save_button.signal_clicked().connect(mem_fun(*this, &PlugUIBase::save_plugin_setting));
|
||||
|
||||
bypass_button.set_name ("PluginBypassButton");
|
||||
bypass_button.toggled.connect (mem_fun(*this, &PlugUIBase::bypass_toggled));
|
||||
bypass_button.signal_toggled().connect (mem_fun(*this, &PlugUIBase::bypass_toggled));
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
|
@ -91,7 +91,7 @@ RedirectBox::RedirectBox (Placement pcmnt, Session& sess, Route& rt, PluginSelec
|
|||
redirect_display.drag_begin.connect (mem_fun(*this, &RedirectBox::redirect_drag_begin));
|
||||
redirect_display.drag_end.connect (mem_fun(*this, &RedirectBox::redirect_drag_end));
|
||||
redirect_display.set_size_request (-1, 48);
|
||||
redirect_display.set_selection_mode (GTK_SELECTION_MULTIPLE);
|
||||
redirect_display.set_selection_mode (Gtk::SELECTION_MULTIPLE);
|
||||
redirect_display.set_shadow_type (Gtk::SHADOW_IN);
|
||||
redirect_display.row_move.connect (mem_fun(*this, &RedirectBox::redirects_reordered));
|
||||
|
||||
|
@ -543,7 +543,7 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, IO& io)
|
|||
dialog.show_all ();
|
||||
|
||||
dialog.realize();
|
||||
dialog.get_window().set_decorations (GdkWMDecoration (GDK_DECOR_BORDER|GDK_DECOR_RESIZEH));
|
||||
dialog.get_window()->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
|
||||
|
||||
dialog.run ();
|
||||
}
|
||||
|
@ -749,7 +749,7 @@ RedirectBox::redirects_reordered (gint src, gint dst)
|
|||
something for idle time.
|
||||
*/
|
||||
|
||||
Gtk::Main::idle.connect (mem_fun(*this, &RedirectBox::compute_redirect_sort_keys));
|
||||
Glib::signal_idle().connect (mem_fun(*this, &RedirectBox::compute_redirect_sort_keys));
|
||||
}
|
||||
|
||||
gint
|
||||
|
@ -799,7 +799,7 @@ outputs do not work correctly."));
|
|||
dialog.show_all ();
|
||||
|
||||
dialog.realize();
|
||||
dialog.get_window().set_decorations (GdkWMDecoration (GDK_DECOR_BORDER|GDK_DECOR_RESIZEH));
|
||||
dialog.get_window()->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
|
||||
|
||||
dialog.run ();
|
||||
}
|
||||
|
@ -923,7 +923,7 @@ RedirectBox::rename_redirect (Redirect* redirect)
|
|||
ok_button.set_name ("EditorGTKButton");
|
||||
cancel_button.set_name ("EditorGTKButton");
|
||||
|
||||
entry.activate.connect (bind (mem_fun (dialog, &ArdourDialog::stop), 1));
|
||||
entry.signal_activate().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 1));
|
||||
cancel_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), -1));
|
||||
ok_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 1));
|
||||
|
||||
|
@ -1122,7 +1122,7 @@ RedirectBox::edit_redirect (Redirect* redirect)
|
|||
}
|
||||
|
||||
if (send_ui->is_visible()) {
|
||||
send_ui->get_window().raise ();
|
||||
send_ui->get_window()->raise ();
|
||||
} else {
|
||||
send_ui->show_all ();
|
||||
}
|
||||
|
@ -1169,7 +1169,7 @@ RedirectBox::edit_redirect (Redirect* redirect)
|
|||
}
|
||||
|
||||
if (plugin_ui->is_visible()) {
|
||||
plugin_ui->get_window().raise ();
|
||||
plugin_ui->get_window()->raise ();
|
||||
} else {
|
||||
plugin_ui->show_all ();
|
||||
}
|
||||
|
@ -1192,7 +1192,7 @@ RedirectBox::edit_redirect (Redirect* redirect)
|
|||
}
|
||||
|
||||
if (io_selector->is_visible()) {
|
||||
io_selector->get_window().raise ();
|
||||
io_selector->get_window()->raise ();
|
||||
} else {
|
||||
io_selector->show_all ();
|
||||
}
|
||||
|
|
|
@ -867,7 +867,7 @@ AudioRegionView::show_region_editor ()
|
|||
}
|
||||
|
||||
editor->show_all ();
|
||||
editor->get_window().raise();
|
||||
editor->get_window()->raise();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -60,7 +60,7 @@ const double TimeAxisViewItem::GRAB_HANDLE_LENGTH = 6 ;
|
|||
* @param start the start point of this item
|
||||
* @param duration the duration of this item
|
||||
*/
|
||||
TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GnomeCanvasGroup* parent, TimeAxisView& tv, double spu, GdkColor& base_color,
|
||||
TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GnomeCanvasGroup* parent, TimeAxisView& tv, double spu, Gdk::Color& base_color,
|
||||
jack_nframes_t start, jack_nframes_t duration,
|
||||
Visibility visibility)
|
||||
: trackview (tv)
|
||||
|
@ -557,7 +557,7 @@ TimeAxisViewItem::set_height(double height)
|
|||
*
|
||||
*/
|
||||
void
|
||||
TimeAxisViewItem::set_color(GdkColor& base_color)
|
||||
TimeAxisViewItem::set_color(Gdk::Color& base_color)
|
||||
{
|
||||
compute_colors (base_color);
|
||||
set_colors ();
|
||||
|
@ -929,7 +929,7 @@ TimeAxisViewItem::remove_this_item(void* src)
|
|||
defer to idle loop, otherwise we'll delete this object
|
||||
while we're still inside this function ...
|
||||
*/
|
||||
Gtk::Main::idle.connect(bind(mem_fun(&TimeAxisViewItem::idle_remove_this_item), this, src));
|
||||
Glib::signal_idle().connect(bind (sigc::ptr_fun (&TimeAxisViewItem::idle_remove_this_item), this, src));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -342,7 +342,7 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
|
|||
*
|
||||
* @param color the base color of the item
|
||||
*/
|
||||
virtual void compute_colors(GdkColor& color) ;
|
||||
virtual void compute_colors(Gdk::Color& color) ;
|
||||
|
||||
/**
|
||||
* convenience method to set the various canvas item colors
|
||||
|
|
|
@ -94,7 +94,7 @@ VisualTimeAxis::VisualTimeAxis(std::string name, PublicEditor& ed, ARDOUR::Sessi
|
|||
_color = unique_random_color() ;
|
||||
_marked_for_display = true;
|
||||
|
||||
name_entry.activate.connect(mem_fun(*this, &VisualTimeAxis::name_entry_changed)) ;
|
||||
name_entry.signal_activate().connect(mem_fun(*this, &VisualTimeAxis::name_entry_changed)) ;
|
||||
name_entry.signal_focus_out_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_focus_out_handler)) ;
|
||||
name_entry.signal_button_press_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_button_press_handler)) ;
|
||||
name_entry.signal_button_release_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_button_release_handler)) ;
|
||||
|
@ -103,7 +103,8 @@ VisualTimeAxis::VisualTimeAxis(std::string name, PublicEditor& ed, ARDOUR::Sessi
|
|||
size_button.set_name("TrackSizeButton") ;
|
||||
visual_button.set_name("TrackVisualButton") ;
|
||||
hide_button.set_name("TrackRemoveButton") ;
|
||||
hide_button.add(*(Gtk::manage(new Gtk::Image(small_x_xpm)))) ;
|
||||
Glib::RefPtr<Gdk::Pixbuf> small_x_pixbuf = Gdk::Pixbuf::create_from_xpm_data(small_x_xpm);
|
||||
hide_button.add(*(Gtk::manage(new Gtk::Image(small_x_pixbuf)))) ;
|
||||
size_button.signal_button_release_event().connect (mem_fun (*this, &VisualTimeAxis::size_click)) ;
|
||||
visual_button.signal_clicked().connect (mem_fun (*this, &VisualTimeAxis::visual_click)) ;
|
||||
hide_button.signal_clicked().connect (mem_fun (*this, &VisualTimeAxis::hide_click)) ;
|
||||
|
@ -247,15 +248,17 @@ bool
|
|||
VisualTimeAxis::choose_time_axis_color()
|
||||
{
|
||||
bool picked ;
|
||||
GdkColor color ;
|
||||
Gdk::Color color ;
|
||||
gdouble current[4] ;
|
||||
Gdk::Color* current_color ;
|
||||
|
||||
current[0] = _color.get_red() / 65535.0 ;
|
||||
current[1] = _color.get_green() / 65535.0 ;
|
||||
current[2] = _color.get_blue() / 65535.0 ;
|
||||
current[3] = 1.0 ;
|
||||
|
||||
color = Gtkmm2ext::UI::instance()->get_color(_("ardour: color selection"),picked, current) ;
|
||||
|
||||
current_color->set_rgb_p (current[0],current[1],current[2]);
|
||||
color = Gtkmm2ext::UI::instance()->get_color(_("ardour: color selection"),picked, current_color) ;
|
||||
|
||||
if (picked)
|
||||
{
|
||||
|
@ -270,7 +273,7 @@ VisualTimeAxis::choose_time_axis_color()
|
|||
* @param c the new TimeAxis color
|
||||
*/
|
||||
void
|
||||
VisualTimeAxis::set_time_axis_color(Gdk_Color c)
|
||||
VisualTimeAxis::set_time_axis_color(Gdk::Color c)
|
||||
{
|
||||
_color = c ;
|
||||
}
|
||||
|
@ -312,7 +315,7 @@ VisualTimeAxis::remove_this_time_axis(void* src)
|
|||
defer to idle loop, otherwise we'll delete this object
|
||||
while we're still inside this function ...
|
||||
*/
|
||||
Gtk::Main::idle.connect(bind(mem_fun(&VisualTimeAxis::idle_remove_this_time_axis), this, src));
|
||||
Glib::signal_idle().connect(bind(sigc::ptr_fun(&VisualTimeAxis::idle_remove_this_time_axis), this, src));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user