From d38e2213d79b1c8952c776a3b60f7709457edc0c Mon Sep 17 00:00:00 2001 From: Taybin Rutkin Date: Sun, 25 Sep 2005 21:19:23 +0000 Subject: replaced slot() with mem_fun() and ptr_fun(). git-svn-id: svn://localhost/trunk/ardour2@29 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/about.cc | 8 +- gtk2_ardour/add_route_dialog.cc | 6 +- gtk2_ardour/ardour_message.cc | 2 +- gtk2_ardour/ardour_ui.cc | 92 +++---- gtk2_ardour/ardour_ui2.cc | 72 ++--- gtk2_ardour/ardour_ui_dialogs.cc | 36 +-- gtk2_ardour/ardour_ui_ed.cc | 72 ++--- gtk2_ardour/audio_clock.cc | 154 +++++------ gtk2_ardour/audio_time_axis.cc | 134 +++++----- gtk2_ardour/automation_line.cc | 4 +- gtk2_ardour/automation_time_axis.cc | 32 +-- gtk2_ardour/connection_editor.cc | 42 +-- gtk2_ardour/crossfade_edit.cc | 34 +-- gtk2_ardour/crossfade_view.cc | 2 +- gtk2_ardour/default_keys.cc | 130 +++++----- gtk2_ardour/editor.cc | 418 +++++++++++++++--------------- gtk2_ardour/editor_edit_groups.cc | 6 +- gtk2_ardour/editor_export_audio.cc | 8 +- gtk2_ardour/editor_imageframe.cc | 10 +- gtk2_ardour/editor_keyboard.cc | 16 +- gtk2_ardour/editor_keys.cc | 240 ++++++++--------- gtk2_ardour/editor_markers.cc | 74 +++--- gtk2_ardour/editor_mixer.cc | 10 +- gtk2_ardour/editor_mouse.cc | 12 +- gtk2_ardour/editor_ops.cc | 36 +-- gtk2_ardour/editor_region_list.cc | 40 +-- gtk2_ardour/editor_route_list.cc | 24 +- gtk2_ardour/editor_rulers.cc | 80 +++--- gtk2_ardour/editor_selection_list.cc | 4 +- gtk2_ardour/editor_tempodisplay.cc | 6 +- gtk2_ardour/editor_timefx.cc | 12 +- gtk2_ardour/export_dialog.cc | 40 +-- gtk2_ardour/gain_meter.cc | 68 ++--- gtk2_ardour/imageframe_socket_handler.cc | 28 +- gtk2_ardour/imageframe_time_axis.cc | 28 +- gtk2_ardour/imageframe_time_axis_group.cc | 6 +- gtk2_ardour/imageframe_time_axis_view.cc | 6 +- gtk2_ardour/imageframe_view.cc | 4 +- gtk2_ardour/io_selector.cc | 48 ++-- gtk2_ardour/keyboard.cc | 18 +- gtk2_ardour/library_ui.cc | 106 ++++---- gtk2_ardour/location_ui.cc | 110 ++++---- gtk2_ardour/main.cc | 2 +- gtk2_ardour/marker.cc | 2 +- gtk2_ardour/marker_time_axis.cc | 22 +- gtk2_ardour/marker_time_axis_view.cc | 6 +- gtk2_ardour/meter_bridge.cc | 18 +- gtk2_ardour/meter_bridge_strip.cc | 6 +- gtk2_ardour/mixer_strip.cc | 168 ++++++------ gtk2_ardour/mixer_ui.cc | 88 +++---- gtk2_ardour/new_session_dialog.cc | 18 +- gtk2_ardour/option_editor.cc | 134 +++++----- gtk2_ardour/panner2d.cc | 6 +- gtk2_ardour/panner_ui.cc | 44 ++-- gtk2_ardour/playlist_selector.cc | 8 +- gtk2_ardour/plugin_selector.cc | 32 +-- gtk2_ardour/plugin_ui.cc | 58 ++--- gtk2_ardour/prompter.cc | 4 +- gtk2_ardour/redirect_box.cc | 86 +++--- gtk2_ardour/region_editor.cc | 66 ++--- gtk2_ardour/region_gain_line.cc | 8 +- gtk2_ardour/region_selection.cc | 2 +- gtk2_ardour/regionview.cc | 16 +- gtk2_ardour/route_params_ui.cc | 56 ++-- gtk2_ardour/route_redirect_selection.cc | 6 +- gtk2_ardour/route_ui.cc | 68 ++--- gtk2_ardour/send_ui.cc | 20 +- gtk2_ardour/streamview.cc | 60 ++--- gtk2_ardour/time_axis_view.cc | 22 +- gtk2_ardour/time_axis_view_item.cc | 2 +- gtk2_ardour/visual_time_axis.cc | 20 +- gtk2_ardour/vst_pluginui.cc | 2 +- 72 files changed, 1664 insertions(+), 1664 deletions(-) diff --git a/gtk2_ardour/about.cc b/gtk2_ardour/about.cc index 95c4b29ed6..4fed26d05d 100644 --- a/gtk2_ardour/about.cc +++ b/gtk2_ardour/about.cc @@ -247,7 +247,7 @@ Contributors:\n\t"); notebook->pages().push_back (TabElem (*translator_scroller, *translator_tab_label)); notebook->set_name ("AboutNoteBook"); - notebook->button_release_event.connect_after (bind (slot (stoppit), notebook)); + notebook->button_release_event.connect_after (bind (ptr_fun (stoppit), notebook)); logo_pixmap = 0; logo_height = 0; @@ -265,9 +265,9 @@ Contributors:\n\t"); load_logo (*this); vbox.pack_start (logo_area, false, false); - logo_area.expose_event.connect (slot (*this, &About::logo_area_expose)); + logo_area.expose_event.connect (mem_fun(*this, &About::logo_area_expose)); } else { - expose_event.connect (slot (*this, &About::logo_area_expose)); + expose_event.connect (mem_fun(*this, &About::logo_area_expose)); } small_label->set_name ("AboutWindowSmallLabel"); @@ -290,7 +290,7 @@ Contributors:\n\t"); subvbox.pack_start (*payment_box, false, false); #endif - delete_event.connect (bind (slot (just_hide_it), static_cast (this))); + delete_event.connect (bind (ptr_fun (just_hide_it), static_cast (this))); add (vbox); add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); diff --git a/gtk2_ardour/add_route_dialog.cc b/gtk2_ardour/add_route_dialog.cc index c1895bd976..faa527491d 100644 --- a/gtk2_ardour/add_route_dialog.cc +++ b/gtk2_ardour/add_route_dialog.cc @@ -114,9 +114,9 @@ AddRouteDialog::AddRouteDialog () add (*vb2); - delete_event.connect (slot (*this, &ArdourDialog::wm_close_event)); - ok_button.signal_clicked().connect (bind (slot (*this, &ArdourDialog::stop), 0)); - cancel_button.signal_clicked().connect (bind (slot (*this, &ArdourDialog::stop), 1)); + delete_event.connect (mem_fun(*this, &ArdourDialog::wm_close_event)); + ok_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), 0)); + cancel_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), 1)); } AddRouteDialog::~AddRouteDialog () diff --git a/gtk2_ardour/ardour_message.cc b/gtk2_ardour/ardour_message.cc index b0a414a69a..a34d73c721 100644 --- a/gtk2_ardour/ardour_message.cc +++ b/gtk2_ardour/ardour_message.cc @@ -39,7 +39,7 @@ ArdourMessage::ArdourMessage (Gtk::Window* parent, label.set_name (X_("PrompterLabel")); ok_button.set_name ("EditorGTKButton"); - ok_button.signal_clicked().connect (bind (slot (*this, &ArdourDialog::stop), 1)); + ok_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), 1)); packer.set_spacing (10); packer.set_border_width (10); diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 37792a8019..b9535f61dc 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -867,27 +867,27 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile) set_shuttle_units (Percentage); set_shuttle_behaviour (Sprung); - shuttle_unit_menu.items().push_back (MenuElem (_("Percentage"), bind (slot (*this, &ARDOUR_UI::set_shuttle_units), + shuttle_unit_menu.items().push_back (MenuElem (_("Percentage"), bind (mem_fun(*this, &ARDOUR_UI::set_shuttle_units), Percentage))); - shuttle_unit_menu.items().push_back (MenuElem (_("Semitones"), bind (slot (*this, &ARDOUR_UI::set_shuttle_units), + shuttle_unit_menu.items().push_back (MenuElem (_("Semitones"), bind (mem_fun(*this, &ARDOUR_UI::set_shuttle_units), Semitones))); - shuttle_style_menu.items().push_back (MenuElem (_("Sprung"), bind (slot (*this, &ARDOUR_UI::set_shuttle_behaviour), + shuttle_style_menu.items().push_back (MenuElem (_("Sprung"), bind (mem_fun(*this, &ARDOUR_UI::set_shuttle_behaviour), Sprung))); - shuttle_style_menu.items().push_back (MenuElem (_("Wheel"), bind (slot (*this, &ARDOUR_UI::set_shuttle_behaviour), + shuttle_style_menu.items().push_back (MenuElem (_("Wheel"), bind (mem_fun(*this, &ARDOUR_UI::set_shuttle_behaviour), Wheel))); gettimeofday (&last_peak_grab, 0); gettimeofday (&last_shuttle_request, 0); - ARDOUR::DiskStream::CannotRecordNoInput.connect (slot (*this, &ARDOUR_UI::cannot_record_no_input)); - ARDOUR::DiskStream::DeleteSources.connect (slot (*this, &ARDOUR_UI::delete_sources_in_the_right_thread)); - ARDOUR::DiskStream::DiskOverrun.connect (slot (*this, &ARDOUR_UI::disk_overrun_handler)); - ARDOUR::DiskStream::DiskUnderrun.connect (slot (*this, &ARDOUR_UI::disk_underrun_handler)); + ARDOUR::DiskStream::CannotRecordNoInput.connect (mem_fun(*this, &ARDOUR_UI::cannot_record_no_input)); + ARDOUR::DiskStream::DeleteSources.connect (mem_fun(*this, &ARDOUR_UI::delete_sources_in_the_right_thread)); + ARDOUR::DiskStream::DiskOverrun.connect (mem_fun(*this, &ARDOUR_UI::disk_overrun_handler)); + ARDOUR::DiskStream::DiskUnderrun.connect (mem_fun(*this, &ARDOUR_UI::disk_underrun_handler)); /* handle pending state with a dialog */ - ARDOUR::Session::AskAboutPendingState.connect (slot (*this, &ARDOUR_UI::pending_state_dialog)); + ARDOUR::Session::AskAboutPendingState.connect (mem_fun(*this, &ARDOUR_UI::pending_state_dialog)); channel_combo_strings = internationalize (channel_setup_names); @@ -897,7 +897,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile) void ARDOUR_UI::cannot_record_no_input (DiskStream* ds) { - ENSURE_GUI_THREAD (bind (slot (*this, &ARDOUR_UI::cannot_record_no_input), ds)); + ENSURE_GUI_THREAD (bind (mem_fun(*this, &ARDOUR_UI::cannot_record_no_input), ds)); string msg = compose (_("\ You cannot record-enable\n\ @@ -914,10 +914,10 @@ ARDOUR_UI::set_engine (AudioEngine& e) { engine = &e; - engine->Stopped.connect (slot (*this, &ARDOUR_UI::engine_stopped)); - engine->Running.connect (slot (*this, &ARDOUR_UI::engine_running)); - engine->Halted.connect (slot (*this, &ARDOUR_UI::engine_halted)); - engine->SampleRateChanged.connect (slot (*this, &ARDOUR_UI::update_sample_rate)); + engine->Stopped.connect (mem_fun(*this, &ARDOUR_UI::engine_stopped)); + engine->Running.connect (mem_fun(*this, &ARDOUR_UI::engine_running)); + engine->Halted.connect (mem_fun(*this, &ARDOUR_UI::engine_halted)); + engine->SampleRateChanged.connect (mem_fun(*this, &ARDOUR_UI::update_sample_rate)); _tooltips.enable(); @@ -953,14 +953,14 @@ ARDOUR_UI::set_engine (AudioEngine& e) /* start the time-of-day-clock */ update_wall_clock (); - Main::timeout.connect (slot (*this, &ARDOUR_UI::update_wall_clock), 60000); + Main::timeout.connect (mem_fun(*this, &ARDOUR_UI::update_wall_clock), 60000); update_disk_space (); update_cpu_load (); update_sample_rate (engine->frame_rate()); - starting.connect (slot (*this, &ARDOUR_UI::startup)); - stopping.connect (slot (*this, &ARDOUR_UI::shutdown)); + starting.connect (mem_fun(*this, &ARDOUR_UI::startup)); + stopping.connect (mem_fun(*this, &ARDOUR_UI::shutdown)); } ARDOUR_UI::~ARDOUR_UI () @@ -1019,7 +1019,7 @@ ARDOUR_UI::configure_handler (GdkEventConfigure* conf) gettimeofday (&last_configure_time, 0); } else { TimeoutSig t; - t.connect (slot (*this, &ARDOUR_UI::configure_timeout), 100); + t.connect (mem_fun(*this, &ARDOUR_UI::configure_timeout), 100); have_configure_timeout = true; } @@ -1063,7 +1063,7 @@ ARDOUR_UI::startup () with the scheduling of the audio thread. */ - Gtk::Main::idle.connect (slot (*this, &ARDOUR_UI::start_engine)); + Gtk::Main::idle.connect (mem_fun(*this, &ARDOUR_UI::start_engine)); } void @@ -1134,9 +1134,9 @@ ARDOUR_UI::ask_about_saving_session (string what) prompt_label.set_alignment (0.5, 0.5); prompt_label.set_name (X_("PrompterLabel")); - save_button.signal_clicked().connect (bind(slot(window,&ArdourDialog::stop), 1)); - nosave_button.signal_clicked().connect (bind(slot(window,&ArdourDialog::stop), 0)); - noquit_button.signal_clicked().connect (bind(slot(window,&ArdourDialog::stop), -1)); + save_button.signal_clicked().connect (bind(mem_fun(window,&ArdourDialog::stop), 1)); + nosave_button.signal_clicked().connect (bind(mem_fun(window,&ArdourDialog::stop), 0)); + noquit_button.signal_clicked().connect (bind(mem_fun(window,&ArdourDialog::stop), -1)); button_packer.set_spacing (10); button_packer.pack_start (save_button); @@ -1212,7 +1212,7 @@ ARDOUR_UI::update_sample_rate (jack_nframes_t ignored) { char buf[32]; - ENSURE_GUI_THREAD (bind (slot (*this, &ARDOUR_UI::update_sample_rate), ignored)); + ENSURE_GUI_THREAD (bind (mem_fun(*this, &ARDOUR_UI::update_sample_rate), ignored)); if (!engine->connected()) { @@ -1472,7 +1472,7 @@ ARDOUR_UI::map_button_state () void ARDOUR_UI::queue_map_control_change (Session::ControlType t) { - ENSURE_GUI_THREAD (bind (slot (*this, &ARDOUR_UI::map_control_change), t)); + ENSURE_GUI_THREAD (bind (mem_fun(*this, &ARDOUR_UI::map_control_change), t)); } void @@ -1815,9 +1815,9 @@ ARDOUR_UI::build_session_selector () session_selector_window->set_name ("SessionSelectorWindow"); session_selector_window->set_size_request (200, 400); - session_selector_window->delete_event.connect (bind (slot (just_hide_it), static_cast(session_selector_window))); - cancel_button-.signal_clicked().connect (bind (slot (*this, &ARDOUR_UI::hide_dialog), session_selector_window)); - session_selector.tree_select_row.connect (slot (*this, &ARDOUR_UI::session_selection)); + session_selector_window->delete_event.connect (bind (ptr_fun (just_hide_it), static_cast(session_selector_window))); + cancel_button-.signal_clicked().connect (bind (mem_fun(*this, &ARDOUR_UI::hide_dialog), session_selector_window)); + session_selector.tree_select_row.connect (mem_fun(*this, &ARDOUR_UI::session_selection)); } void @@ -1842,9 +1842,9 @@ ARDOUR_UI::open_session () if (open_session_selector == 0) { open_session_selector = new Gtk::FileSelection(_("open session")); - open_session_selector->get_ok_button()-.signal_clicked().connect (slot (*this, &ARDOUR_UI::open_ok_clicked)); - open_session_selector->get_cancel_button()-.signal_clicked().connect (bind (slot (*this, &ARDOUR_UI::fs_cancel_clicked), open_session_selector)); - open_session_selector->delete_event.connect (bind (slot (*this, &ARDOUR_UI::fs_delete_event), open_session_selector)); + open_session_selector->get_ok_button()-.signal_clicked().connect (mem_fun(*this, &ARDOUR_UI::open_ok_clicked)); + open_session_selector->get_cancel_button()-.signal_clicked().connect (bind (mem_fun(*this, &ARDOUR_UI::fs_cancel_clicked), open_session_selector)); + open_session_selector->delete_event.connect (bind (mem_fun(*this, &ARDOUR_UI::fs_delete_event), open_session_selector)); } open_session_selector->show_all (); @@ -2226,7 +2226,7 @@ ARDOUR_UI::toggle_record_enable (guint32 dstream) void ARDOUR_UI::queue_transport_change () { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &ARDOUR_UI::map_transport_state)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &ARDOUR_UI::map_transport_state)); } void @@ -2281,7 +2281,7 @@ ARDOUR_UI::GlobalClickBox::printer (char buf[32], Adjustment &adj, void *arg) void ARDOUR_UI::engine_stopped () { - ENSURE_GUI_THREAD (slot (*this, &ARDOUR_UI::engine_stopped)); + ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::engine_stopped)); jack_disconnect_item->set_sensitive (false); jack_reconnect_item->set_sensitive (true); @@ -2292,7 +2292,7 @@ ARDOUR_UI::engine_stopped () void ARDOUR_UI::engine_running () { - ENSURE_GUI_THREAD (slot (*this, &ARDOUR_UI::engine_running)); + ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::engine_running)); jack_disconnect_item->set_sensitive (true); jack_reconnect_item->set_sensitive (false); @@ -2302,7 +2302,7 @@ ARDOUR_UI::engine_running () void ARDOUR_UI::engine_halted () { - ENSURE_GUI_THREAD (slot (*this, &ARDOUR_UI::engine_halted)); + ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::engine_halted)); jack_disconnect_item->set_sensitive (false); jack_reconnect_item->set_sensitive (true); @@ -2361,7 +2361,7 @@ ARDOUR_UI::start_engine () solution, its what we have. */ - Main::timeout.connect (slot (*this, &ARDOUR_UI::make_session_clean), 1000); + Main::timeout.connect (mem_fun(*this, &ARDOUR_UI::make_session_clean), 1000); } return FALSE; @@ -2376,7 +2376,7 @@ ARDOUR_UI::update_clocks () void ARDOUR_UI::start_clocking () { - clock_signal_connection = RapidScreenUpdate.connect (slot (*this, &ARDOUR_UI::update_clocks)); + clock_signal_connection = RapidScreenUpdate.connect (mem_fun(*this, &ARDOUR_UI::update_clocks)); } void @@ -2445,7 +2445,7 @@ ARDOUR_UI::add_diskstream_to_menu (DiskStream& dstream) } MenuList& items = diskstream_menu->items(); - items.push_back (MenuElem (dstream.name(), bind (slot (*this, &ARDOUR_UI::diskstream_selected), (gint32) dstream.id()))); + items.push_back (MenuElem (dstream.name(), bind (mem_fun(*this, &ARDOUR_UI::diskstream_selected), (gint32) dstream.id()))); } void @@ -2471,7 +2471,7 @@ ARDOUR_UI::select_diskstream (GdkEventButton *ev) using namespace Menu_Helpers; MenuList& items = diskstream_menu->items(); - items.push_back (MenuElem (_("No Stream"), (bind (slot (*this, &ARDOUR_UI::diskstream_selected), -1)))); + items.push_back (MenuElem (_("No Stream"), (bind (mem_fun(*this, &ARDOUR_UI::diskstream_selected), -1)))); session->foreach_diskstream (this, &ARDOUR_UI::add_diskstream_to_menu); @@ -3067,8 +3067,8 @@ Unused audio files will be moved to a \"dead sounds\" location.")); checker.realize (); checker.get_window().set_decorations (GdkWMDecoration (GDK_DECOR_BORDER|GDK_DECOR_RESIZEH)); - ok_button.signal_clicked().connect (bind (slot (checker, &ArdourDialog::stop), 1)); - cancel_button.signal_clicked().connect (bind (slot (checker, &ArdourDialog::stop), 0)); + ok_button.signal_clicked().connect (bind (mem_fun (checker, &ArdourDialog::stop), 1)); + cancel_button.signal_clicked().connect (bind (mem_fun (checker, &ArdourDialog::stop), 0)); checker.run (); @@ -3222,7 +3222,7 @@ ARDOUR_UI::keyboard_settings () const void ARDOUR_UI::halt_on_xrun_message () { - ENSURE_GUI_THREAD (slot (*this, &ARDOUR_UI::halt_on_xrun_message)); + ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::halt_on_xrun_message)); ArdourMessage msg (editor, X_("haltonxrun"), _("Recording was stopped because your system could not keep up.")); @@ -3231,7 +3231,7 @@ ARDOUR_UI::halt_on_xrun_message () void ARDOUR_UI::delete_sources_in_the_right_thread (list* deletion_list) { - ENSURE_GUI_THREAD (bind (slot (*this, &ARDOUR_UI::delete_sources_in_the_right_thread), deletion_list)); + ENSURE_GUI_THREAD (bind (mem_fun(*this, &ARDOUR_UI::delete_sources_in_the_right_thread), deletion_list)); for (list::iterator i = deletion_list->begin(); i != deletion_list->end(); ++i) { delete *i; @@ -3243,7 +3243,7 @@ ARDOUR_UI::delete_sources_in_the_right_thread (list* deletion_l void ARDOUR_UI::disk_overrun_handler () { - ENSURE_GUI_THREAD (slot (*this, &ARDOUR_UI::disk_underrun_handler)); + ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::disk_underrun_handler)); if (!have_disk_overrun_displayed) { have_disk_overrun_displayed = true; @@ -3260,7 +3260,7 @@ quickly enough to keep up with recording.\n")); void ARDOUR_UI::disk_underrun_handler () { - ENSURE_GUI_THREAD (slot (*this, &ARDOUR_UI::disk_underrun_handler)); + ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::disk_underrun_handler)); if (!have_disk_underrun_displayed) { have_disk_underrun_displayed = true; @@ -3312,8 +3312,8 @@ what you would like to do.\n")); hpacker.pack_start (use_button); hpacker.pack_start (cancel_button); - use_button.signal_clicked().connect (bind (slot (dialog, &ArdourDialog::stop), 0)); - cancel_button.signal_clicked().connect (bind (slot (dialog, &ArdourDialog::stop), 1)); + use_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 0)); + cancel_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 1)); dialog.add (vpacker); dialog.set_position (GTK_WIN_POS_CENTER); diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index b748bb4249..b87b6d352c 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -102,7 +102,7 @@ ARDOUR_UI::setup_adjustables () online_control_button = new GlobalClickBox ("CONTROL", online_control_strings); - online_control_button->adjustment.value_changed.connect(slot (*this,&ARDOUR_UI::control_methods_adjusted)); + online_control_button->adjustment.value_changed.connect(mem_fun(*this,&ARDOUR_UI::control_methods_adjusted)); mmc_id_strings.push_back ("1"); mmc_id_strings.push_back ("2"); @@ -116,7 +116,7 @@ ARDOUR_UI::setup_adjustables () mmc_id_button = new GlobalClickBox (_("MMC ID"), mmc_id_strings); - mmc_id_button->adjustment.value_changed.connect (slot (*this,&ARDOUR_UI::mmc_device_id_adjusted)); + mmc_id_button->adjustment.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); @@ -198,9 +198,9 @@ ARDOUR_UI::setup_transport () transport_frame.set_name ("BaseFrame"); transport_frame.add (transport_base); - transport_tearoff->Detach.connect (bind (slot (*this, &ARDOUR_UI::detach_tearoff), static_cast(&top_packer), + transport_tearoff->Detach.connect (bind (mem_fun(*this, &ARDOUR_UI::detach_tearoff), static_cast(&top_packer), static_cast(&transport_frame))); - transport_tearoff->Attach.connect (bind (slot (*this, &ARDOUR_UI::reattach_tearoff), static_cast (&top_packer), + transport_tearoff->Attach.connect (bind (mem_fun(*this, &ARDOUR_UI::reattach_tearoff), static_cast (&top_packer), static_cast (&transport_frame), 1)); @@ -280,25 +280,25 @@ ARDOUR_UI::setup_transport () 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 (slot (*this,&ARDOUR_UI::transport_goto_start)); - goto_end_button.signal_clicked().connect (slot (*this,&ARDOUR_UI::transport_goto_end)); + 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)); - roll_button.button_release_event.connect (slot (*this,&ARDOUR_UI::mouse_transport_roll)); - play_selection_button.button_release_event.connect (slot (*this,&ARDOUR_UI::mouse_transport_play_selection)); - auto_loop_button.button_release_event.connect (slot (*this,&ARDOUR_UI::mouse_transport_loop)); + roll_button.button_release_event.connect (mem_fun(*this,&ARDOUR_UI::mouse_transport_roll)); + play_selection_button.button_release_event.connect (mem_fun(*this,&ARDOUR_UI::mouse_transport_play_selection)); + auto_loop_button.button_release_event.connect (mem_fun(*this,&ARDOUR_UI::mouse_transport_loop)); - stop_button.button_release_event.connect (slot (*this,&ARDOUR_UI::mouse_transport_stop)); - rec_button.button_release_event.connect (slot (*this,&ARDOUR_UI::mouse_transport_record)); + stop_button.button_release_event.connect (mem_fun(*this,&ARDOUR_UI::mouse_transport_stop)); + rec_button.button_release_event.connect (mem_fun(*this,&ARDOUR_UI::mouse_transport_record)); - shuttle_box.button_press_event.connect (slot (*this, &ARDOUR_UI::shuttle_box_button_press)); - shuttle_box.button_release_event.connect (slot (*this, &ARDOUR_UI::shuttle_box_button_release)); - shuttle_box.motion_notify_event.connect (slot (*this, &ARDOUR_UI::shuttle_box_motion)); - shuttle_box.expose_event.connect (slot (*this, &ARDOUR_UI::shuttle_box_expose)); + shuttle_box.button_press_event.connect (mem_fun(*this, &ARDOUR_UI::shuttle_box_button_press)); + shuttle_box.button_release_event.connect (mem_fun(*this, &ARDOUR_UI::shuttle_box_button_release)); + shuttle_box.motion_notify_event.connect (mem_fun(*this, &ARDOUR_UI::shuttle_box_motion)); + shuttle_box.expose_event.connect (mem_fun(*this, &ARDOUR_UI::shuttle_box_expose)); /* clocks, etc. */ - ARDOUR_UI::Clock.connect (bind (slot (primary_clock, &AudioClock::set), false)); - ARDOUR_UI::Clock.connect (bind (slot (secondary_clock, &AudioClock::set), false)); + ARDOUR_UI::Clock.connect (bind (mem_fun (primary_clock, &AudioClock::set), false)); + ARDOUR_UI::Clock.connect (bind (mem_fun (secondary_clock, &AudioClock::set), false)); primary_clock.set_mode (AudioClock::SMPTE); primary_clock.set_name ("TransportClockDisplay"); @@ -306,21 +306,21 @@ ARDOUR_UI::setup_transport () secondary_clock.set_name ("TransportClockDisplay"); - primary_clock.ValueChanged.connect (slot (*this, &ARDOUR_UI::primary_clock_value_changed)); - secondary_clock.ValueChanged.connect (slot (*this, &ARDOUR_UI::secondary_clock_value_changed)); + primary_clock.ValueChanged.connect (mem_fun(*this, &ARDOUR_UI::primary_clock_value_changed)); + secondary_clock.ValueChanged.connect (mem_fun(*this, &ARDOUR_UI::secondary_clock_value_changed)); ARDOUR_UI::instance()->tooltips().set_tip (primary_clock, _("Primary clock")); ARDOUR_UI::instance()->tooltips().set_tip (secondary_clock, _("secondary clock")); /* options */ - auto_return_button.toggled.connect (slot (*this,&ARDOUR_UI::toggle_auto_return)); - auto_play_button.toggled.connect (slot (*this,&ARDOUR_UI::toggle_auto_play)); - auto_input_button.toggled.connect (slot (*this,&ARDOUR_UI::toggle_auto_input)); - click_button.toggled.connect (slot (*this,&ARDOUR_UI::toggle_click)); - follow_button.toggled.connect (slot (*this,&ARDOUR_UI::toggle_follow)); - punch_in_button.toggled.connect (slot (*this,&ARDOUR_UI::toggle_punch_in)); - punch_out_button.toggled.connect (slot (*this,&ARDOUR_UI::toggle_punch_out)); + 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)); preroll_button.unset_flags (Gtk::CAN_FOCUS); preroll_button.set_events (preroll_button.get_events() & ~(GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK)); @@ -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 (slot (*this,&ARDOUR_UI::solo_alert_toggle)); + solo_alert_button.pressed.connect (mem_fun(*this,&ARDOUR_UI::solo_alert_toggle)); auditioning_alert_button.set_name ("TransportAuditioningAlert"); - auditioning_alert_button.pressed.connect (slot (*this,&ARDOUR_UI::audition_alert_toggle)); + auditioning_alert_button.pressed.connect (mem_fun(*this,&ARDOUR_UI::audition_alert_toggle)); alert_box.pack_start (solo_alert_button); alert_box.pack_start (auditioning_alert_button); @@ -366,10 +366,10 @@ ARDOUR_UI::setup_transport () speed_display_box.set_name (X_("ShuttleDisplay")); shuttle_units_button.set_name (X_("ShuttleButton")); - shuttle_units_button.signal_clicked().connect (slot (*this, &ARDOUR_UI::shuttle_unit_clicked)); + shuttle_units_button.signal_clicked().connect (mem_fun(*this, &ARDOUR_UI::shuttle_unit_clicked)); shuttle_style_button.set_name (X_("ShuttleButton")); - shuttle_style_button.signal_clicked().connect (slot (*this, &ARDOUR_UI::shuttle_style_clicked)); + shuttle_style_button.signal_clicked().connect (mem_fun(*this, &ARDOUR_UI::shuttle_style_clicked)); Gtk::Frame* sdframe = manage (new Frame); @@ -422,7 +422,7 @@ ARDOUR_UI::setup_transport () void ARDOUR_UI::setup_clock () { - ARDOUR_UI::Clock.connect (bind (slot (big_clock, &AudioClock::set), false)); + ARDOUR_UI::Clock.connect (bind (mem_fun (big_clock, &AudioClock::set), false)); big_clock_window = new BigClockWindow; @@ -430,11 +430,11 @@ ARDOUR_UI::setup_clock () big_clock_window->add (big_clock); big_clock_window->set_title (_("ardour: clock")); - big_clock_window->delete_event.connect (bind (slot (just_hide_it), static_cast(big_clock_window))); - big_clock_window->realize.connect (slot (*this, &ARDOUR_UI::big_clock_realize)); - big_clock_window->size_allocate.connect (slot (*this, &ARDOUR_UI::big_clock_size_event)); + big_clock_window->delete_event.connect (bind (ptr_fun (just_hide_it), static_cast(big_clock_window))); + big_clock_window->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 (slot (*this, &ARDOUR_UI::big_clock_hiding)); + big_clock_window->Hiding.connect (mem_fun(*this, &ARDOUR_UI::big_clock_hiding)); } void @@ -483,7 +483,7 @@ ARDOUR_UI::_auditioning_changed (bool onoff) void ARDOUR_UI::auditioning_changed (bool onoff) { - Gtkmm2ext::UI::instance()->call_slot(bind (slot (*this, &ARDOUR_UI::_auditioning_changed), onoff)); + Gtkmm2ext::UI::instance()->call_slot(bind (mem_fun(*this, &ARDOUR_UI::_auditioning_changed), onoff)); } void diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index bf5a84a586..6f727e3004 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -46,7 +46,7 @@ ARDOUR_UI::connect_to_session (Session *s) { session = s; - session->HaltOnXrun.connect (slot (*this, &ARDOUR_UI::halt_on_xrun_message)); + session->HaltOnXrun.connect (mem_fun(*this, &ARDOUR_UI::halt_on_xrun_message)); /* sensitize menu bar options that are now valid */ @@ -84,7 +84,7 @@ ARDOUR_UI::connect_to_session (Session *s) if (session->n_diskstreams()) { // meter_bridge_dialog_check->set_sensitive (true); } else { - session->DiskStreamAdded.connect (slot (*this, &ARDOUR_UI::diskstream_added)); + session->DiskStreamAdded.connect (mem_fun(*this, &ARDOUR_UI::diskstream_added)); } if (connection_editor) { @@ -104,21 +104,21 @@ ARDOUR_UI::connect_to_session (Session *s) } - Blink.connect (slot (*this, &ARDOUR_UI::transport_rec_enable_blink)); - Blink.connect (slot (*this, &ARDOUR_UI::solo_blink)); - Blink.connect (slot (*this, &ARDOUR_UI::audition_blink)); + Blink.connect (mem_fun(*this, &ARDOUR_UI::transport_rec_enable_blink)); + Blink.connect (mem_fun(*this, &ARDOUR_UI::solo_blink)); + Blink.connect (mem_fun(*this, &ARDOUR_UI::audition_blink)); /* these are all need to be handled in an RT-safe and MT way, so don't do any GUI work, just queue it for handling by the GUI thread. */ - session->TransportStateChange.connect (slot (*this, &ARDOUR_UI::queue_transport_change)); - session->ControlChanged.connect (slot (*this, &ARDOUR_UI::queue_map_control_change)); + session->TransportStateChange.connect (mem_fun(*this, &ARDOUR_UI::queue_transport_change)); + session->ControlChanged.connect (mem_fun(*this, &ARDOUR_UI::queue_map_control_change)); /* alert the user to these things happening */ - session->AuditionActive.connect (slot (*this, &ARDOUR_UI::auditioning_changed)); - session->SoloActive.connect (slot (*this, &ARDOUR_UI::soloing_changed)); + session->AuditionActive.connect (mem_fun(*this, &ARDOUR_UI::auditioning_changed)); + session->SoloActive.connect (mem_fun(*this, &ARDOUR_UI::soloing_changed)); solo_alert_button.set_active (session->soloing()); @@ -146,9 +146,9 @@ ARDOUR_UI::connect_to_session (Session *s) transport_stopped (); - second_connection = Main::timeout.connect (slot (*this, &ARDOUR_UI::every_second), 1000); - point_one_second_connection = Main::timeout.connect (slot (*this, &ARDOUR_UI::every_point_one_seconds), 100); - point_zero_one_second_connection = Main::timeout.connect (slot (*this, &ARDOUR_UI::every_point_zero_one_seconds), 40); + 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); } int @@ -232,7 +232,7 @@ ARDOUR_UI::create_meter_bridge () { if (meter_bridge == 0) { meter_bridge = new MeterBridge (); - meter_bridge->Hiding.connect (slot (*this, &ARDOUR_UI::meter_bridge_hiding)); + meter_bridge->Hiding.connect (mem_fun(*this, &ARDOUR_UI::meter_bridge_hiding)); } return 0; } @@ -248,7 +248,7 @@ ARDOUR_UI::create_connection_editor () { if (connection_editor == 0) { connection_editor = new ConnectionEditor (); - connection_editor->Hiding.connect (slot (*this, &ARDOUR_UI::connection_editor_hiding)); + connection_editor->Hiding.connect (mem_fun(*this, &ARDOUR_UI::connection_editor_hiding)); } if (session) { @@ -308,7 +308,7 @@ ARDOUR_UI::toggle_options_window () { if (option_editor == 0) { option_editor = new OptionEditor (*this, *editor, *mixer); - option_editor->Hiding.connect(slot(*this, &ARDOUR_UI::option_hiding)); + option_editor->Hiding.connect(mem_fun(*this, &ARDOUR_UI::option_hiding)); option_editor->set_session (session); } else if (option_editor->within_hiding()) { return; @@ -354,7 +354,7 @@ ARDOUR_UI::create_location_ui () if (location_ui == 0) { location_ui = new LocationUI (); location_ui->set_session (session); - location_ui->Hiding.connect (slot (*this, &ARDOUR_UI::location_ui_hiding)); + location_ui->Hiding.connect (mem_fun(*this, &ARDOUR_UI::location_ui_hiding)); } return 0; } @@ -389,7 +389,7 @@ ARDOUR_UI::create_route_params () if (route_params == 0) { route_params = new RouteParams_UI (*engine); route_params->set_session (session); - route_params->Hiding.connect (slot (*this, &ARDOUR_UI::route_params_hiding)); + route_params->Hiding.connect (mem_fun(*this, &ARDOUR_UI::route_params_hiding)); } return 0; } @@ -423,7 +423,7 @@ ARDOUR_UI::get_sfdb_window () { if (sfdb_window == 0) { sfdb_window = new SoundFileSelector (); - sfdb_window->Hiding.connect (slot (*this, &ARDOUR_UI::sfdb_hiding)); + sfdb_window->Hiding.connect (mem_fun(*this, &ARDOUR_UI::sfdb_hiding)); sfdb_window->hide_all (); } diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 1b1838b78d..38d0ac14ac 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -51,7 +51,7 @@ ARDOUR_UI::create_editor () return -1; } - editor->DisplayControlChanged.connect (slot (*this, &ARDOUR_UI::editor_display_control_changed)); + editor->DisplayControlChanged.connect (mem_fun(*this, &ARDOUR_UI::editor_display_control_changed)); return 0; } @@ -72,16 +72,16 @@ ARDOUR_UI::build_menu_bar () MenuList& session_items = session_menu->items(); session_menu->set_name ("ArdourContextMenu"); - session_items.push_back (MenuElem (_("New"), bind (slot (*this, &ARDOUR_UI::new_session), false, string ()))); - session_items.push_back (MenuElem (_("Open"), slot (*this, &ARDOUR_UI::open_session))); - session_items.push_back (MenuElem (_("Recent"), slot (*this, &ARDOUR_UI::open_recent_session))); - session_items.push_back (MenuElem (_("Close"), slot (*this, &ARDOUR_UI::close_session))); + session_items.push_back (MenuElem (_("New"), bind (mem_fun(*this, &ARDOUR_UI::new_session), false, string ()))); + 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->set_sensitive (false); session_items.push_back (SeparatorElem()); - session_items.push_back (MenuElem (_("Add Track/Bus"), slot (*this, &ARDOUR_UI::add_route))); + session_items.push_back (MenuElem (_("Add Track/Bus"), mem_fun(*this, &ARDOUR_UI::add_route))); add_track_item = session_items.back (); add_track_item->set_sensitive (false); @@ -96,7 +96,7 @@ ARDOUR_UI::build_menu_bar () Menu* image_compositor_menu = manage(new Menu()); MenuList& image_compositor_items = image_compositor_menu->items(); image_compositor_menu->set_name ("ArdourContextMenu"); - image_compositor_items.push_back(MenuElem (_("Connect"), (slot (editor, &PublicEditor::connect_to_image_compositor)))) ; + 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->set_sensitive(false) ; @@ -111,11 +111,11 @@ ARDOUR_UI::build_menu_bar () /* */ - session_items.push_back (MenuElem (_("Save"), bind (slot (*this, &ARDOUR_UI::save_state), string("")))); + session_items.push_back (MenuElem (_("Save"), bind (mem_fun(*this, &ARDOUR_UI::save_state), string("")))); save_item = session_items.back(); save_item->set_sensitive (false); - session_items.push_back (MenuElem (_("Snapshot"), slot (*this, &ARDOUR_UI::snapshot_session))); + session_items.push_back (MenuElem (_("Snapshot"), mem_fun(*this, &ARDOUR_UI::snapshot_session))); snapshot_item = session_items.back(); snapshot_item->set_sensitive (false); /* @@ -123,15 +123,15 @@ ARDOUR_UI::build_menu_bar () save_as_item = session_items.back(); save_as_item->set_sensitive (false); */ - session_items.push_back (MenuElem (_("Save Template..."), slot (*this, &ARDOUR_UI::save_template))); + session_items.push_back (MenuElem (_("Save Template..."), mem_fun(*this, &ARDOUR_UI::save_template))); save_template_item = session_items.back(); save_template_item->set_sensitive (false); Menu *export_menu = manage (new Menu); MenuList& export_items = export_menu->items(); export_menu->set_name ("ArdourContextMenu"); - export_items.push_back (MenuElem (_("Export session to audiofile..."), slot (*editor, &PublicEditor::export_session))); - export_items.push_back (MenuElem (_("Export range to audiofile..."), slot (*editor, &PublicEditor::export_selection))); + export_items.push_back (MenuElem (_("Export session to audiofile..."), mem_fun (*editor, &PublicEditor::export_session))); + export_items.push_back (MenuElem (_("Export range to audiofile..."), mem_fun (*editor, &PublicEditor::export_selection))); // export_items.back()->set_sensitive (false); session_items.push_back (MenuElem (_("Export"), *export_menu)); @@ -143,8 +143,8 @@ ARDOUR_UI::build_menu_bar () Menu *cleanup_menu = manage (new Menu); MenuList& cleanup_items = cleanup_menu->items(); cleanup_menu->set_name ("ArdourContextMenu"); - cleanup_items.push_back (MenuElem (_("Cleanup unused sources"), slot (*(ARDOUR_UI::instance()), &ARDOUR_UI::cleanup))); - cleanup_items.push_back (MenuElem (_("Flush wastebasket"), slot (*(ARDOUR_UI::instance()), &ARDOUR_UI::flush_trash))); + cleanup_items.push_back (MenuElem (_("Cleanup unused sources"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::cleanup))); + 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 (); @@ -152,7 +152,7 @@ ARDOUR_UI::build_menu_bar () session_items.push_back (SeparatorElem()); - session_items.push_back (MenuElem (_("Quit"), slot (*(ARDOUR_UI::instance()), &ARDOUR_UI::finish))); + session_items.push_back (MenuElem (_("Quit"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::finish))); items.push_back (MenuElem (_("Session"), *session_menu)); @@ -169,10 +169,10 @@ ARDOUR_UI::build_menu_bar () MenuList& jack_items = jack_menu->items(); jack_menu->set_name ("ArdourContextMenu"); - jack_items.push_back (MenuElem (_("Disconnect"), slot (*(ARDOUR_UI::instance()), &ARDOUR_UI::disconnect_from_jack))); + 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->set_sensitive (false); - jack_items.push_back (MenuElem (_("Reconnect"), slot (*(ARDOUR_UI::instance()), &ARDOUR_UI::reconnect_to_jack))); + 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->set_sensitive (false); @@ -180,15 +180,15 @@ ARDOUR_UI::build_menu_bar () MenuList& jack_bufsize_items = jack_bufsize_menu->items(); jack_bufsize_menu->set_name ("ArdourContextMenu"); - jack_bufsize_items.push_back (MenuElem (X_("32"), bind (slot (*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 32))); - jack_bufsize_items.push_back (MenuElem (X_("64"), bind (slot (*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 64))); - jack_bufsize_items.push_back (MenuElem (X_("128"), bind (slot (*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 128))); - jack_bufsize_items.push_back (MenuElem (X_("256"), bind (slot (*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 256))); - jack_bufsize_items.push_back (MenuElem (X_("512"), bind (slot (*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 512))); - jack_bufsize_items.push_back (MenuElem (X_("1024"), bind (slot (*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 1024))); - jack_bufsize_items.push_back (MenuElem (X_("2048"), bind (slot (*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 2048))); - jack_bufsize_items.push_back (MenuElem (X_("4096"), bind (slot (*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 4096))); - jack_bufsize_items.push_back (MenuElem (X_("8192"), bind (slot (*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 8192))); + jack_bufsize_items.push_back (MenuElem (X_("32"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 32))); + jack_bufsize_items.push_back (MenuElem (X_("64"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 64))); + jack_bufsize_items.push_back (MenuElem (X_("128"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 128))); + jack_bufsize_items.push_back (MenuElem (X_("256"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 256))); + jack_bufsize_items.push_back (MenuElem (X_("512"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 512))); + jack_bufsize_items.push_back (MenuElem (X_("1024"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 1024))); + jack_bufsize_items.push_back (MenuElem (X_("2048"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 2048))); + jack_bufsize_items.push_back (MenuElem (X_("4096"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 4096))); + jack_bufsize_items.push_back (MenuElem (X_("8192"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 8192))); jack_items.push_back (MenuElem (_("Latency"), *jack_bufsize_menu)); jack_bufsize_menu->set_sensitive (false); @@ -203,35 +203,35 @@ ARDOUR_UI::build_menu_bar () window_items.push_back (TearoffMenuElem()); - window_items.push_back (MenuElem (_("Editor"), slot (*this, &ARDOUR_UI::goto_editor_window))); - window_items.push_back (MenuElem (_("Mixer"), slot (*this, &ARDOUR_UI::goto_mixer_window))); + window_items.push_back (MenuElem (_("Editor"), mem_fun(*this, &ARDOUR_UI::goto_editor_window))); + window_items.push_back (MenuElem (_("Mixer"), mem_fun(*this, &ARDOUR_UI::goto_mixer_window))); window_items.push_back (SeparatorElem()); window_items.push_back (CheckMenuElem (_("Options Editor"), - slot (*this, &ARDOUR_UI::toggle_options_window))); + mem_fun(*this, &ARDOUR_UI::toggle_options_window))); options_window_check = dynamic_cast(window_items.back()); // options_window_check->set_sensitive (false); window_items.push_back (CheckMenuElem (_("Audio Library"), - slot (*this, &ARDOUR_UI::toggle_sfdb_window))); + mem_fun(*this, &ARDOUR_UI::toggle_sfdb_window))); sfdb_check = dynamic_cast(window_items.back()); window_items.push_back (CheckMenuElem (_("Track/Bus Inspector"), - slot (*this, &ARDOUR_UI::toggle_route_params_window))); + mem_fun(*this, &ARDOUR_UI::toggle_route_params_window))); route_params_check = dynamic_cast(window_items.back()); route_params_check->set_sensitive (false); window_items.push_back (CheckMenuElem (_("Connections"), - slot (*this, &ARDOUR_UI::toggle_connection_editor))); + mem_fun(*this, &ARDOUR_UI::toggle_connection_editor))); connection_editor_check = dynamic_cast(window_items.back()); connection_editor_check->set_sensitive (false); @@ -239,7 +239,7 @@ ARDOUR_UI::build_menu_bar () window_items.push_back (CheckMenuElem (_("Meter Bridge"), - slot (*this, &ARDOUR_UI::toggle_meter_bridge_window))); + mem_fun(*this, &ARDOUR_UI::toggle_meter_bridge_window))); meter_bridge_dialog_check = dynamic_cast(window_items.back()); meter_bridge_dialog_check->set_sensitive (false); #endif @@ -247,19 +247,19 @@ ARDOUR_UI::build_menu_bar () window_items.push_back (CheckMenuElem (_("Locations"), - slot (*this, &ARDOUR_UI::toggle_location_window))); + mem_fun(*this, &ARDOUR_UI::toggle_location_window))); locations_dialog_check = dynamic_cast(window_items.back()); locations_dialog_check->set_sensitive (false); window_items.push_back (CheckMenuElem (_("Big Clock"), - slot (*this, &ARDOUR_UI::toggle_big_clock_window))); + mem_fun(*this, &ARDOUR_UI::toggle_big_clock_window))); big_clock_check = dynamic_cast(window_items.back()); window_items.push_back (SeparatorElem()); - window_items.push_back (MenuElem (_("About"), slot (*this, &ARDOUR_UI::show_splash))); + window_items.push_back (MenuElem (_("About"), mem_fun(*this, &ARDOUR_UI::show_splash))); items.push_back (MenuElem (_("Windows"), *window_menu)); diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 593bb4f320..c438b3d86c 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -186,7 +186,7 @@ AudioClock::AudioClock (const string& name, bool allow_edit, bool duration, bool */ clock_base.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); - clock_base.button_release_event.connect (bind (slot (*this, &AudioClock::field_button_release_event), SMPTE_Hours)); + clock_base.button_release_event.connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), SMPTE_Hours)); if (editable) { setup_events (); @@ -224,77 +224,77 @@ AudioClock::setup_events () ms_minutes_ebox.set_flags (Gtk::CAN_FOCUS); ms_seconds_ebox.set_flags (Gtk::CAN_FOCUS); - hours_ebox.motion_notify_event.connect (bind (slot (*this, &AudioClock::field_motion_notify_event), SMPTE_Hours)); - minutes_ebox.motion_notify_event.connect (bind (slot (*this, &AudioClock::field_motion_notify_event), SMPTE_Minutes)); - seconds_ebox.motion_notify_event.connect (bind (slot (*this, &AudioClock::field_motion_notify_event), SMPTE_Seconds)); - frames_ebox.motion_notify_event.connect (bind (slot (*this, &AudioClock::field_motion_notify_event), SMPTE_Frames)); - audio_frames_ebox.motion_notify_event.connect (bind (slot (*this, &AudioClock::field_motion_notify_event), AudioFrames)); - bars_ebox.motion_notify_event.connect (bind (slot (*this, &AudioClock::field_motion_notify_event), Bars)); - beats_ebox.motion_notify_event.connect (bind (slot (*this, &AudioClock::field_motion_notify_event), Beats)); - ticks_ebox.motion_notify_event.connect (bind (slot (*this, &AudioClock::field_motion_notify_event), Ticks)); - ms_hours_ebox.motion_notify_event.connect (bind (slot (*this, &AudioClock::field_motion_notify_event), MS_Hours)); - ms_minutes_ebox.motion_notify_event.connect (bind (slot (*this, &AudioClock::field_motion_notify_event), MS_Minutes)); - ms_seconds_ebox.motion_notify_event.connect (bind (slot (*this, &AudioClock::field_motion_notify_event), MS_Seconds)); - - hours_ebox.button_press_event.connect (bind (slot (*this, &AudioClock::field_button_press_event), SMPTE_Hours)); - minutes_ebox.button_press_event.connect (bind (slot (*this, &AudioClock::field_button_press_event), SMPTE_Minutes)); - seconds_ebox.button_press_event.connect (bind (slot (*this, &AudioClock::field_button_press_event), SMPTE_Seconds)); - frames_ebox.button_press_event.connect (bind (slot (*this, &AudioClock::field_button_press_event), SMPTE_Frames)); - audio_frames_ebox.button_press_event.connect (bind (slot (*this, &AudioClock::field_button_press_event), AudioFrames)); - bars_ebox.button_press_event.connect (bind (slot (*this, &AudioClock::field_button_press_event), Bars)); - beats_ebox.button_press_event.connect (bind (slot (*this, &AudioClock::field_button_press_event), Beats)); - ticks_ebox.button_press_event.connect (bind (slot (*this, &AudioClock::field_button_press_event), Ticks)); - ms_hours_ebox.button_press_event.connect (bind (slot (*this, &AudioClock::field_button_press_event), MS_Hours)); - ms_minutes_ebox.button_press_event.connect (bind (slot (*this, &AudioClock::field_button_press_event), MS_Minutes)); - ms_seconds_ebox.button_press_event.connect (bind (slot (*this, &AudioClock::field_button_press_event), MS_Seconds)); - - hours_ebox.button_release_event.connect (bind (slot (*this, &AudioClock::field_button_release_event), SMPTE_Hours)); - minutes_ebox.button_release_event.connect (bind (slot (*this, &AudioClock::field_button_release_event), SMPTE_Minutes)); - seconds_ebox.button_release_event.connect (bind (slot (*this, &AudioClock::field_button_release_event), SMPTE_Seconds)); - frames_ebox.button_release_event.connect (bind (slot (*this, &AudioClock::field_button_release_event), SMPTE_Frames)); - audio_frames_ebox.button_release_event.connect (bind (slot (*this, &AudioClock::field_button_release_event), AudioFrames)); - bars_ebox.button_release_event.connect (bind (slot (*this, &AudioClock::field_button_release_event), Bars)); - beats_ebox.button_release_event.connect (bind (slot (*this, &AudioClock::field_button_release_event), Beats)); - ticks_ebox.button_release_event.connect (bind (slot (*this, &AudioClock::field_button_release_event), Ticks)); - ms_hours_ebox.button_release_event.connect (bind (slot (*this, &AudioClock::field_button_release_event), MS_Hours)); - ms_minutes_ebox.button_release_event.connect (bind (slot (*this, &AudioClock::field_button_release_event), MS_Minutes)); - ms_seconds_ebox.button_release_event.connect (bind (slot (*this, &AudioClock::field_button_release_event), MS_Seconds)); - - hours_ebox.key_release_event.connect (bind (slot (*this, &AudioClock::field_key_release_event), SMPTE_Hours)); - minutes_ebox.key_release_event.connect (bind (slot (*this, &AudioClock::field_key_release_event), SMPTE_Minutes)); - seconds_ebox.key_release_event.connect (bind (slot (*this, &AudioClock::field_key_release_event), SMPTE_Seconds)); - frames_ebox.key_release_event.connect (bind (slot (*this, &AudioClock::field_key_release_event), SMPTE_Frames)); - audio_frames_ebox.key_release_event.connect (bind (slot (*this, &AudioClock::field_key_release_event), AudioFrames)); - bars_ebox.key_release_event.connect (bind (slot (*this, &AudioClock::field_key_release_event), Bars)); - beats_ebox.key_release_event.connect (bind (slot (*this, &AudioClock::field_key_release_event), Beats)); - ticks_ebox.key_release_event.connect (bind (slot (*this, &AudioClock::field_key_release_event), Ticks)); - ms_hours_ebox.key_release_event.connect (bind (slot (*this, &AudioClock::field_key_release_event), MS_Hours)); - ms_minutes_ebox.key_release_event.connect (bind (slot (*this, &AudioClock::field_key_release_event), MS_Minutes)); - ms_seconds_ebox.key_release_event.connect (bind (slot (*this, &AudioClock::field_key_release_event), MS_Seconds)); - - hours_ebox.signal_focus_in_event().connect (bind (slot (*this, &AudioClock::field_focus_in_event), SMPTE_Hours)); - minutes_ebox.signal_focus_in_event().connect (bind (slot (*this, &AudioClock::field_focus_in_event), SMPTE_Minutes)); - seconds_ebox.signal_focus_in_event().connect (bind (slot (*this, &AudioClock::field_focus_in_event), SMPTE_Seconds)); - frames_ebox.signal_focus_in_event().connect (bind (slot (*this, &AudioClock::field_focus_in_event), SMPTE_Frames)); - audio_frames_ebox.signal_focus_in_event().connect (bind (slot (*this, &AudioClock::field_focus_in_event), AudioFrames)); - bars_ebox.signal_focus_in_event().connect (bind (slot (*this, &AudioClock::field_focus_in_event), Bars)); - beats_ebox.signal_focus_in_event().connect (bind (slot (*this, &AudioClock::field_focus_in_event), Beats)); - ticks_ebox.signal_focus_in_event().connect (bind (slot (*this, &AudioClock::field_focus_in_event), Ticks)); - ms_hours_ebox.signal_focus_in_event().connect (bind (slot (*this, &AudioClock::field_focus_in_event), MS_Hours)); - ms_minutes_ebox.signal_focus_in_event().connect (bind (slot (*this, &AudioClock::field_focus_in_event), MS_Minutes)); - ms_seconds_ebox.signal_focus_in_event().connect (bind (slot (*this, &AudioClock::field_focus_in_event), MS_Seconds)); - - hours_ebox.signal_focus_out_event().connect (bind (slot (*this, &AudioClock::field_focus_out_event), SMPTE_Hours)); - minutes_ebox.signal_focus_out_event().connect (bind (slot (*this, &AudioClock::field_focus_out_event), SMPTE_Minutes)); - seconds_ebox.signal_focus_out_event().connect (bind (slot (*this, &AudioClock::field_focus_out_event), SMPTE_Seconds)); - frames_ebox.signal_focus_out_event().connect (bind (slot (*this, &AudioClock::field_focus_out_event), SMPTE_Frames)); - audio_frames_ebox.signal_focus_out_event().connect (bind (slot (*this, &AudioClock::field_focus_out_event), AudioFrames)); - bars_ebox.signal_focus_out_event().connect (bind (slot (*this, &AudioClock::field_focus_out_event), Bars)); - beats_ebox.signal_focus_out_event().connect (bind (slot (*this, &AudioClock::field_focus_out_event), Beats)); - ticks_ebox.signal_focus_out_event().connect (bind (slot (*this, &AudioClock::field_focus_out_event), Ticks)); - ms_hours_ebox.signal_focus_out_event().connect (bind (slot (*this, &AudioClock::field_focus_out_event), MS_Hours)); - ms_minutes_ebox.signal_focus_out_event().connect (bind (slot (*this, &AudioClock::field_focus_out_event), MS_Minutes)); - ms_seconds_ebox.signal_focus_out_event().connect (bind (slot (*this, &AudioClock::field_focus_out_event), MS_Seconds)); + hours_ebox.motion_notify_event.connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), SMPTE_Hours)); + minutes_ebox.motion_notify_event.connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), SMPTE_Minutes)); + seconds_ebox.motion_notify_event.connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), SMPTE_Seconds)); + frames_ebox.motion_notify_event.connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), SMPTE_Frames)); + audio_frames_ebox.motion_notify_event.connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), AudioFrames)); + bars_ebox.motion_notify_event.connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), Bars)); + beats_ebox.motion_notify_event.connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), Beats)); + ticks_ebox.motion_notify_event.connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), Ticks)); + ms_hours_ebox.motion_notify_event.connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), MS_Hours)); + ms_minutes_ebox.motion_notify_event.connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), MS_Minutes)); + ms_seconds_ebox.motion_notify_event.connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), MS_Seconds)); + + hours_ebox.button_press_event.connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), SMPTE_Hours)); + minutes_ebox.button_press_event.connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), SMPTE_Minutes)); + seconds_ebox.button_press_event.connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), SMPTE_Seconds)); + frames_ebox.button_press_event.connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), SMPTE_Frames)); + audio_frames_ebox.button_press_event.connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), AudioFrames)); + bars_ebox.button_press_event.connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), Bars)); + beats_ebox.button_press_event.connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), Beats)); + ticks_ebox.button_press_event.connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), Ticks)); + ms_hours_ebox.button_press_event.connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), MS_Hours)); + ms_minutes_ebox.button_press_event.connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), MS_Minutes)); + ms_seconds_ebox.button_press_event.connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), MS_Seconds)); + + hours_ebox.button_release_event.connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), SMPTE_Hours)); + minutes_ebox.button_release_event.connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), SMPTE_Minutes)); + seconds_ebox.button_release_event.connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), SMPTE_Seconds)); + frames_ebox.button_release_event.connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), SMPTE_Frames)); + audio_frames_ebox.button_release_event.connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), AudioFrames)); + bars_ebox.button_release_event.connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), Bars)); + beats_ebox.button_release_event.connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), Beats)); + ticks_ebox.button_release_event.connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), Ticks)); + ms_hours_ebox.button_release_event.connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), MS_Hours)); + ms_minutes_ebox.button_release_event.connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), MS_Minutes)); + ms_seconds_ebox.button_release_event.connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), MS_Seconds)); + + hours_ebox.key_release_event.connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), SMPTE_Hours)); + minutes_ebox.key_release_event.connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), SMPTE_Minutes)); + seconds_ebox.key_release_event.connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), SMPTE_Seconds)); + frames_ebox.key_release_event.connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), SMPTE_Frames)); + audio_frames_ebox.key_release_event.connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), AudioFrames)); + bars_ebox.key_release_event.connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), Bars)); + beats_ebox.key_release_event.connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), Beats)); + ticks_ebox.key_release_event.connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), Ticks)); + ms_hours_ebox.key_release_event.connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), MS_Hours)); + ms_minutes_ebox.key_release_event.connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), MS_Minutes)); + ms_seconds_ebox.key_release_event.connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), MS_Seconds)); + + hours_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), SMPTE_Hours)); + minutes_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), SMPTE_Minutes)); + seconds_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), SMPTE_Seconds)); + frames_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), SMPTE_Frames)); + audio_frames_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), AudioFrames)); + bars_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), Bars)); + beats_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), Beats)); + ticks_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), Ticks)); + ms_hours_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), MS_Hours)); + ms_minutes_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), MS_Minutes)); + ms_seconds_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), MS_Seconds)); + + hours_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), SMPTE_Hours)); + minutes_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), SMPTE_Minutes)); + seconds_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), SMPTE_Seconds)); + frames_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), SMPTE_Frames)); + audio_frames_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), AudioFrames)); + bars_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), Bars)); + beats_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), Beats)); + ticks_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), Ticks)); + ms_hours_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), MS_Hours)); + ms_minutes_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), MS_Minutes)); + ms_seconds_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), MS_Seconds)); Gtkmm2ext::set_size_request_to_display_given_text (hours_label, "-88", 0, 2); Gtkmm2ext::set_size_request_to_display_given_text (minutes_label, "88", 0, 2); @@ -1637,11 +1637,11 @@ AudioClock::build_ops_menu () MenuList& mode_items = mode_menu->items(); mode_menu->set_name ("ArdourContextMenu"); - mode_items.push_back (MenuElem (_("SMPTE"), bind (slot (*this, &AudioClock::set_mode), SMPTE))); - mode_items.push_back (MenuElem (_("Bars:Beats"), bind (slot (*this, &AudioClock::set_mode), BBT))); - mode_items.push_back (MenuElem (_("Minutes:Seconds"), bind (slot (*this, &AudioClock::set_mode), MinSec))); - mode_items.push_back (MenuElem (_("Audio Frames"), bind (slot (*this, &AudioClock::set_mode), Frames))); - mode_items.push_back (MenuElem (_("Off"), bind (slot (*this, &AudioClock::set_mode), Off))); + mode_items.push_back (MenuElem (_("SMPTE"), bind (mem_fun(*this, &AudioClock::set_mode), SMPTE))); + mode_items.push_back (MenuElem (_("Bars:Beats"), bind (mem_fun(*this, &AudioClock::set_mode), BBT))); + mode_items.push_back (MenuElem (_("Minutes:Seconds"), bind (mem_fun(*this, &AudioClock::set_mode), MinSec))); + mode_items.push_back (MenuElem (_("Audio Frames"), bind (mem_fun(*this, &AudioClock::set_mode), Frames))); + mode_items.push_back (MenuElem (_("Off"), bind (mem_fun(*this, &AudioClock::set_mode), Off))); ops_items.push_back (MenuElem (_("Mode"), *mode_menu)); } diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 679456b237..205f3bcabc 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -150,35 +150,35 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt hide_button.add (*(manage (new Pixmap (small_x_xpm)))); - _route.mute_changed.connect (slot (*this, &RouteUI::mute_changed)); - _route.solo_changed.connect (slot (*this, &RouteUI::solo_changed)); - _route.solo_safe_changed.connect (slot (*this, &RouteUI::solo_changed)); - - _route.panner().Changed.connect (slot (*this, &AudioTimeAxisView::update_pans)); - - solo_button->button_press_event.connect (slot (*this, &RouteUI::solo_press)); - solo_button->button_release_event.connect (slot (*this, &RouteUI::solo_release)); - mute_button->button_press_event.connect (slot (*this, &RouteUI::mute_press)); - mute_button->button_release_event.connect (slot (*this, &RouteUI::mute_release)); - rec_enable_button->button_press_event.connect (slot (*this, &RouteUI::rec_enable_press)); - edit_group_button.button_release_event.connect (slot (*this, &AudioTimeAxisView::edit_click)); - playlist_button.signal_clicked().connect (slot (*this, &AudioTimeAxisView::playlist_click)); - automation_button.signal_clicked().connect (slot (*this, &AudioTimeAxisView::automation_click)); - size_button.button_release_event.connect (slot (*this, &AudioTimeAxisView::size_click)); - visual_button.signal_clicked().connect (slot (*this, &AudioTimeAxisView::visual_click)); - hide_button.signal_clicked().connect (slot (*this, &AudioTimeAxisView::hide_click)); - - name_entry.activate.connect (slot (*this, &AudioTimeAxisView::name_entry_activated)); - name_entry.signal_focus_out_event().connect (slot (*this, &AudioTimeAxisView::name_entry_focus_out_handler)); - name_entry.button_press_event.connect (slot (*this, &AudioTimeAxisView::name_entry_button_press_handler)); - name_entry.button_release_event.connect (slot (*this, &AudioTimeAxisView::name_entry_button_release_handler)); - name_entry.key_release_event.connect (slot (*this, &AudioTimeAxisView::name_entry_key_release_handler)); + _route.mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed)); + _route.solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed)); + _route.solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed)); + + _route.panner().Changed.connect (mem_fun(*this, &AudioTimeAxisView::update_pans)); + + solo_button->button_press_event.connect (mem_fun(*this, &RouteUI::solo_press)); + solo_button->button_release_event.connect (mem_fun(*this, &RouteUI::solo_release)); + mute_button->button_press_event.connect (mem_fun(*this, &RouteUI::mute_press)); + mute_button->button_release_event.connect (mem_fun(*this, &RouteUI::mute_release)); + rec_enable_button->button_press_event.connect (mem_fun(*this, &RouteUI::rec_enable_press)); + edit_group_button.button_release_event.connect (mem_fun(*this, &AudioTimeAxisView::edit_click)); + playlist_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::playlist_click)); + automation_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::automation_click)); + size_button.button_release_event.connect (mem_fun(*this, &AudioTimeAxisView::size_click)); + 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.button_press_event.connect (mem_fun(*this, &AudioTimeAxisView::name_entry_button_press_handler)); + name_entry.button_release_event.connect (mem_fun(*this, &AudioTimeAxisView::name_entry_button_release_handler)); + name_entry.key_release_event.connect (mem_fun(*this, &AudioTimeAxisView::name_entry_key_release_handler)); if (is_audio_track()) { controls_table.attach (*rec_enable_button, 6, 7, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0); } controls_table.attach (*mute_button, 7, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0); - controls_table.attach (*solo_button, 8, 9, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|GTK_FILL|Gtk::EXPAND, 0, 0); + controls_table.attach (*solo_button, 8, 9, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::FILL|Gtk::EXPAND, 0, 0); controls_table.attach (edit_group_button, 7, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0); @@ -229,20 +229,20 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt set_state (*xml_node); - _route.mute_changed.connect (slot (*this, &RouteUI::mute_changed)); - _route.solo_changed.connect (slot (*this, &RouteUI::solo_changed)); - _route.redirects_changed.connect (slot (*this, &AudioTimeAxisView::redirects_changed)); + _route.mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed)); + _route.solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed)); + _route.redirects_changed.connect (mem_fun(*this, &AudioTimeAxisView::redirects_changed)); - _route.name_changed.connect (slot (*this, &AudioTimeAxisView::route_name_changed)); + _route.name_changed.connect (mem_fun(*this, &AudioTimeAxisView::route_name_changed)); if (is_audio_track()) { /* track */ - audio_track()->FreezeChange.connect (slot (*this, &AudioTimeAxisView::map_frozen)); + audio_track()->FreezeChange.connect (mem_fun(*this, &AudioTimeAxisView::map_frozen)); - audio_track()->diskstream_changed.connect (slot (*this, &AudioTimeAxisView::diskstream_changed)); - get_diskstream()->speed_changed.connect (slot (*this, &AudioTimeAxisView::speed_changed)); + audio_track()->diskstream_changed.connect (mem_fun(*this, &AudioTimeAxisView::diskstream_changed)); + get_diskstream()->speed_changed.connect (mem_fun(*this, &AudioTimeAxisView::speed_changed)); controls_ebox.set_name ("AudioTrackControlsBaseUnselected"); controls_base_selected_name = "AudioTrackControlsBaseSelected"; @@ -250,7 +250,7 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt /* ask for notifications of any new RegionViews */ - view->AudioRegionViewAdded.connect (slot (*this, &AudioTimeAxisView::region_view_added)); + view->AudioRegionViewAdded.connect (mem_fun(*this, &AudioTimeAxisView::region_view_added)); view->attach (); @@ -267,7 +267,7 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt controls_base_unselected_name = "BusControlsBaseUnselected"; } - editor.ZoomChanged.connect (slot (*this, &AudioTimeAxisView::reset_samples_per_unit)); + editor.ZoomChanged.connect (mem_fun(*this, &AudioTimeAxisView::reset_samples_per_unit)); } AudioTimeAxisView::~AudioTimeAxisView () @@ -323,8 +323,8 @@ AudioTimeAxisView::set_playlist (AudioPlaylist *newplaylist) state_changed_connection.disconnect (); if ((pl = dynamic_cast (playlist())) != 0) { - state_changed_connection = pl->StateChanged.connect (slot (*this, &AudioTimeAxisView::playlist_state_changed)); - modified_connection = pl->Modified.connect (slot (*this, &AudioTimeAxisView::playlist_modified)); + state_changed_connection = pl->StateChanged.connect (mem_fun(*this, &AudioTimeAxisView::playlist_state_changed)); + modified_connection = pl->Modified.connect (mem_fun(*this, &AudioTimeAxisView::playlist_modified)); } } @@ -347,7 +347,7 @@ AudioTimeAxisView::edit_click (GdkEventButton *ev) items.clear (); items.push_back (RadioMenuElem (edit_group_menu_radio_group, _("No group"), - bind (slot (*this, &AudioTimeAxisView::set_edit_group_from_menu), (RouteGroup *) 0))); + bind (mem_fun(*this, &AudioTimeAxisView::set_edit_group_from_menu), (RouteGroup *) 0))); if (_route.edit_group() == 0) { static_cast(items.back())->set_active (); @@ -366,7 +366,7 @@ AudioTimeAxisView::add_edit_group_menu_item (RouteGroup *eg) MenuList &items = edit_group_menu.items(); items.push_back (RadioMenuElem (edit_group_menu_radio_group, - eg->name(), bind (slot (*this, &AudioTimeAxisView::set_edit_group_from_menu), eg))); + eg->name(), bind (mem_fun(*this, &AudioTimeAxisView::set_edit_group_from_menu), eg))); if (_route.edit_group() == eg) { static_cast(items.back())->set_active (); } @@ -382,7 +382,7 @@ AudioTimeAxisView::set_edit_group_from_menu (RouteGroup *eg) void AudioTimeAxisView::playlist_state_changed (Change ignored) { - // ENSURE_GUI_THREAD (bind (slot (*this, &AudioTimeAxisView::playlist_state_changed), ignored)); + // ENSURE_GUI_THREAD (bind (mem_fun(*this, &AudioTimeAxisView::playlist_state_changed), ignored)); // why are we here ? } @@ -713,12 +713,12 @@ AudioTimeAxisView::build_display_menu () display_menu->set_name ("ArdourContextMenu"); items.push_back (MenuElem (_("Height"), *size_menu)); - items.push_back (MenuElem (_("Color"), slot (*this, &AudioTimeAxisView::select_track_color))); + items.push_back (MenuElem (_("Color"), mem_fun(*this, &AudioTimeAxisView::select_track_color))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Hide all crossfades"), slot (*this, &AudioTimeAxisView::hide_all_xfades))); - items.push_back (MenuElem (_("Show all crossfades"), slot (*this, &AudioTimeAxisView::show_all_xfades))); + items.push_back (MenuElem (_("Hide all crossfades"), mem_fun(*this, &AudioTimeAxisView::hide_all_xfades))); + items.push_back (MenuElem (_("Show all crossfades"), mem_fun(*this, &AudioTimeAxisView::show_all_xfades))); items.push_back (SeparatorElem()); @@ -727,23 +727,23 @@ AudioTimeAxisView::build_display_menu () automation_action_menu->set_name ("ArdourContextMenu"); automation_items.push_back (MenuElem (_("show all automation"), - slot (*this, &AudioTimeAxisView::show_all_automation))); + mem_fun(*this, &AudioTimeAxisView::show_all_automation))); automation_items.push_back (MenuElem (_("show existing automation"), - slot (*this, &AudioTimeAxisView::show_existing_automation))); + mem_fun(*this, &AudioTimeAxisView::show_existing_automation))); automation_items.push_back (MenuElem (_("hide all automation"), - slot (*this, &AudioTimeAxisView::hide_all_automation))); + mem_fun(*this, &AudioTimeAxisView::hide_all_automation))); automation_items.push_back (SeparatorElem()); automation_items.push_back (CheckMenuElem (_("gain"), - slot (*this, &AudioTimeAxisView::toggle_gain_track))); + mem_fun(*this, &AudioTimeAxisView::toggle_gain_track))); gain_automation_item = static_cast (automation_items.back()); gain_automation_item->set_active(show_gain_automation); automation_items.push_back (CheckMenuElem (_("pan"), - slot (*this, &AudioTimeAxisView::toggle_pan_track))); + mem_fun(*this, &AudioTimeAxisView::toggle_pan_track))); pan_automation_item = static_cast (automation_items.back()); pan_automation_item->set_active(show_pan_automation); @@ -755,7 +755,7 @@ AudioTimeAxisView::build_display_menu () MenuList& waveform_items = waveform_menu->items(); waveform_menu->set_name ("ArdourContextMenu"); - waveform_items.push_back (CheckMenuElem (_("Show waveforms"), slot (*this, &AudioTimeAxisView::toggle_waveforms))); + waveform_items.push_back (CheckMenuElem (_("Show waveforms"), mem_fun(*this, &AudioTimeAxisView::toggle_waveforms))); waveform_item = static_cast (waveform_items.back()); ignore_toggle = true; waveform_item->set_active (editor.show_waveforms()); @@ -763,10 +763,10 @@ AudioTimeAxisView::build_display_menu () RadioMenuItem::Group group; - waveform_items.push_back (RadioMenuElem (group, _("Traditional"), bind (slot (*this, &AudioTimeAxisView::set_waveform_shape), Traditional))); + waveform_items.push_back (RadioMenuElem (group, _("Traditional"), bind (mem_fun(*this, &AudioTimeAxisView::set_waveform_shape), Traditional))); traditional_item = static_cast (waveform_items.back()); - waveform_items.push_back (RadioMenuElem (group, _("Rectified"), bind (slot (*this, &AudioTimeAxisView::set_waveform_shape), Rectified))); + waveform_items.push_back (RadioMenuElem (group, _("Rectified"), bind (mem_fun(*this, &AudioTimeAxisView::set_waveform_shape), Rectified))); rectified_item = static_cast (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 (slot (*this, &AudioTimeAxisView::set_align_style), ExistingMaterial))); + 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(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 (slot (*this, &AudioTimeAxisView::set_align_style), CaptureTime))); + 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(alignment_items.back()); if (get_diskstream()->alignment_style() == CaptureTime) { align_capture_item->set_active(); @@ -792,16 +792,16 @@ AudioTimeAxisView::build_display_menu () items.push_back (MenuElem (_("Alignment"), *alignment_menu)); - get_diskstream()->AlignmentStyleChanged.connect (slot (*this, &AudioTimeAxisView::align_style_changed)); + get_diskstream()->AlignmentStyleChanged.connect (mem_fun(*this, &AudioTimeAxisView::align_style_changed)); } items.push_back (SeparatorElem()); - items.push_back (CheckMenuElem (_("Active"), slot (*this, &RouteUI::toggle_route_active))); + items.push_back (CheckMenuElem (_("Active"), mem_fun(*this, &RouteUI::toggle_route_active))); route_active_menu_item = dynamic_cast (items.back()); route_active_menu_item->set_active (_route.active()); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Remove"), slot (*this, &RouteUI::remove_this_route))); + items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route))); } @@ -976,13 +976,13 @@ AudioTimeAxisView::set_waveform_shape (WaveformShape shape) void AudioTimeAxisView::speed_changed () { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &AudioTimeAxisView::reset_samples_per_unit)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &AudioTimeAxisView::reset_samples_per_unit)); } void AudioTimeAxisView::diskstream_changed (void *src) { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &AudioTimeAxisView::update_diskstream_display)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &AudioTimeAxisView::update_diskstream_display)); } void @@ -1217,7 +1217,7 @@ AudioTimeAxisView::add_gain_automation_child () add_child (gain_track); - gain_track->Hiding.connect (slot (*this, &AudioTimeAxisView::gain_hidden)); + gain_track->Hiding.connect (mem_fun(*this, &AudioTimeAxisView::gain_hidden)); bool hideit = true; @@ -1247,7 +1247,7 @@ AudioTimeAxisView::add_pan_automation_child () add_child (pan_track); - pan_track->Hiding.connect (slot (*this, &AudioTimeAxisView::pan_hidden)); + pan_track->Hiding.connect (mem_fun(*this, &AudioTimeAxisView::pan_hidden)); ensure_xml_node (); bool hideit = true; @@ -1478,7 +1478,7 @@ AudioTimeAxisView::add_redirect_automation_curve (Redirect *redirect, uint32_t w ran->view->add_line (*ral); - ran->view->Hiding.connect (bind (slot (*this, &AudioTimeAxisView::redirect_automation_track_hidden), ran, redirect)); + ran->view->Hiding.connect (bind (mem_fun(*this, &AudioTimeAxisView::redirect_automation_track_hidden), ran, redirect)); if (!ran->view->marked_for_display()) { ran->view->hide (); @@ -1488,7 +1488,7 @@ AudioTimeAxisView::add_redirect_automation_curve (Redirect *redirect, uint32_t w add_child (ran->view); - view->foreach_regionview (bind (slot (*this, &AudioTimeAxisView::add_ghost_to_redirect), ran->view)); + view->foreach_regionview (bind (mem_fun(*this, &AudioTimeAxisView::add_ghost_to_redirect), ran->view)); redirect->mark_automation_visible (what, true); } @@ -1594,7 +1594,7 @@ AudioTimeAxisView::add_redirect_to_subplugin_menu (Redirect* r) } - mitem->toggled.connect (bind (slot (*this, &AudioTimeAxisView::redirect_menu_item_toggled), rai, ran)); + mitem->toggled.connect (bind (mem_fun(*this, &AudioTimeAxisView::redirect_menu_item_toggled), rai, ran)); } /* add the menu for this redirect, because the subplugin @@ -1889,15 +1889,15 @@ AudioTimeAxisView::build_playlist_menu (Gtk::Menu * menu) playlist_items.push_back (MenuElem (compose (_("Current: %1"), get_diskstream()->playlist()->name()))); playlist_items.push_back (SeparatorElem()); - playlist_items.push_back (MenuElem (_("Rename"), slot (*this, &AudioTimeAxisView::rename_current_playlist))); + playlist_items.push_back (MenuElem (_("Rename"), mem_fun(*this, &AudioTimeAxisView::rename_current_playlist))); playlist_items.push_back (SeparatorElem()); - playlist_items.push_back (MenuElem (_("New"), slot (*this, &AudioTimeAxisView::use_new_playlist))); - playlist_items.push_back (MenuElem (_("New Copy"), slot(*this, &AudioTimeAxisView::use_copy_playlist))); + playlist_items.push_back (MenuElem (_("New"), mem_fun(*this, &AudioTimeAxisView::use_new_playlist))); + playlist_items.push_back (MenuElem (_("New Copy"), mem_fun(*this, &AudioTimeAxisView::use_copy_playlist))); playlist_items.push_back (SeparatorElem()); - playlist_items.push_back (MenuElem (_("Clear Current"), slot (*this, &AudioTimeAxisView::clear_playlist))); + playlist_items.push_back (MenuElem (_("Clear Current"), mem_fun(*this, &AudioTimeAxisView::clear_playlist))); playlist_items.push_back (SeparatorElem()); - playlist_items.push_back (MenuElem(_("Select"), slot (*this, &AudioTimeAxisView::show_playlist_selector))); + playlist_items.push_back (MenuElem(_("Select"), mem_fun(*this, &AudioTimeAxisView::show_playlist_selector))); } @@ -1915,7 +1915,7 @@ AudioTimeAxisView::map_frozen () return; } - ENSURE_GUI_THREAD (slot (*this, &AudioTimeAxisView::map_frozen)); + ENSURE_GUI_THREAD (mem_fun(*this, &AudioTimeAxisView::map_frozen)); switch (audio_track()->freeze_state()) { diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index ff1097cbd5..b2f63655fc 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -254,7 +254,7 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, GtkCanvasItem* pa gtk_object_set_data (GTK_OBJECT(line), "line", this); gtk_signal_connect (GTK_OBJECT(line), "event", (GtkSignalFunc) line_handler, this); - alist.StateChanged.connect (slot (*this, &AutomationLine::list_changed)); + alist.StateChanged.connect (mem_fun(*this, &AutomationLine::list_changed)); } AutomationLine::~AutomationLine () @@ -273,7 +273,7 @@ AutomationLine::queue_reset () { if (!update_pending) { update_pending = true; - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &AutomationLine::reset)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &AutomationLine::reset)); } } diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index d1b649e1a9..b33132133f 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -148,10 +148,10 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, Route& r, PublicEdit controls_table.show_all (); - height_button.signal_clicked().connect (slot (*this, &AutomationTimeAxisView::height_clicked)); - clear_button.signal_clicked().connect (slot (*this, &AutomationTimeAxisView::clear_clicked)); - hide_button.signal_clicked().connect (slot (*this, &AutomationTimeAxisView::hide_clicked)); - auto_button.signal_clicked().connect (slot (*this, &AutomationTimeAxisView::auto_clicked)); + height_button.signal_clicked().connect (mem_fun(*this, &AutomationTimeAxisView::height_clicked)); + clear_button.signal_clicked().connect (mem_fun(*this, &AutomationTimeAxisView::clear_clicked)); + hide_button.signal_clicked().connect (mem_fun(*this, &AutomationTimeAxisView::hide_clicked)); + auto_button.signal_clicked().connect (mem_fun(*this, &AutomationTimeAxisView::auto_clicked)); controls_base_selected_name = X_("AutomationTrackControlsBaseSelected"); controls_base_unselected_name = X_("AutomationTrackControlsBase"); @@ -187,13 +187,13 @@ AutomationTimeAxisView::auto_clicked () MenuList& items (automation_menu->items()); items.push_back (MenuElem (_("off"), - bind (slot (*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Off))); + bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Off))); items.push_back (MenuElem (_("play"), - bind (slot (*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Play))); + bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Play))); items.push_back (MenuElem (_("write"), - bind (slot (*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Write))); + bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Write))); items.push_back (MenuElem (_("touch"), - bind (slot (*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Touch))); + bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Touch))); } automation_menu->popup (1, 0); @@ -446,9 +446,9 @@ AutomationTimeAxisView::build_display_menu () items.push_back (MenuElem (_("Height"), *size_menu)); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Hide"), slot (*this, &AutomationTimeAxisView::hide_clicked))); + items.push_back (MenuElem (_("Hide"), mem_fun(*this, &AutomationTimeAxisView::hide_clicked))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Clear"), slot (*this, &AutomationTimeAxisView::clear_clicked))); + items.push_back (MenuElem (_("Clear"), mem_fun(*this, &AutomationTimeAxisView::clear_clicked))); items.push_back (SeparatorElem()); Menu* auto_state_menu = manage (new Menu); @@ -456,19 +456,19 @@ AutomationTimeAxisView::build_display_menu () MenuList& as_items = auto_state_menu->items(); as_items.push_back (CheckMenuElem (_("off"), - bind (slot (*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Off))); + bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Off))); auto_off_item = dynamic_cast(as_items.back()); as_items.push_back (CheckMenuElem (_("play"), - bind (slot (*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Play))); + bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Play))); auto_play_item = dynamic_cast(as_items.back()); as_items.push_back (CheckMenuElem (_("write"), - bind (slot (*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Write))); + bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Write))); auto_write_item = dynamic_cast(as_items.back()); as_items.push_back (CheckMenuElem (_("touch"), - bind (slot (*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Touch))); + bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Touch))); auto_touch_item = dynamic_cast(as_items.back()); items.push_back (MenuElem (_("State"), *auto_state_menu)); @@ -645,7 +645,7 @@ void AutomationTimeAxisView::add_ghost (GhostRegion* gr) { ghosts.push_back (gr); - gr->GoingAway.connect (slot (*this, &AutomationTimeAxisView::remove_ghost)); + gr->GoingAway.connect (mem_fun(*this, &AutomationTimeAxisView::remove_ghost)); } void @@ -736,7 +736,7 @@ AutomationTimeAxisView::add_line (AutomationLine& line) if (lines.empty()) { /* first line is the Model for automation state */ automation_connection = line.the_list().automation_state_changed.connect - (slot (*this, &AutomationTimeAxisView::automation_state_changed)); + (mem_fun(*this, &AutomationTimeAxisView::automation_state_changed)); get = true; } diff --git a/gtk2_ardour/connection_editor.cc b/gtk2_ardour/connection_editor.cc index 6300380297..b4dbd12ef0 100644 --- a/gtk2_ardour/connection_editor.cc +++ b/gtk2_ardour/connection_editor.cc @@ -87,9 +87,9 @@ ConnectionEditor::ConnectionEditor () cancel_button.hide(); button_frame.add (button_box); - ok_button.signal_clicked().connect (slot (*this, &ConnectionEditor::accept)); - cancel_button.signal_clicked().connect (slot (*this, &ConnectionEditor::cancel)); - cancel_button.signal_clicked().connect (slot (*this, &ConnectionEditor::rescan)); + ok_button.signal_clicked().connect (mem_fun(*this, &ConnectionEditor::accept)); + cancel_button.signal_clicked().connect (mem_fun(*this, &ConnectionEditor::cancel)); + cancel_button.signal_clicked().connect (mem_fun(*this, &ConnectionEditor::rescan)); notebook.set_name ("ConnectionEditorNotebook"); notebook.set_size_request (-1, 125); @@ -140,13 +140,13 @@ ConnectionEditor::ConnectionEditor () input_connection_display.set_selection_mode (GTK_SELECTION_SINGLE); input_connection_display.set_size_request (80, -1); input_connection_display.set_name ("ConnectionEditorConnectionList"); - input_connection_display.select_row.connect (bind (slot (*this, &ConnectionEditor::connection_selected), true)); + input_connection_display.select_row.connect (bind (mem_fun(*this, &ConnectionEditor::connection_selected), true)); output_connection_display.set_shadow_type (Gtk::SHADOW_IN); output_connection_display.set_selection_mode (GTK_SELECTION_SINGLE); output_connection_display.set_size_request (80, -1); output_connection_display.set_name ("ConnectionEditorConnectionList"); - output_connection_display.select_row.connect (bind (slot (*this, &ConnectionEditor::connection_selected), false)); + output_connection_display.select_row.connect (bind (mem_fun(*this, &ConnectionEditor::connection_selected), false)); input_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); output_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); @@ -186,13 +186,13 @@ ConnectionEditor::ConnectionEditor () set_title (_("ardour: connections")); add (main_vbox); - delete_event.connect (bind (slot (just_hide_it), reinterpret_cast (this))); + delete_event.connect (bind (ptr_fun (just_hide_it), reinterpret_cast (this))); - clear_button.signal_clicked().connect (slot (*this, &ConnectionEditor::clear)); - add_port_button.signal_clicked().connect (slot (*this, &ConnectionEditor::add_port)); - new_input_connection_button.signal_clicked().connect (bind (slot (*this, &ConnectionEditor::new_connection), true)); - new_output_connection_button.signal_clicked().connect (bind (slot (*this, &ConnectionEditor::new_connection), false)); - delete_connection_button.signal_clicked().connect (slot (*this, &ConnectionEditor::delete_connection)); + clear_button.signal_clicked().connect (mem_fun(*this, &ConnectionEditor::clear)); + add_port_button.signal_clicked().connect (mem_fun(*this, &ConnectionEditor::add_port)); + new_input_connection_button.signal_clicked().connect (bind (mem_fun(*this, &ConnectionEditor::new_connection), true)); + new_output_connection_button.signal_clicked().connect (bind (mem_fun(*this, &ConnectionEditor::new_connection), false)); + delete_connection_button.signal_clicked().connect (mem_fun(*this, &ConnectionEditor::delete_connection)); } ConnectionEditor::~ConnectionEditor() @@ -207,8 +207,8 @@ ConnectionEditor::set_session (Session *s) ArdourDialog::set_session (s); if (session) { - session->ConnectionAdded.connect (slot (*this, &ConnectionEditor::proxy_add_connection_and_select)); - session->ConnectionRemoved.connect (slot (*this, &ConnectionEditor::proxy_remove_connection)); + session->ConnectionAdded.connect (mem_fun(*this, &ConnectionEditor::proxy_add_connection_and_select)); + session->ConnectionRemoved.connect (mem_fun(*this, &ConnectionEditor::proxy_remove_connection)); } else { hide (); } @@ -297,13 +297,13 @@ ConnectionEditor::remove_connection (ARDOUR::Connection *connection) void ConnectionEditor::proxy_add_connection_and_select (ARDOUR::Connection *connection) { - Gtkmm2ext::UI::instance()->call_slot (bind (slot (*this, &ConnectionEditor::add_connection_and_select), connection)); + Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &ConnectionEditor::add_connection_and_select), connection)); } void ConnectionEditor::proxy_remove_connection (ARDOUR::Connection *connection) { - Gtkmm2ext::UI::instance()->call_slot (bind (slot (*this, &ConnectionEditor::remove_connection), connection)); + Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &ConnectionEditor::remove_connection), connection)); } void @@ -352,9 +352,9 @@ ConnectionEditor::connection_selected (gint row, gint col, GdkEvent *ev, bool in if (current_connection) { config_connection = current_connection->ConfigurationChanged.connect - (bind (slot (*this, &ConnectionEditor::configuration_changed), input)); + (bind (mem_fun(*this, &ConnectionEditor::configuration_changed), input)); connect_connection = current_connection->ConnectionsChanged.connect - (bind (slot (*this, &ConnectionEditor::connections_changed), input)); + (bind (mem_fun(*this, &ConnectionEditor::connections_changed), input)); } display_connection_state (input); @@ -454,7 +454,7 @@ ConnectionEditor::display_ports () } client_port_display->columns_autosize (); - client_port_display->select_row.connect (bind (slot (*this, &ConnectionEditor::port_selection_handler), client_port_display)); + client_port_display->select_row.connect (bind (mem_fun(*this, &ConnectionEditor::port_selection_handler), client_port_display)); Label *tab_label = manage (new Label); @@ -465,7 +465,7 @@ ConnectionEditor::display_ports () } notebook.set_page (current_page); - notebook.show.connect (bind (slot (notebook, &Notebook::set_page), current_page)); + notebook.show.connect (bind (mem_fun (notebook, &Notebook::set_page), current_page)); selector_box.show_all (); } @@ -528,7 +528,7 @@ ConnectionEditor::display_connection_state (bool for_input) clist->set_data ("port", (gpointer) ((intptr_t) n)); clist->set_name ("ConnectionEditorPortList"); - clist->click_column.connect (bind (slot (*this, &ConnectionEditor::port_column_click), clist)); + clist->click_column.connect (bind (mem_fun(*this, &ConnectionEditor::port_column_click), clist)); clist->set_selection_mode (GTK_SELECTION_SINGLE); clist->set_shadow_type (Gtk::SHADOW_IN); @@ -546,7 +546,7 @@ ConnectionEditor::display_connection_state (bool for_input) } clist->columns_autosize (); - clist->button_release_event.connect (bind (slot (*this, &ConnectionEditor::port_button_event), clist)); + clist->button_release_event.connect (bind (mem_fun(*this, &ConnectionEditor::port_button_event), clist)); } port_box.show_all (); diff --git a/gtk2_ardour/crossfade_edit.cc b/gtk2_ardour/crossfade_edit.cc index aba756be3d..aaab5e5b5a 100644 --- a/gtk2_ardour/crossfade_edit.cc +++ b/gtk2_ardour/crossfade_edit.cc @@ -115,7 +115,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m _canvas = gtk_canvas_new_aa (); canvas = wrap (_canvas); - canvas->size_allocate.connect (slot (*this, &CrossfadeEditor::canvas_allocation)); + canvas->size_allocate.connect (mem_fun(*this, &CrossfadeEditor::canvas_allocation)); canvas->set_size_request (425, 200); toplevel = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)), @@ -181,8 +181,8 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m select_in_button.set_name (X_("CrossfadeEditCurveButton")); select_out_button.set_name (X_("CrossfadeEditCurveButton")); - select_in_button.signal_clicked().connect (bind (slot (this, &CrossfadeEditor::curve_select_clicked), In)); - select_out_button.signal_clicked().connect (bind (slot (this, &CrossfadeEditor::curve_select_clicked), Out)); + select_in_button.signal_clicked().connect (bind (mem_fun (*this, &CrossfadeEditor::curve_select_clicked), In)); + select_out_button.signal_clicked().connect (bind (mem_fun (*this, &CrossfadeEditor::curve_select_clicked), Out)); HBox* acbox = manage (new HBox); @@ -223,7 +223,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m pbutton = manage (new Button); pbutton->add (*pxmap); pbutton->set_name ("CrossfadeEditButton"); - pbutton-.signal_clicked().connect (bind (slot (*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); @@ -244,7 +244,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m pbutton = manage (new Button); pbutton->add (*pxmap); pbutton->set_name ("CrossfadeEditButton"); - pbutton-.signal_clicked().connect (bind (slot (*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); @@ -268,13 +268,13 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m audition_right_dry_button.set_name ("CrossfadeEditAuditionButton"); audition_right_button.set_name ("CrossfadeEditAuditionButton"); - clear_button.signal_clicked().connect (slot (*this, &CrossfadeEditor::clear)); - revert_button.signal_clicked().connect (slot (*this, &CrossfadeEditor::reset)); - audition_both_button.toggled.connect (slot (*this, &CrossfadeEditor::audition_toggled)); - audition_right_button.toggled.connect (slot (*this, &CrossfadeEditor::audition_right_toggled)); - audition_right_dry_button.toggled.connect (slot (*this, &CrossfadeEditor::audition_right_dry_toggled)); - audition_left_button.toggled.connect (slot (*this, &CrossfadeEditor::audition_left_toggled)); - audition_left_dry_button.toggled.connect (slot (*this, &CrossfadeEditor::audition_left_dry_toggled)); + 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)); action_box.set_border_width (7); action_box.set_spacing (5); @@ -318,7 +318,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m /* button to allow hackers to check the actual curve values */ // Button* foobut = manage (new Button ("dump")); -// foobut-.signal_clicked().connect (slot (*this, &CrossfadeEditor::dump)); +// foobut-.signal_clicked().connect (mem_fun(*this, &CrossfadeEditor::dump)); // vpacker.pack_start (*foobut, false, false); current = In; @@ -329,9 +329,9 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m curve_select_clicked (In); - xfade.StateChanged.connect (slot (*this, &CrossfadeEditor::xfade_changed)); + xfade.StateChanged.connect (mem_fun(*this, &CrossfadeEditor::xfade_changed)); - session.AuditionActive.connect (slot (*this, &CrossfadeEditor::audition_state_changed)); + session.AuditionActive.connect (mem_fun(*this, &CrossfadeEditor::audition_state_changed)); } CrossfadeEditor::~CrossfadeEditor() @@ -358,7 +358,7 @@ CrossfadeEditor::dump () void CrossfadeEditor::audition_state_changed (bool yn) { - ENSURE_GUI_THREAD (bind (slot (*this, &CrossfadeEditor::audition_state_changed), yn)); + ENSURE_GUI_THREAD (bind (mem_fun(*this, &CrossfadeEditor::audition_state_changed), yn)); if (!yn) { audition_both_button.set_active (false); @@ -1104,7 +1104,7 @@ CrossfadeEditor::make_waves (AudioRegion& region, WhichFade which) gdouble yoff = n * ht; - if (region.source(n).peaks_ready (bind (slot (*this, &CrossfadeEditor::peaks_ready), ®ion, which))) { + if (region.source(n).peaks_ready (bind (mem_fun(*this, &CrossfadeEditor::peaks_ready), ®ion, which))) { GtkCanvasItem *wave = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)), gtk_canvas_waveview_get_type (), diff --git a/gtk2_ardour/crossfade_view.cc b/gtk2_ardour/crossfade_view.cc index 04867e51c6..c126eed80f 100644 --- a/gtk2_ardour/crossfade_view.cc +++ b/gtk2_ardour/crossfade_view.cc @@ -87,7 +87,7 @@ CrossfadeView::CrossfadeView (GtkCanvasGroup *parent, crossfade_changed (Change (~0)); - crossfade.StateChanged.connect (slot (*this, &CrossfadeView::crossfade_changed)); + crossfade.StateChanged.connect (mem_fun(*this, &CrossfadeView::crossfade_changed)); } CrossfadeView::~CrossfadeView () diff --git a/gtk2_ardour/default_keys.cc b/gtk2_ardour/default_keys.cc index 6fef34545e..22db12ab2a 100644 --- a/gtk2_ardour/default_keys.cc +++ b/gtk2_ardour/default_keys.cc @@ -33,81 +33,81 @@ using namespace sigc; void ARDOUR_UI::install_keybindings () { - KeyboardTarget::add_action ("start-prefix", slot (*this, &ARDOUR_UI::start_keyboard_prefix)); + KeyboardTarget::add_action ("start-prefix", mem_fun(*this, &ARDOUR_UI::start_keyboard_prefix)); - KeyboardTarget::add_action ("toggle-editor-window", slot (*this, &ARDOUR_UI::goto_editor_window)); - KeyboardTarget::add_action ("toggle-mixer-window", slot (*this, &ARDOUR_UI::goto_mixer_window)); - KeyboardTarget::add_action ("toggle-locations-window", slot (*this, &ARDOUR_UI::toggle_location_window)); - KeyboardTarget::add_action ("toggle-big-clock-window", slot (*this, &ARDOUR_UI::toggle_big_clock_window)); - KeyboardTarget::add_action ("toggle-options-window", slot (*this, &ARDOUR_UI::toggle_options_window)); - KeyboardTarget::add_action ("toggle-auto-loop", slot (*this, &ARDOUR_UI::toggle_session_auto_loop)); - KeyboardTarget::add_action ("toggle-punch-in", slot (*this, &ARDOUR_UI::toggle_session_punch_in)); + KeyboardTarget::add_action ("toggle-editor-window", mem_fun(*this, &ARDOUR_UI::goto_editor_window)); + KeyboardTarget::add_action ("toggle-mixer-window", mem_fun(*this, &ARDOUR_UI::goto_mixer_window)); + KeyboardTarget::add_action ("toggle-locations-window", mem_fun(*this, &ARDOUR_UI::toggle_location_window)); + KeyboardTarget::add_action ("toggle-big-clock-window", mem_fun(*this, &ARDOUR_UI::toggle_big_clock_window)); + KeyboardTarget::add_action ("toggle-options-window", mem_fun(*this, &ARDOUR_UI::toggle_options_window)); + KeyboardTarget::add_action ("toggle-auto-loop", mem_fun(*this, &ARDOUR_UI::toggle_session_auto_loop)); + KeyboardTarget::add_action ("toggle-punch-in", mem_fun(*this, &ARDOUR_UI::toggle_session_punch_in)); - KeyboardTarget::add_action ("new-session", bind (slot (*this, &ARDOUR_UI::new_session), false, string())); - KeyboardTarget::add_action ("add-audio-track", bind (slot (*this, &ARDOUR_UI::session_add_audio_track), 1, 1)); - KeyboardTarget::add_action ("add-audio-bus", bind (slot (*this, &ARDOUR_UI::session_add_audio_bus), 1, 1)); + KeyboardTarget::add_action ("new-session", bind (mem_fun(*this, &ARDOUR_UI::new_session), false, string())); + KeyboardTarget::add_action ("add-audio-track", bind (mem_fun(*this, &ARDOUR_UI::session_add_audio_track), 1, 1)); + KeyboardTarget::add_action ("add-audio-bus", bind (mem_fun(*this, &ARDOUR_UI::session_add_audio_bus), 1, 1)); - KeyboardTarget::add_action ("save-state", bind (slot (*this, &ARDOUR_UI::save_state), string (""))); - KeyboardTarget::add_action ("quit", (slot (*this, &ARDOUR_UI::finish))); + KeyboardTarget::add_action ("save-state", bind (mem_fun(*this, &ARDOUR_UI::save_state), string (""))); + KeyboardTarget::add_action ("quit", (mem_fun(*this, &ARDOUR_UI::finish))); - KeyboardTarget::add_action ("remove-last-capture", slot (*this, &ARDOUR_UI::remove_last_capture)); + KeyboardTarget::add_action ("remove-last-capture", mem_fun(*this, &ARDOUR_UI::remove_last_capture)); - KeyboardTarget::add_action ("transport-stop", slot (*this, &ARDOUR_UI::transport_stop)); - KeyboardTarget::add_action ("transport-stop-and-forget-capture", slot (*this, &ARDOUR_UI::transport_stop_and_forget_capture)); - KeyboardTarget::add_action ("transport-roll", slot (*this, &ARDOUR_UI::transport_roll)); - KeyboardTarget::add_action ("transport-loop", slot (*this, &ARDOUR_UI::transport_loop)); - KeyboardTarget::add_action ("transport-record", slot (*this, &ARDOUR_UI::transport_record)); - KeyboardTarget::add_action ("transport-rewind", bind (slot (*this, &ARDOUR_UI::transport_rewind), 0)); - KeyboardTarget::add_action ("transport-rewind-slow", bind (slot (*this, &ARDOUR_UI::transport_rewind), -1)); - KeyboardTarget::add_action ("transport-rewind-fast", bind (slot (*this, &ARDOUR_UI::transport_rewind), 1)); - KeyboardTarget::add_action ("transport-forward", bind (slot (*this, &ARDOUR_UI::transport_forward), 0)); - KeyboardTarget::add_action ("transport-forward-slow", bind (slot (*this, &ARDOUR_UI::transport_forward), -1)); - KeyboardTarget::add_action ("transport-forward-fast", bind (slot (*this, &ARDOUR_UI::transport_forward), 1)); + KeyboardTarget::add_action ("transport-stop", mem_fun(*this, &ARDOUR_UI::transport_stop)); + KeyboardTarget::add_action ("transport-stop-and-forget-capture", mem_fun(*this, &ARDOUR_UI::transport_stop_and_forget_capture)); + KeyboardTarget::add_action ("transport-roll", mem_fun(*this, &ARDOUR_UI::transport_roll)); + KeyboardTarget::add_action ("transport-loop", mem_fun(*this, &ARDOUR_UI::transport_loop)); + KeyboardTarget::add_action ("transport-record", mem_fun(*this, &ARDOUR_UI::transport_record)); + KeyboardTarget::add_action ("transport-rewind", bind (mem_fun(*this, &ARDOUR_UI::transport_rewind), 0)); + KeyboardTarget::add_action ("transport-rewind-slow", bind (mem_fun(*this, &ARDOUR_UI::transport_rewind), -1)); + KeyboardTarget::add_action ("transport-rewind-fast", bind (mem_fun(*this, &ARDOUR_UI::transport_rewind), 1)); + KeyboardTarget::add_action ("transport-forward", bind (mem_fun(*this, &ARDOUR_UI::transport_forward), 0)); + KeyboardTarget::add_action ("transport-forward-slow", bind (mem_fun(*this, &ARDOUR_UI::transport_forward), -1)); + KeyboardTarget::add_action ("transport-forward-fast", bind (mem_fun(*this, &ARDOUR_UI::transport_forward), 1)); - KeyboardTarget::add_action ("transport-goto-start", slot (*this, &ARDOUR_UI::transport_goto_start)); - KeyboardTarget::add_action ("transport-goto-end", slot (*this, &ARDOUR_UI::transport_goto_end)); + KeyboardTarget::add_action ("transport-goto-start", mem_fun(*this, &ARDOUR_UI::transport_goto_start)); + KeyboardTarget::add_action ("transport-goto-end", mem_fun(*this, &ARDOUR_UI::transport_goto_end)); - KeyboardTarget::add_action ("send-all-midi-feedback", slot (*this, &ARDOUR_UI::send_all_midi_feedback)); + KeyboardTarget::add_action ("send-all-midi-feedback", mem_fun(*this, &ARDOUR_UI::send_all_midi_feedback)); - KeyboardTarget::add_action ("toggle-record-enable-track1", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 0U)); - KeyboardTarget::add_action ("toggle-record-enable-track2", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 1U)); - KeyboardTarget::add_action ("toggle-record-enable-track3", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 2U)); - KeyboardTarget::add_action ("toggle-record-enable-track4", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 3U)); - KeyboardTarget::add_action ("toggle-record-enable-track5", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 4U)); - KeyboardTarget::add_action ("toggle-record-enable-track6", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 5U)); - KeyboardTarget::add_action ("toggle-record-enable-track7", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 6U)); - KeyboardTarget::add_action ("toggle-record-enable-track8", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 7U)); - KeyboardTarget::add_action ("toggle-record-enable-track9", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 8U)); - KeyboardTarget::add_action ("toggle-record-enable-track10", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 9U)); - KeyboardTarget::add_action ("toggle-record-enable-track11", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 10U)); - KeyboardTarget::add_action ("toggle-record-enable-track12", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 11U)); - KeyboardTarget::add_action ("toggle-record-enable-track13", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 12U)); - KeyboardTarget::add_action ("toggle-record-enable-track14", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 13U)); - KeyboardTarget::add_action ("toggle-record-enable-track15", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 14U)); - KeyboardTarget::add_action ("toggle-record-enable-track16", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 15U)); - KeyboardTarget::add_action ("toggle-record-enable-track17", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 16U)); - KeyboardTarget::add_action ("toggle-record-enable-track18", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 17U)); - KeyboardTarget::add_action ("toggle-record-enable-track19", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 18U)); - KeyboardTarget::add_action ("toggle-record-enable-track20", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 19U)); - KeyboardTarget::add_action ("toggle-record-enable-track21", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 20U)); - KeyboardTarget::add_action ("toggle-record-enable-track22", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 21U)); - KeyboardTarget::add_action ("toggle-record-enable-track23", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 22U)); - KeyboardTarget::add_action ("toggle-record-enable-track24", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 23U)); - KeyboardTarget::add_action ("toggle-record-enable-track25", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 24U)); - KeyboardTarget::add_action ("toggle-record-enable-track26", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 25U)); - KeyboardTarget::add_action ("toggle-record-enable-track27", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 26U)); - KeyboardTarget::add_action ("toggle-record-enable-track28", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 27U)); - KeyboardTarget::add_action ("toggle-record-enable-track29", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 28U)); - KeyboardTarget::add_action ("toggle-record-enable-track30", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 29U)); - KeyboardTarget::add_action ("toggle-record-enable-track31", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 30U)); - KeyboardTarget::add_action ("toggle-record-enable-track32", bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 31U)); + KeyboardTarget::add_action ("toggle-record-enable-track1", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 0U)); + KeyboardTarget::add_action ("toggle-record-enable-track2", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 1U)); + KeyboardTarget::add_action ("toggle-record-enable-track3", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 2U)); + KeyboardTarget::add_action ("toggle-record-enable-track4", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 3U)); + KeyboardTarget::add_action ("toggle-record-enable-track5", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 4U)); + KeyboardTarget::add_action ("toggle-record-enable-track6", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 5U)); + KeyboardTarget::add_action ("toggle-record-enable-track7", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 6U)); + KeyboardTarget::add_action ("toggle-record-enable-track8", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 7U)); + KeyboardTarget::add_action ("toggle-record-enable-track9", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 8U)); + KeyboardTarget::add_action ("toggle-record-enable-track10", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 9U)); + KeyboardTarget::add_action ("toggle-record-enable-track11", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 10U)); + KeyboardTarget::add_action ("toggle-record-enable-track12", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 11U)); + KeyboardTarget::add_action ("toggle-record-enable-track13", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 12U)); + KeyboardTarget::add_action ("toggle-record-enable-track14", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 13U)); + KeyboardTarget::add_action ("toggle-record-enable-track15", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 14U)); + KeyboardTarget::add_action ("toggle-record-enable-track16", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 15U)); + KeyboardTarget::add_action ("toggle-record-enable-track17", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 16U)); + KeyboardTarget::add_action ("toggle-record-enable-track18", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 17U)); + KeyboardTarget::add_action ("toggle-record-enable-track19", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 18U)); + KeyboardTarget::add_action ("toggle-record-enable-track20", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 19U)); + KeyboardTarget::add_action ("toggle-record-enable-track21", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 20U)); + KeyboardTarget::add_action ("toggle-record-enable-track22", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 21U)); + KeyboardTarget::add_action ("toggle-record-enable-track23", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 22U)); + KeyboardTarget::add_action ("toggle-record-enable-track24", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 23U)); + KeyboardTarget::add_action ("toggle-record-enable-track25", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 24U)); + KeyboardTarget::add_action ("toggle-record-enable-track26", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 25U)); + KeyboardTarget::add_action ("toggle-record-enable-track27", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 26U)); + KeyboardTarget::add_action ("toggle-record-enable-track28", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 27U)); + KeyboardTarget::add_action ("toggle-record-enable-track29", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 28U)); + KeyboardTarget::add_action ("toggle-record-enable-track30", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 29U)); + KeyboardTarget::add_action ("toggle-record-enable-track31", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 30U)); + KeyboardTarget::add_action ("toggle-record-enable-track32", bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 31U)); #if 0 ADD ME TO ARDOUR RC SOMEDAY - add_binding ("Shift-F1",, bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 0+12U)); - add_binding ("Control-F1",, bind (slot (*this, &ARDOUR_UI::toggle_record_enable), 0+24U)); - add_binding ("Alt-F1",, bind (slot (*this, &ARDOUR_UI::toggle_monitor_enable), 0U)); - add_binding ("Alt-Shift-F1",, bind (slot (*this, &ARDOUR_UI::toggle_monitor_enable), 0+12U)); - add_binding ("Alt-Control-F1",, bind (slot (*this, &ARDOUR_UI::toggle_monitor_enable), 0+24U)); + add_binding ("Shift-F1",, bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 0+12U)); + add_binding ("Control-F1",, bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 0+24U)); + add_binding ("Alt-F1",, bind (mem_fun(*this, &ARDOUR_UI::toggle_monitor_enable), 0U)); + add_binding ("Alt-Shift-F1",, bind (mem_fun(*this, &ARDOUR_UI::toggle_monitor_enable), 0+12U)); + add_binding ("Alt-Control-F1",, bind (mem_fun(*this, &ARDOUR_UI::toggle_monitor_enable), 0+24U)); #endif } diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 2e99c933f2..7f10be94fc 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -277,10 +277,10 @@ Editor::Editor (AudioEngine& eng) selection = new Selection; cut_buffer = new Selection; - selection->TimeChanged.connect (slot (*this, &Editor::time_selection_changed)); - selection->TracksChanged.connect (slot (*this, &Editor::track_selection_changed)); - selection->RegionsChanged.connect (slot (*this, &Editor::region_selection_changed)); - selection->PointsChanged.connect (slot (*this, &Editor::point_selection_changed)); + selection->TimeChanged.connect (mem_fun(*this, &Editor::time_selection_changed)); + selection->TracksChanged.connect (mem_fun(*this, &Editor::track_selection_changed)); + selection->RegionsChanged.connect (mem_fun(*this, &Editor::region_selection_changed)); + selection->PointsChanged.connect (mem_fun(*this, &Editor::point_selection_changed)); clicked_regionview = 0; clicked_trackview = 0; @@ -367,7 +367,7 @@ Editor::Editor (AudioEngine& eng) frames_per_unit = 2048; /* too early to use set_frames_per_unit */ zoom_focus = ZoomFocusLeft; - zoom_range_clock.ValueChanged.connect (slot (*this, &Editor::zoom_adjustment_changed)); + zoom_range_clock.ValueChanged.connect (mem_fun(*this, &Editor::zoom_adjustment_changed)); initialize_rulers (); initialize_canvas (); @@ -376,20 +376,20 @@ 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 (slot (*this, &Editor::tie_vertical_scrolling)); + track_canvas_scroller.get_vadjustment()->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 (slot (*this, &Editor::canvas_horizontally_scrolled)); + track_canvas_scroller.get_hadjustment()->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()); - edit_hscrollbar.button_press_event.connect (slot (*this, &Editor::hscroll_slider_button_press)); - edit_hscrollbar.button_release_event.connect (slot (*this, &Editor::hscroll_slider_button_release)); - edit_hscrollbar.size_allocate.connect (slot (*this, &Editor::hscroll_slider_allocate)); + edit_hscrollbar.button_press_event.connect (mem_fun(*this, &Editor::hscroll_slider_button_press)); + edit_hscrollbar.button_release_event.connect (mem_fun(*this, &Editor::hscroll_slider_button_release)); + edit_hscrollbar.size_allocate.connect (mem_fun(*this, &Editor::hscroll_slider_allocate)); time_canvas_scroller.add (*time_canvas); time_canvas_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_NEVER); @@ -407,7 +407,7 @@ Editor::Editor (AudioEngine& eng) viewport->set_shadow_type (GTK_SHADOW_NONE); viewport->set_name ("EditControlsBase"); viewport->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK); - viewport->button_release_event.connect (slot (*this, &Editor::edit_controls_button_release)); + viewport->button_release_event.connect (mem_fun(*this, &Editor::edit_controls_button_release)); build_cursors (); setup_toolbar (); @@ -415,7 +415,7 @@ Editor::Editor (AudioEngine& eng) XMLNode* node = ARDOUR_UI::instance()->editor_settings(); set_state (*node); - edit_cursor_clock.ValueChanged.connect (slot (*this, &Editor::edit_cursor_clock_changed)); + edit_cursor_clock.ValueChanged.connect (mem_fun(*this, &Editor::edit_cursor_clock_changed)); time_canvas_vbox.pack_start (*minsec_ruler, false, false); time_canvas_vbox.pack_start (*smpte_ruler, false, false); @@ -473,7 +473,7 @@ Editor::Editor (AudioEngine& eng) 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.button_release_event.connect (slot (*this, &Editor::ruler_label_button_release)); + time_button_event_box.button_release_event.connect (mem_fun(*this, &Editor::ruler_label_button_release)); /* these enable us to have a dedicated window (for cursor setting, etc.) for the canvas areas. @@ -522,10 +522,10 @@ Editor::Editor (AudioEngine& eng) // zoom_onetoone_button.add (*(manage (new Gtk::Image (zoom_onetoone_button_xpm)))); - zoom_in_button.signal_clicked().connect (bind (slot (*this, &Editor::temporal_zoom_step), false)); - zoom_out_button.signal_clicked().connect (bind (slot (*this, &Editor::temporal_zoom_step), true)); - zoom_out_full_button.signal_clicked().connect (slot (*this, &Editor::temporal_zoom_session)); -// zoom_onetoone_button.signal_clicked().connect (bind (slot (*this, &Editor::temporal_zoom), 1.0)); + zoom_in_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), false)); + zoom_out_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), true)); + zoom_out_full_button.signal_clicked().connect (mem_fun(*this, &Editor::temporal_zoom_session)); +// zoom_onetoone_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom), 1.0)); zoom_indicator_box.pack_start (zoom_out_button, false, false); zoom_indicator_box.pack_start (zoom_in_button, false, false); @@ -558,10 +558,10 @@ Editor::Editor (AudioEngine& eng) route_list_scroller.add (route_list); route_list_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); - route_list.select_row.connect (slot (*this, &Editor::route_list_selected)); - route_list.unselect_row.connect (slot (*this, &Editor::route_list_unselected)); - route_list.row_move.connect (slot (*this, &Editor::queue_route_list_reordered)); - route_list.click_column.connect (slot (*this, &Editor::route_list_column_click)); + route_list.select_row.connect (mem_fun(*this, &Editor::route_list_selected)); + route_list.unselect_row.connect (mem_fun(*this, &Editor::route_list_unselected)); + route_list.row_move.connect (mem_fun(*this, &Editor::queue_route_list_reordered)); + route_list.click_column.connect (mem_fun(*this, &Editor::route_list_column_click)); edit_group_list_button_label.set_text (_("Edit Groups")); edit_group_list_button_label.set_name ("EditGroupTitleButton"); @@ -580,10 +580,10 @@ Editor::Editor (AudioEngine& eng) edit_group_list_scroller.add (edit_group_list); edit_group_list_scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - edit_group_list_button.signal_clicked().connect (slot (*this, &Editor::edit_group_list_button_clicked)); - edit_group_list.button_press_event.connect (slot (*this, &Editor::edit_group_list_button_press_event)); - edit_group_list.select_row.connect (slot (*this, &Editor::edit_group_selected)); - edit_group_list.unselect_row.connect (slot (*this, &Editor::edit_group_unselected)); + edit_group_list_button.signal_clicked().connect (mem_fun(*this, &Editor::edit_group_list_button_clicked)); + edit_group_list.button_press_event.connect (mem_fun(*this, &Editor::edit_group_list_button_press_event)); + edit_group_list.select_row.connect (mem_fun(*this, &Editor::edit_group_selected)); + edit_group_list.unselect_row.connect (mem_fun(*this, &Editor::edit_group_unselected)); list stupid_list; @@ -617,7 +617,7 @@ Editor::Editor (AudioEngine& eng) 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 (slot (*this, &Editor::region_list_display_drag_data_received)); + 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); @@ -634,16 +634,16 @@ Editor::Editor (AudioEngine& eng) region_list_display.set_flags (Gtk::CAN_FOCUS); - region_list_display.key_press_event.connect (slot (*this, &Editor::region_list_display_key_press)); - region_list_display.key_release_event.connect (slot (*this, &Editor::region_list_display_key_release)); - region_list_display.button_press_event.connect (slot (*this, &Editor::region_list_display_button_press)); - region_list_display.button_release_event.connect (slot (*this, &Editor::region_list_display_button_release)); - region_list_display.motion_notify_event.connect (slot (*this, &Editor::region_list_display_motion)); - region_list_display.enter_notify_event.connect (slot (*this, &Editor::region_list_display_enter_notify)); - region_list_display.leave_notify_event.connect (slot (*this, &Editor::region_list_display_leave_notify)); - region_list_display.select_row.connect (slot (*this, &Editor::region_list_display_selected)); - region_list_display.unselect_row.connect (slot (*this, &Editor::region_list_display_unselected)); - region_list_display.click_column.connect (slot (*this, &Editor::region_list_column_click)); + region_list_display.key_press_event.connect (mem_fun(*this, &Editor::region_list_display_key_press)); + region_list_display.key_release_event.connect (mem_fun(*this, &Editor::region_list_display_key_release)); + region_list_display.button_press_event.connect (mem_fun(*this, &Editor::region_list_display_button_press)); + region_list_display.button_release_event.connect (mem_fun(*this, &Editor::region_list_display_button_release)); + region_list_display.motion_notify_event.connect (mem_fun(*this, &Editor::region_list_display_motion)); + region_list_display.enter_notify_event.connect (mem_fun(*this, &Editor::region_list_display_enter_notify)); + region_list_display.leave_notify_event.connect (mem_fun(*this, &Editor::region_list_display_leave_notify)); + region_list_display.select_row.connect (mem_fun(*this, &Editor::region_list_display_selected)); + region_list_display.unselect_row.connect (mem_fun(*this, &Editor::region_list_display_unselected)); + region_list_display.click_column.connect (mem_fun(*this, &Editor::region_list_column_click)); named_selection_scroller.add (named_selection_display); named_selection_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); @@ -653,9 +653,9 @@ Editor::Editor (AudioEngine& eng) named_selection_display.column_titles_active (); named_selection_display.set_selection_mode (GTK_SELECTION_SINGLE); - named_selection_display.button_press_event.connect (slot (*this, &Editor::named_selection_display_button_press)); - named_selection_display.select_row.connect (slot (*this, &Editor::named_selection_display_selected)); - named_selection_display.unselect_row.connect (slot (*this, &Editor::named_selection_display_unselected)); + named_selection_display.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)); + named_selection_display.unselect_row.connect (mem_fun(*this, &Editor::named_selection_display_unselected)); region_selection_vpane.pack1 (region_list_scroller, true, true); region_selection_vpane.pack2 (named_selection_scroller, true, true); @@ -663,13 +663,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 (slot (*this, &Editor::pane_allocation_handler), + track_list_canvas_pane.size_allocate.connect_after (bind (mem_fun(*this, &Editor::pane_allocation_handler), static_cast (&track_list_canvas_pane))); - canvas_region_list_pane.size_allocate.connect_after (bind (slot (*this, &Editor::pane_allocation_handler), + canvas_region_list_pane.size_allocate.connect_after (bind (mem_fun(*this, &Editor::pane_allocation_handler), static_cast (&canvas_region_list_pane))); - route_group_vpane.size_allocate.connect_after (bind (slot (*this, &Editor::pane_allocation_handler), + route_group_vpane.size_allocate.connect_after (bind (mem_fun(*this, &Editor::pane_allocation_handler), static_cast (&route_group_vpane))); - region_selection_vpane.size_allocate.connect_after (bind (slot (*this, &Editor::pane_allocation_handler), + region_selection_vpane.size_allocate.connect_after (bind (mem_fun(*this, &Editor::pane_allocation_handler), static_cast (®ion_selection_vpane))); track_list_canvas_pane.pack1 (list_vpacker, true, true); @@ -686,10 +686,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.button_release_event.connect (bind (slot (pane_handler), static_cast (&route_group_vpane))); - region_selection_vpane.button_release_event.connect (bind (slot (pane_handler), static_cast (®ion_selection_vpane))); - canvas_region_list_pane.button_release_event.connect (bind (slot (pane_handler), static_cast (&canvas_region_list_pane))); - track_list_canvas_pane.button_release_event.connect (bind (slot (pane_handler), static_cast (&track_list_canvas_pane))); + route_group_vpane.button_release_event.connect (bind (ptr_fun (pane_handler), static_cast (&route_group_vpane))); + region_selection_vpane.button_release_event.connect (bind (ptr_fun (pane_handler), static_cast (®ion_selection_vpane))); + canvas_region_list_pane.button_release_event.connect (bind (ptr_fun (pane_handler), static_cast (&canvas_region_list_pane))); + track_list_canvas_pane.button_release_event.connect (bind (ptr_fun (pane_handler), static_cast (&track_list_canvas_pane))); top_hbox.pack_start (toolbar_frame, true, true); @@ -706,9 +706,9 @@ Editor::Editor (AudioEngine& eng) vpacker.pack_end (global_hpacker, true, true); _playlist_selector = new PlaylistSelector(); - _playlist_selector->delete_event.connect (bind (slot (just_hide_it), static_cast (_playlist_selector))); + _playlist_selector->delete_event.connect (bind (ptr_fun (just_hide_it), static_cast (_playlist_selector))); - AudioRegionView::AudioRegionViewGoingAway.connect (slot (*this, &Editor::catch_vanishing_audio_regionview)); + AudioRegionView::AudioRegionViewGoingAway.connect (mem_fun(*this, &Editor::catch_vanishing_audio_regionview)); /* nudge stuff */ @@ -731,8 +731,8 @@ Editor::Editor (AudioEngine& eng) add (vpacker); add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK); - configure_event.connect (slot (*ARDOUR_UI::instance(), &ARDOUR_UI::configure_handler)); - delete_event.connect (slot (*ARDOUR_UI::instance(), &ARDOUR_UI::exit_on_main_window_close)); + configure_event.connect (mem_fun (*ARDOUR_UI::instance(), &ARDOUR_UI::configure_handler)); + delete_event.connect (mem_fun (*ARDOUR_UI::instance(), &ARDOUR_UI::exit_on_main_window_close)); constructed = true; instant_save (); @@ -832,14 +832,14 @@ Editor::initialize_canvas () track_canvas->add_events (Gdk::POINTER_MOTION_HINT_MASK); - track_canvas->leave_notify_event.connect (slot (*this, &Editor::left_track_canvas)); + track_canvas->leave_notify_event.connect (mem_fun(*this, &Editor::left_track_canvas)); /* set up drag-n-drop */ track_canvas->drag_dest_set (GTK_DEST_DEFAULT_ALL, target_table, n_targets - 1, GdkDragAction (Gdk::ACTION_COPY|Gdk::ACTION_MOVE)); - track_canvas->drag_data_received.connect (slot (*this, &Editor::track_canvas_drag_data_received)); + track_canvas->drag_data_received.connect (mem_fun(*this, &Editor::track_canvas_drag_data_received)); /* stuff for the verbose canvas cursor */ @@ -1159,8 +1159,8 @@ Editor::initialize_canvas () // cerr << "marker line @ " << marker_line << endl; - ZoomChanged.connect (bind (slot (*this, &Editor::update_loop_range_view), false)); - ZoomChanged.connect (bind (slot (*this, &Editor::update_punch_range_view), false)); + ZoomChanged.connect (bind (mem_fun(*this, &Editor::update_loop_range_view), false)); + ZoomChanged.connect (bind (mem_fun(*this, &Editor::update_punch_range_view), false)); double time_height = timebar_height * 5; double time_width = FLT_MAX/frames_per_unit; @@ -1169,7 +1169,7 @@ Editor::initialize_canvas () edit_cursor = new Cursor (*this, "blue", (GtkSignalFunc) _canvas_edit_cursor_event); playhead_cursor = new Cursor (*this, "red", (GtkSignalFunc) _canvas_playhead_cursor_event); - track_canvas->size_allocate.connect (slot (*this, &Editor::track_canvas_allocate)); + track_canvas->size_allocate.connect (mem_fun(*this, &Editor::track_canvas_allocate)); } void @@ -1342,7 +1342,7 @@ void Editor::reposition_and_zoom (jack_nframes_t frame, double nfpu) { if (!repos_zoom_queued) { - Main::idle.connect (bind (slot (*this, &Editor::deferred_reposition_and_zoom), frame, nfpu)); + Main::idle.connect (bind (mem_fun(*this, &Editor::deferred_reposition_and_zoom), frame, nfpu)); repos_zoom_queued = true; } } @@ -1568,7 +1568,7 @@ Editor::reset_scrolling_region (GtkAllocation *alloc) void Editor::queue_session_control_changed (Session::ControlType t) { - Gtkmm2ext::UI::instance()->call_slot (bind (slot (*this, &Editor::session_control_changed), t)); + Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &Editor::session_control_changed), t)); } void @@ -1593,35 +1593,35 @@ Editor::session_control_changed (Session::ControlType t) void Editor::fake_add_edit_group (RouteGroup *group) { - Gtkmm2ext::UI::instance()->call_slot (bind (slot (*this, &Editor::add_edit_group), group)); + Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &Editor::add_edit_group), group)); } void Editor::fake_handle_new_audio_region (AudioRegion *region) { - Gtkmm2ext::UI::instance()->call_slot (bind (slot (*this, &Editor::handle_new_audio_region), region)); + Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &Editor::handle_new_audio_region), region)); } void Editor::fake_handle_audio_region_removed (AudioRegion *region) { - Gtkmm2ext::UI::instance()->call_slot (bind (slot (*this, &Editor::handle_audio_region_removed), region)); + Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &Editor::handle_audio_region_removed), region)); } void Editor::fake_handle_new_duration () { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &Editor::handle_new_duration)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &Editor::handle_new_duration)); } void Editor::start_scrolling () { scroll_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect - (slot (*this, &Editor::update_current_screen)); + (mem_fun(*this, &Editor::update_current_screen)); slower_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect - (slot (*this, &Editor::update_slower)); + (mem_fun(*this, &Editor::update_slower)); } void @@ -1634,7 +1634,7 @@ Editor::stop_scrolling () void Editor::map_position_change (jack_nframes_t frame) { - ENSURE_GUI_THREAD (bind (slot (*this, &Editor::map_position_change), frame)); + ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::map_position_change), frame)); if (session == 0 || !_follow_playhead) { return; @@ -1687,7 +1687,7 @@ Editor::handle_new_duration () void Editor::update_title_s (string snap_name) { - ENSURE_GUI_THREAD(bind (slot (*this, &Editor::update_title_s), snap_name)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::update_title_s), snap_name)); update_title (); } @@ -1695,7 +1695,7 @@ Editor::update_title_s (string snap_name) void Editor::update_title () { - ENSURE_GUI_THREAD (slot (*this, &Editor::update_title)); + ENSURE_GUI_THREAD (mem_fun(*this, &Editor::update_title)); if (session) { bool dirty = session->dirty(); @@ -1734,35 +1734,35 @@ Editor::connect_to_session (Session *t) update_title (); - session->going_away.connect (slot (*this, &Editor::session_going_away)); + session->going_away.connect (mem_fun(*this, &Editor::session_going_away)); /* These signals can all be emitted by a non-GUI thread. Therefore the handlers for them must not attempt to directly interact with the GUI, but use Gtkmm2ext::UI::instance()->call_slot(); */ - session_connections.push_back (session->TransportStateChange.connect (slot (*this, &Editor::map_transport_state))); - session_connections.push_back (session->PositionChanged.connect (slot (*this, &Editor::map_position_change))); - session_connections.push_back (session->RouteAdded.connect (slot (*this, &Editor::handle_new_route_p))); - session_connections.push_back (session->AudioRegionAdded.connect (slot (*this, &Editor::fake_handle_new_audio_region))); - session_connections.push_back (session->AudioRegionRemoved.connect (slot (*this, &Editor::fake_handle_audio_region_removed))); - session_connections.push_back (session->DurationChanged.connect (slot (*this, &Editor::fake_handle_new_duration))); - session_connections.push_back (session->edit_group_added.connect (slot (*this, &Editor::fake_add_edit_group))); - session_connections.push_back (session->NamedSelectionAdded.connect (slot (*this, &Editor::handle_new_named_selection))); - session_connections.push_back (session->NamedSelectionRemoved.connect (slot (*this, &Editor::handle_new_named_selection))); - session_connections.push_back (session->DirtyChanged.connect (slot (*this, &Editor::update_title))); - session_connections.push_back (session->StateSaved.connect (slot (*this, &Editor::update_title_s))); - session_connections.push_back (session->AskAboutPlaylistDeletion.connect (slot (*this, &Editor::playlist_deletion_dialog))); - session_connections.push_back (session->RegionHiddenChange.connect (slot (*this, &Editor::region_hidden))); - - session_connections.push_back (session->SMPTEOffsetChanged.connect (slot (*this, &Editor::update_just_smpte))); - session_connections.push_back (session->SMPTETypeChanged.connect (slot (*this, &Editor::update_just_smpte))); - - session_connections.push_back (session->tempo_map().StateChanged.connect (slot (*this, &Editor::tempo_map_changed))); + session_connections.push_back (session->TransportStateChange.connect (mem_fun(*this, &Editor::map_transport_state))); + session_connections.push_back (session->PositionChanged.connect (mem_fun(*this, &Editor::map_position_change))); + session_connections.push_back (session->RouteAdded.connect (mem_fun(*this, &Editor::handle_new_route_p))); + session_connections.push_back (session->AudioRegionAdded.connect (mem_fun(*this, &Editor::fake_handle_new_audio_region))); + session_connections.push_back (session->AudioRegionRemoved.connect (mem_fun(*this, &Editor::fake_handle_audio_region_removed))); + session_connections.push_back (session->DurationChanged.connect (mem_fun(*this, &Editor::fake_handle_new_duration))); + session_connections.push_back (session->edit_group_added.connect (mem_fun(*this, &Editor::fake_add_edit_group))); + session_connections.push_back (session->NamedSelectionAdded.connect (mem_fun(*this, &Editor::handle_new_named_selection))); + session_connections.push_back (session->NamedSelectionRemoved.connect (mem_fun(*this, &Editor::handle_new_named_selection))); + session_connections.push_back (session->DirtyChanged.connect (mem_fun(*this, &Editor::update_title))); + session_connections.push_back (session->StateSaved.connect (mem_fun(*this, &Editor::update_title_s))); + session_connections.push_back (session->AskAboutPlaylistDeletion.connect (mem_fun(*this, &Editor::playlist_deletion_dialog))); + session_connections.push_back (session->RegionHiddenChange.connect (mem_fun(*this, &Editor::region_hidden))); + + session_connections.push_back (session->SMPTEOffsetChanged.connect (mem_fun(*this, &Editor::update_just_smpte))); + session_connections.push_back (session->SMPTETypeChanged.connect (mem_fun(*this, &Editor::update_just_smpte))); + + session_connections.push_back (session->tempo_map().StateChanged.connect (mem_fun(*this, &Editor::tempo_map_changed))); session->foreach_edit_group(this, &Editor::add_edit_group); - editor_mixer_button.toggled.connect (slot (*this, &Editor::editor_mixer_button_toggled)); + editor_mixer_button.toggled.connect (mem_fun(*this, &Editor::editor_mixer_button_toggled)); editor_mixer_button.set_name (X_("EditorMixerButton")); edit_cursor_clock.set_session (session); @@ -1813,15 +1813,15 @@ Editor::connect_to_session (Session *t) update_loop_range_view (true); update_punch_range_view (true); - session->ControlChanged.connect (slot (*this, &Editor::queue_session_control_changed)); + session->ControlChanged.connect (mem_fun(*this, &Editor::queue_session_control_changed)); refresh_location_display (); - session->locations()->added.connect (slot (*this, &Editor::add_new_location)); - session->locations()->removed.connect (slot (*this, &Editor::location_gone)); - session->locations()->changed.connect (slot (*this, &Editor::refresh_location_display)); - session->locations()->StateChanged.connect (slot (*this, &Editor::refresh_location_display_s)); - session->locations()->end_location()->changed.connect (slot (*this, &Editor::end_location_changed)); + session->locations()->added.connect (mem_fun(*this, &Editor::add_new_location)); + session->locations()->removed.connect (mem_fun(*this, &Editor::location_gone)); + session->locations()->changed.connect (mem_fun(*this, &Editor::refresh_location_display)); + session->locations()->StateChanged.connect (mem_fun(*this, &Editor::refresh_location_display_s)); + session->locations()->end_location()->changed.connect (mem_fun(*this, &Editor::end_location_changed)); reset_scrolling_region (); @@ -2102,15 +2102,15 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, switch (clicked_audio_trackview->audio_track()->freeze_state()) { case AudioTrack::NoFreeze: - edit_items.push_back (MenuElem (_("Freeze"), slot (*this, &Editor::freeze_route))); + edit_items.push_back (MenuElem (_("Freeze"), mem_fun(*this, &Editor::freeze_route))); break; case AudioTrack::Frozen: - edit_items.push_back (MenuElem (_("Unfreeze"), slot (*this, &Editor::unfreeze_route))); + edit_items.push_back (MenuElem (_("Unfreeze"), mem_fun(*this, &Editor::unfreeze_route))); break; case AudioTrack::UnFrozen: - edit_items.push_back (MenuElem (_("Freeze"), slot (*this, &Editor::freeze_route))); + edit_items.push_back (MenuElem (_("Freeze"), mem_fun(*this, &Editor::freeze_route))); break; } @@ -2238,8 +2238,8 @@ Editor::add_crossfade_context_items (StreamView* view, Crossfade* xfade, Menu_He str = _("Unmute"); } - items.push_back (MenuElem (str, bind (slot (*this, &Editor::toggle_xfade_active), xfade))); - items.push_back (MenuElem (_("Edit"), bind (slot (*this, &Editor::edit_xfade), xfade))); + items.push_back (MenuElem (str, bind (mem_fun(*this, &Editor::toggle_xfade_active), xfade))); + items.push_back (MenuElem (_("Edit"), bind (mem_fun(*this, &Editor::edit_xfade), xfade))); if (xfade->can_follow_overlap()) { @@ -2249,7 +2249,7 @@ Editor::add_crossfade_context_items (StreamView* view, Crossfade* xfade, Menu_He str = _("Convert to full"); } - items.push_back (MenuElem (str, bind (slot (*this, &Editor::toggle_xfade_length), xfade))); + items.push_back (MenuElem (str, bind (mem_fun(*this, &Editor::toggle_xfade_length), xfade))); } if (many) { @@ -2298,19 +2298,19 @@ Editor::add_region_context_items (StreamView* sv, Region* region, Menu_Helpers:: become selected. */ - region_menu->map_event.connect (bind (slot (*this, &Editor::set_selected_regionview_from_map_event), sv, region)); + region_menu->map_event.connect (bind (mem_fun(*this, &Editor::set_selected_regionview_from_map_event), sv, region)); - items.push_back (MenuElem (_("Popup region editor"), slot (*this, &Editor::edit_region))); - items.push_back (MenuElem (_("Raise to top layer"), slot (*this, &Editor::raise_region_to_top))); + 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 (SeparatorElem()); - items.push_back (MenuElem (_("Define sync point"), slot (*this, &Editor::set_region_sync_from_edit_cursor))); - items.push_back (MenuElem (_("Remove sync point"), slot (*this, &Editor::remove_region_sync))); + 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))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Audition"), slot (*this, &Editor::audition_selected_region))); - items.push_back (MenuElem (_("Export"), slot (*this, &Editor::export_region))); - items.push_back (MenuElem (_("Bounce"), slot (*this, &Editor::bounce_region_selection))); + items.push_back (MenuElem (_("Audition"), mem_fun(*this, &Editor::audition_selected_region))); + items.push_back (MenuElem (_("Export"), mem_fun(*this, &Editor::export_region))); + items.push_back (MenuElem (_("Bounce"), mem_fun(*this, &Editor::bounce_region_selection))); items.push_back (SeparatorElem()); /* XXX hopefully this nonsense will go away with SigC++ 2.X, where the compiler @@ -2320,34 +2320,34 @@ Editor::add_region_context_items (StreamView* sv, Region* region, Menu_Helpers:: void (Editor::*type_A_pmf)(void (Region::*pmf)(bool), bool) = &Editor::region_selection_op; - items.push_back (MenuElem (_("Lock"), bind (slot (*this, type_A_pmf), &Region::set_locked, true))); - items.push_back (MenuElem (_("Unlock"), bind (slot (*this, type_A_pmf), &Region::set_locked, false))); + items.push_back (MenuElem (_("Lock"), bind (mem_fun(*this, type_A_pmf), &Region::set_locked, true))); + items.push_back (MenuElem (_("Unlock"), bind (mem_fun(*this, type_A_pmf), &Region::set_locked, false))); items.push_back (SeparatorElem()); if (region->muted()) { - items.push_back (MenuElem (_("Unmute"), bind (slot (*this, type_A_pmf), &Region::set_muted, false))); + items.push_back (MenuElem (_("Unmute"), bind (mem_fun(*this, type_A_pmf), &Region::set_muted, false))); } else { - items.push_back (MenuElem (_("Mute"), bind (slot (*this, type_A_pmf), &Region::set_muted, true))); + items.push_back (MenuElem (_("Mute"), bind (mem_fun(*this, type_A_pmf), &Region::set_muted, true))); } items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Original position"), slot (*this, &Editor::naturalize))); + items.push_back (MenuElem (_("Original position"), mem_fun(*this, &Editor::naturalize))); items.push_back (SeparatorElem()); if (ar) { - items.push_back (MenuElem (_("Toggle envelope visibility"), slot (*this, &Editor::toggle_gain_envelope_visibility))); - items.push_back (MenuElem (_("Toggle envelope active"), slot (*this, &Editor::toggle_gain_envelope_active))); + items.push_back (MenuElem (_("Toggle envelope visibility"), mem_fun(*this, &Editor::toggle_gain_envelope_visibility))); + items.push_back (MenuElem (_("Toggle envelope active"), mem_fun(*this, &Editor::toggle_gain_envelope_active))); items.push_back (SeparatorElem()); if (ar->scale_amplitude() != 1.0f) { - items.push_back (MenuElem (_("DeNormalize"), slot (*this, &Editor::denormalize_region))); + items.push_back (MenuElem (_("DeNormalize"), mem_fun(*this, &Editor::denormalize_region))); } else { - items.push_back (MenuElem (_("Normalize"), slot (*this, &Editor::normalize_region))); + items.push_back (MenuElem (_("Normalize"), mem_fun(*this, &Editor::normalize_region))); } } - items.push_back (MenuElem (_("Reverse"), slot (*this, &Editor::reverse_region))); + items.push_back (MenuElem (_("Reverse"), mem_fun(*this, &Editor::reverse_region))); items.push_back (SeparatorElem()); /* Nudge region */ @@ -2356,10 +2356,10 @@ Editor::add_region_context_items (StreamView* sv, Region* region, Menu_Helpers:: MenuList& nudge_items = nudge_menu->items(); nudge_menu->set_name ("ArdourContextMenu"); - nudge_items.push_back (MenuElem (_("Nudge fwd"), (bind (slot (*this, &Editor::nudge_forward), false)))); - nudge_items.push_back (MenuElem (_("Nudge bwd"), (bind (slot (*this, &Editor::nudge_backward), false)))); - nudge_items.push_back (MenuElem (_("Nudge fwd by capture offset"), (slot (*this, &Editor::nudge_forward_capture_offset)))); - nudge_items.push_back (MenuElem (_("Nudge bwd by capture offset"), (slot (*this, &Editor::nudge_backward_capture_offset)))); + nudge_items.push_back (MenuElem (_("Nudge fwd"), (bind (mem_fun(*this, &Editor::nudge_forward), false)))); + nudge_items.push_back (MenuElem (_("Nudge bwd"), (bind (mem_fun(*this, &Editor::nudge_backward), false)))); + nudge_items.push_back (MenuElem (_("Nudge fwd by capture offset"), (mem_fun(*this, &Editor::nudge_forward_capture_offset)))); + nudge_items.push_back (MenuElem (_("Nudge bwd by capture offset"), (mem_fun(*this, &Editor::nudge_backward_capture_offset)))); items.push_back (MenuElem (_("Nudge"), *nudge_menu)); items.push_back (SeparatorElem()); @@ -2368,24 +2368,24 @@ Editor::add_region_context_items (StreamView* sv, Region* region, Menu_Helpers:: MenuList& trim_items = trim_menu->items(); trim_menu->set_name ("ArdourContextMenu"); - trim_items.push_back (MenuElem (_("Start to edit cursor"), slot (*this, &Editor::trim_region_from_edit_cursor))); - trim_items.push_back (MenuElem (_("Edit cursor to end"), slot (*this, &Editor::trim_region_to_edit_cursor))); + trim_items.push_back (MenuElem (_("Start to edit cursor"), mem_fun(*this, &Editor::trim_region_from_edit_cursor))); + trim_items.push_back (MenuElem (_("Edit cursor to end"), mem_fun(*this, &Editor::trim_region_to_edit_cursor))); items.push_back (MenuElem (_("Trim"), *trim_menu)); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Split"), (slot (*this, &Editor::split_region)))); + items.push_back (MenuElem (_("Split"), (mem_fun(*this, &Editor::split_region)))); region_edit_menu_split_item = items.back(); - items.push_back (MenuElem (_("Make mono regions"), (slot (*this, &Editor::split_multichannel_region)))); + items.push_back (MenuElem (_("Make mono regions"), (mem_fun(*this, &Editor::split_multichannel_region)))); region_edit_menu_split_multichannel_item = items.back(); - items.push_back (MenuElem (_("Duplicate"), (bind (slot (*this, &Editor::duplicate_dialog), true)))); - items.push_back (MenuElem (_("Fill Track"), (slot (*this, &Editor::region_fill_track)))); + 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)))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Remove"), slot (*this, &Editor::remove_clicked_region))); + items.push_back (MenuElem (_("Remove"), mem_fun(*this, &Editor::remove_clicked_region))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Destroy"), slot (*this, &Editor::destroy_clicked_region))); + items.push_back (MenuElem (_("Destroy"), mem_fun(*this, &Editor::destroy_clicked_region))); /* OK, stick the region submenu at the top of the list, and then add the standard items. @@ -2415,21 +2415,21 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items) MenuList& items = selection_menu->items(); selection_menu->set_name ("ArdourContextMenu"); - items.push_back (MenuElem (_("Play range"), slot (*this, &Editor::play_selection))); - items.push_back (MenuElem (_("Loop range"), slot (*this, &Editor::set_route_loop_selection))); + items.push_back (MenuElem (_("Play range"), mem_fun(*this, &Editor::play_selection))); + items.push_back (MenuElem (_("Loop range"), mem_fun(*this, &Editor::set_route_loop_selection))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Create chunk from range"), slot (*this, &Editor::name_selection))); + items.push_back (MenuElem (_("Create chunk from range"), mem_fun(*this, &Editor::name_selection))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Create Region"), slot (*this, &Editor::new_region_from_selection))); - items.push_back (MenuElem (_("Separate Region"), slot (*this, &Editor::separate_region_from_selection))); - items.push_back (MenuElem (_("Crop Region to range"), slot (*this, &Editor::crop_region_to_selection))); - items.push_back (MenuElem (_("Bounce range"), slot (*this, &Editor::bounce_range_selection))); + items.push_back (MenuElem (_("Create Region"), mem_fun(*this, &Editor::new_region_from_selection))); + items.push_back (MenuElem (_("Separate Region"), mem_fun(*this, &Editor::separate_region_from_selection))); + items.push_back (MenuElem (_("Crop Region to range"), mem_fun(*this, &Editor::crop_region_to_selection))); + items.push_back (MenuElem (_("Bounce range"), mem_fun(*this, &Editor::bounce_range_selection))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Duplicate"), bind (slot (*this, &Editor::duplicate_dialog), false))); + items.push_back (MenuElem (_("Duplicate"), bind (mem_fun(*this, &Editor::duplicate_dialog), false))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Export"), slot (*this, &Editor::export_selection))); + items.push_back (MenuElem (_("Export"), mem_fun(*this, &Editor::export_selection))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Fill range w/Region"), slot (*this, &Editor::region_fill_selection))); + items.push_back (MenuElem (_("Fill range w/Region"), mem_fun(*this, &Editor::region_fill_selection))); edit_items.push_back (MenuElem (_("Range"), *selection_menu)); edit_items.push_back (SeparatorElem()); @@ -2447,10 +2447,10 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items) play_menu->set_name ("ArdourContextMenu"); play_items.push_back (MenuElem (_("Play from edit cursor"))); - play_items.push_back (MenuElem (_("Play from start"), slot (*this, &Editor::play_from_start))); - play_items.push_back (MenuElem (_("Play region"), slot (*this, &Editor::play_selected_region))); + play_items.push_back (MenuElem (_("Play from start"), mem_fun(*this, &Editor::play_from_start))); + play_items.push_back (MenuElem (_("Play region"), mem_fun(*this, &Editor::play_selected_region))); play_items.push_back (SeparatorElem()); - play_items.push_back (MenuElem (_("Loop Region"), slot (*this, &Editor::loop_selected_region))); + play_items.push_back (MenuElem (_("Loop Region"), mem_fun(*this, &Editor::loop_selected_region))); edit_items.push_back (MenuElem (_("Play"), *play_menu)); @@ -2460,13 +2460,13 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items) MenuList& select_items = select_menu->items(); select_menu->set_name ("ArdourContextMenu"); - select_items.push_back (MenuElem (_("Select All in track"), bind (slot (*this, &Editor::select_all_in_track), false))); - select_items.push_back (MenuElem (_("Select All"), bind (slot (*this, &Editor::select_all), false))); - select_items.push_back (MenuElem (_("Invert in track"), slot (*this, &Editor::invert_selection_in_track))); - select_items.push_back (MenuElem (_("Invert"), slot (*this, &Editor::invert_selection))); + select_items.push_back (MenuElem (_("Select All in track"), bind (mem_fun(*this, &Editor::select_all_in_track), false))); + select_items.push_back (MenuElem (_("Select All"), bind (mem_fun(*this, &Editor::select_all), false))); + select_items.push_back (MenuElem (_("Invert in track"), mem_fun(*this, &Editor::invert_selection_in_track))); + select_items.push_back (MenuElem (_("Invert"), mem_fun(*this, &Editor::invert_selection))); select_items.push_back (SeparatorElem()); - select_items.push_back (MenuElem (_("Select loop range"), slot (*this, &Editor::set_selection_from_loop))); - select_items.push_back (MenuElem (_("Select punch range"), slot (*this, &Editor::set_selection_from_punch))); + select_items.push_back (MenuElem (_("Select loop range"), mem_fun(*this, &Editor::set_selection_from_loop))); + select_items.push_back (MenuElem (_("Select punch range"), mem_fun(*this, &Editor::set_selection_from_punch))); select_items.push_back (SeparatorElem()); edit_items.push_back (MenuElem (_("Select"), *select_menu)); @@ -2477,24 +2477,24 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items) MenuList& cutnpaste_items = cutnpaste_menu->items(); cutnpaste_menu->set_name ("ArdourContextMenu"); - cutnpaste_items.push_back (MenuElem (_("Cut"), slot (*this, &Editor::cut))); - cutnpaste_items.push_back (MenuElem (_("Copy"), slot (*this, &Editor::copy))); - cutnpaste_items.push_back (MenuElem (_("Paste at edit cursor"), bind (slot (*this, &Editor::paste), 1.0f))); - cutnpaste_items.push_back (MenuElem (_("Paste at mouse"), slot (*this, &Editor::mouse_paste))); + cutnpaste_items.push_back (MenuElem (_("Cut"), mem_fun(*this, &Editor::cut))); + cutnpaste_items.push_back (MenuElem (_("Copy"), mem_fun(*this, &Editor::copy))); + cutnpaste_items.push_back (MenuElem (_("Paste at edit cursor"), bind (mem_fun(*this, &Editor::paste), 1.0f))); + cutnpaste_items.push_back (MenuElem (_("Paste at mouse"), mem_fun(*this, &Editor::mouse_paste))); cutnpaste_items.push_back (SeparatorElem()); - cutnpaste_items.push_back (MenuElem (_("Align"), bind (slot (*this, &Editor::align), ARDOUR::SyncPoint))); - cutnpaste_items.push_back (MenuElem (_("Align Relative"), bind (slot (*this, &Editor::align_relative), ARDOUR::SyncPoint))); + cutnpaste_items.push_back (MenuElem (_("Align"), bind (mem_fun(*this, &Editor::align), ARDOUR::SyncPoint))); + cutnpaste_items.push_back (MenuElem (_("Align Relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::SyncPoint))); cutnpaste_items.push_back (SeparatorElem()); - cutnpaste_items.push_back (MenuElem (_("Insert chunk"), bind (slot (*this, &Editor::paste_named_selection), 1.0f))); + cutnpaste_items.push_back (MenuElem (_("Insert chunk"), bind (mem_fun(*this, &Editor::paste_named_selection), 1.0f))); cutnpaste_items.push_back (SeparatorElem()); - cutnpaste_items.push_back (MenuElem (_("New Region from range"), slot (*this, &Editor::new_region_from_selection))); - cutnpaste_items.push_back (MenuElem (_("Separate Range"), slot (*this, &Editor::separate_region_from_selection))); + cutnpaste_items.push_back (MenuElem (_("New Region from range"), mem_fun(*this, &Editor::new_region_from_selection))); + cutnpaste_items.push_back (MenuElem (_("Separate Range"), mem_fun(*this, &Editor::separate_region_from_selection))); edit_items.push_back (MenuElem (_("Edit"), *cutnpaste_menu)); @@ -2504,8 +2504,8 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items) MenuList& import_items = import_menu->items(); import_menu->set_name ("ArdourContextMenu"); - import_items.push_back (MenuElem (_("Insert Region"), bind (slot (*this, &Editor::insert_region_list_selection), 1.0f))); - import_items.push_back (MenuElem (_("Insert external sndfile"), bind (slot (*this, &Editor::insert_sndfile), false))); + import_items.push_back (MenuElem (_("Insert Region"), bind (mem_fun(*this, &Editor::insert_region_list_selection), 1.0f))); + import_items.push_back (MenuElem (_("Insert external sndfile"), bind (mem_fun(*this, &Editor::insert_sndfile), false))); edit_items.push_back (MenuElem (_("Import"), *import_menu)); @@ -2516,10 +2516,10 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items) nudge_menu->set_name ("ArdourContextMenu"); edit_items.push_back (SeparatorElem()); - nudge_items.push_back (MenuElem (_("Nudge entire track fwd"), (bind (slot (*this, &Editor::nudge_track), false, true)))); - nudge_items.push_back (MenuElem (_("Nudge track after edit cursor fwd"), (bind (slot (*this, &Editor::nudge_track), true, true)))); - nudge_items.push_back (MenuElem (_("Nudge entire track bwd"), (bind (slot (*this, &Editor::nudge_track), false, false)))); - nudge_items.push_back (MenuElem (_("Nudge track after edit cursor bwd"), (bind (slot (*this, &Editor::nudge_track), true, false)))); + nudge_items.push_back (MenuElem (_("Nudge entire track fwd"), (bind (mem_fun(*this, &Editor::nudge_track), false, true)))); + nudge_items.push_back (MenuElem (_("Nudge track after edit cursor fwd"), (bind (mem_fun(*this, &Editor::nudge_track), true, true)))); + nudge_items.push_back (MenuElem (_("Nudge entire track bwd"), (bind (mem_fun(*this, &Editor::nudge_track), false, false)))); + nudge_items.push_back (MenuElem (_("Nudge track after edit cursor bwd"), (bind (mem_fun(*this, &Editor::nudge_track), true, false)))); edit_items.push_back (MenuElem (_("Nudge"), *nudge_menu)); } @@ -2536,7 +2536,7 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items) play_menu->set_name ("ArdourContextMenu"); play_items.push_back (MenuElem (_("Play from edit cursor"))); - play_items.push_back (MenuElem (_("Play from start"), slot (*this, &Editor::play_from_start))); + play_items.push_back (MenuElem (_("Play from start"), mem_fun(*this, &Editor::play_from_start))); edit_items.push_back (MenuElem (_("Play"), *play_menu)); /* Selection */ @@ -2545,13 +2545,13 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items) MenuList& select_items = select_menu->items(); select_menu->set_name ("ArdourContextMenu"); - select_items.push_back (MenuElem (_("Select All in track"), bind (slot (*this, &Editor::select_all_in_track), false))); - select_items.push_back (MenuElem (_("Select All"), bind (slot (*this, &Editor::select_all), false))); - select_items.push_back (MenuElem (_("Invert in track"), slot (*this, &Editor::invert_selection_in_track))); - select_items.push_back (MenuElem (_("Invert"), slot (*this, &Editor::invert_selection))); + select_items.push_back (MenuElem (_("Select All in track"), bind (mem_fun(*this, &Editor::select_all_in_track), false))); + select_items.push_back (MenuElem (_("Select All"), bind (mem_fun(*this, &Editor::select_all), false))); + select_items.push_back (MenuElem (_("Invert in track"), mem_fun(*this, &Editor::invert_selection_in_track))); + select_items.push_back (MenuElem (_("Invert"), mem_fun(*this, &Editor::invert_selection))); select_items.push_back (SeparatorElem()); - select_items.push_back (MenuElem (_("Select loop range"), slot (*this, &Editor::set_selection_from_loop))); - select_items.push_back (MenuElem (_("Select punch range"), slot (*this, &Editor::set_selection_from_punch))); + select_items.push_back (MenuElem (_("Select loop range"), mem_fun(*this, &Editor::set_selection_from_loop))); + select_items.push_back (MenuElem (_("Select punch range"), mem_fun(*this, &Editor::set_selection_from_punch))); select_items.push_back (SeparatorElem()); edit_items.push_back (MenuElem (_("Select"), *select_menu)); @@ -2562,19 +2562,19 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items) MenuList& cutnpaste_items = cutnpaste_menu->items(); cutnpaste_menu->set_name ("ArdourContextMenu"); - cutnpaste_items.push_back (MenuElem (_("Cut"), slot (*this, &Editor::cut))); - cutnpaste_items.push_back (MenuElem (_("Copy"), slot (*this, &Editor::copy))); - cutnpaste_items.push_back (MenuElem (_("Paste"), bind (slot (*this, &Editor::paste), 1.0f))); + cutnpaste_items.push_back (MenuElem (_("Cut"), mem_fun(*this, &Editor::cut))); + cutnpaste_items.push_back (MenuElem (_("Copy"), mem_fun(*this, &Editor::copy))); + cutnpaste_items.push_back (MenuElem (_("Paste"), bind (mem_fun(*this, &Editor::paste), 1.0f))); Menu *nudge_menu = manage (new Menu()); MenuList& nudge_items = nudge_menu->items(); nudge_menu->set_name ("ArdourContextMenu"); edit_items.push_back (SeparatorElem()); - nudge_items.push_back (MenuElem (_("Nudge entire track fwd"), (bind (slot (*this, &Editor::nudge_track), false, true)))); - nudge_items.push_back (MenuElem (_("Nudge track after edit cursor fwd"), (bind (slot (*this, &Editor::nudge_track), true, true)))); - nudge_items.push_back (MenuElem (_("Nudge entire track bwd"), (bind (slot (*this, &Editor::nudge_track), false, false)))); - nudge_items.push_back (MenuElem (_("Nudge track after edit cursor bwd"), (bind (slot (*this, &Editor::nudge_track), true, false)))); + nudge_items.push_back (MenuElem (_("Nudge entire track fwd"), (bind (mem_fun(*this, &Editor::nudge_track), false, true)))); + nudge_items.push_back (MenuElem (_("Nudge track after edit cursor fwd"), (bind (mem_fun(*this, &Editor::nudge_track), true, true)))); + nudge_items.push_back (MenuElem (_("Nudge entire track bwd"), (bind (mem_fun(*this, &Editor::nudge_track), false, false)))); + nudge_items.push_back (MenuElem (_("Nudge track after edit cursor bwd"), (bind (mem_fun(*this, &Editor::nudge_track), true, false)))); edit_items.push_back (MenuElem (_("Nudge"), *nudge_menu)); } @@ -3069,9 +3069,9 @@ Editor::setup_toolbar () mouse_mode_tearoff = manage (new TearOff (mouse_mode_button_table)); mouse_mode_tearoff->set_name ("MouseModeBase"); - mouse_mode_tearoff->Detach.connect (bind (slot (*this, &Editor::detach_tearoff), static_cast(&toolbar_hbox), + mouse_mode_tearoff->Detach.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast(&toolbar_hbox), static_cast(&mouse_mode_button_table))); - mouse_mode_tearoff->Attach.connect (bind (slot (*this, &Editor::reattach_tearoff), static_cast (&toolbar_hbox), + mouse_mode_tearoff->Attach.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast (&toolbar_hbox), static_cast (&mouse_mode_button_table), 1)); mouse_move_button.set_name ("MouseModeButton"); @@ -3095,14 +3095,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 (slot (*this, &Editor::mouse_mode_toggled), Editing::MouseRange)); - mouse_select_button.button_release_event.connect (slot (*this, &Editor::mouse_select_button_release)); + mouse_select_button.toggled.connect (bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange)); + mouse_select_button.button_release_event.connect (mem_fun(*this, &Editor::mouse_select_button_release)); - mouse_move_button.toggled.connect (bind (slot (*this, &Editor::mouse_mode_toggled), Editing::MouseObject)); - mouse_gain_button.toggled.connect (bind (slot (*this, &Editor::mouse_mode_toggled), Editing::MouseGain)); - mouse_zoom_button.toggled.connect (bind (slot (*this, &Editor::mouse_mode_toggled), Editing::MouseZoom)); - mouse_timefx_button.toggled.connect (bind (slot (*this, &Editor::mouse_mode_toggled), Editing::MouseTimeFX)); - mouse_audition_button.toggled.connect (bind (slot (*this, &Editor::mouse_mode_toggled), Editing::MouseAudition)); + 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.set_active (true); @@ -3136,7 +3136,7 @@ Editor::setup_toolbar () edit_mode_box.pack_start (edit_mode_label, false, false); edit_mode_box.pack_start (edit_mode_selector, false, false); - edit_mode_selector.get_popwin()->unmap_event.connect (slot (*this, &Editor::edit_mode_selection_done)); + edit_mode_selector.get_popwin()->unmap_event.connect (mem_fun(*this, &Editor::edit_mode_selection_done)); /* Snap Type */ @@ -3159,7 +3159,7 @@ Editor::setup_toolbar () snap_type_box.pack_start (snap_type_label, false, false); snap_type_box.pack_start (snap_type_selector, false, false); - snap_type_selector.get_popwin()->unmap_event.connect (slot (*this, &Editor::snap_type_selection_done)); + snap_type_selector.get_popwin()->unmap_event.connect (mem_fun(*this, &Editor::snap_type_selection_done)); /* Snap mode, not snap type */ @@ -3179,7 +3179,7 @@ Editor::setup_toolbar () snap_mode_box.pack_start (snap_mode_label, false, false); snap_mode_box.pack_start (snap_mode_selector, false, false); - snap_mode_selector.get_popwin()->unmap_event.connect (slot (*this, &Editor::snap_mode_selection_done)); + snap_mode_selector.get_popwin()->unmap_event.connect (mem_fun(*this, &Editor::snap_mode_selection_done)); /* Zoom focus mode */ @@ -3201,7 +3201,7 @@ Editor::setup_toolbar () zoom_focus_box.pack_start (zoom_focus_label, false, false); zoom_focus_box.pack_start (zoom_focus_selector, false, false); - zoom_focus_selector.get_popwin()->unmap_event.connect (slot (*this, &Editor::zoom_focus_selection_done)); + zoom_focus_selector.get_popwin()->unmap_event.connect (mem_fun(*this, &Editor::zoom_focus_selection_done)); /* selection/cursor clocks */ @@ -3251,8 +3251,8 @@ Editor::setup_toolbar () HBox *nbox = manage (new HBox); - nudge_forward_button.signal_clicked().connect (bind (slot (*this, &Editor::nudge_forward), false)); - nudge_backward_button.signal_clicked().connect (bind (slot (*this, &Editor::nudge_backward), false)); + nudge_forward_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::nudge_forward), false)); + nudge_backward_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::nudge_backward), false)); nbox->pack_start (nudge_backward_button, false, false); nbox->pack_start (nudge_forward_button, false, false); @@ -3270,9 +3270,9 @@ Editor::setup_toolbar () tools_tearoff = new TearOff (*hbox); tools_tearoff->set_name ("MouseModeBase"); - tools_tearoff->Detach.connect (bind (slot (*this, &Editor::detach_tearoff), static_cast(&toolbar_hbox), + tools_tearoff->Detach.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast(&toolbar_hbox), static_cast(hbox))); - tools_tearoff->Attach.connect (bind (slot (*this, &Editor::reattach_tearoff), static_cast (&toolbar_hbox), + tools_tearoff->Attach.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast (&toolbar_hbox), static_cast (hbox), 0)); toolbar_hbox.set_spacing (8); @@ -3521,7 +3521,7 @@ Editor::new_tempo_section () void Editor::map_transport_state () { - ENSURE_GUI_THREAD (slot (*this, &Editor::map_transport_state)); + ENSURE_GUI_THREAD (mem_fun(*this, &Editor::map_transport_state)); if (session->transport_stopped()) { have_pending_keyboard_selection = false; @@ -3869,7 +3869,7 @@ void Editor::set_edit_menu (Menu& menu) { edit_menu = &menu; - edit_menu->map_.connect (slot (*this, &Editor::edit_menu_map_handler)); + edit_menu->map_.connect (mem_fun(*this, &Editor::edit_menu_map_handler)); } void @@ -3893,7 +3893,7 @@ Editor::edit_menu_map_handler () label = compose(_("Undo (%1)"), session->next_undo()); } - edit_items.push_back (MenuElem (label, bind (slot (*this, &Editor::undo), 1U))); + edit_items.push_back (MenuElem (label, bind (mem_fun(*this, &Editor::undo), 1U))); if (session->undo_depth() == 0) { edit_items.back()->set_sensitive (false); @@ -3905,7 +3905,7 @@ Editor::edit_menu_map_handler () label = compose(_("Redo (%1)"), session->next_redo()); } - edit_items.push_back (MenuElem (label, bind (slot (*this, &Editor::redo), 1U))); + edit_items.push_back (MenuElem (label, bind (mem_fun(*this, &Editor::redo), 1U))); if (session->redo_depth() == 0) { edit_items.back()->set_sensitive (false); } @@ -3913,16 +3913,16 @@ Editor::edit_menu_map_handler () vector mitems; edit_items.push_back (SeparatorElem()); - edit_items.push_back (MenuElem (_("Cut"), slot (*this, &Editor::cut))); + edit_items.push_back (MenuElem (_("Cut"), mem_fun(*this, &Editor::cut))); mitems.push_back (edit_items.back()); - edit_items.push_back (MenuElem (_("Copy"), slot (*this, &Editor::copy))); + edit_items.push_back (MenuElem (_("Copy"), mem_fun(*this, &Editor::copy))); mitems.push_back (edit_items.back()); - edit_items.push_back (MenuElem (_("Paste"), bind (slot (*this, &Editor::paste), 1.0f))); + edit_items.push_back (MenuElem (_("Paste"), bind (mem_fun(*this, &Editor::paste), 1.0f))); mitems.push_back (edit_items.back()); edit_items.push_back (SeparatorElem()); - edit_items.push_back (MenuElem (_("Align"), bind (slot (*this, &Editor::align), ARDOUR::SyncPoint))); + edit_items.push_back (MenuElem (_("Align"), bind (mem_fun(*this, &Editor::align), ARDOUR::SyncPoint))); mitems.push_back (edit_items.back()); - edit_items.push_back (MenuElem (_("Align Relative"), bind (slot (*this, &Editor::align_relative), ARDOUR::SyncPoint))); + edit_items.push_back (MenuElem (_("Align Relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::SyncPoint))); mitems.push_back (edit_items.back()); edit_items.push_back (SeparatorElem()); @@ -3936,21 +3936,21 @@ Editor::edit_menu_map_handler () import_menu->set_name ("ArdourContextMenu"); MenuList& import_items = import_menu->items(); - import_items.push_back (MenuElem (_("... as new track"), bind (slot (*this, &Editor::import_audio), true))); - import_items.push_back (MenuElem (_("... as new region"), bind (slot (*this, &Editor::import_audio), false))); + import_items.push_back (MenuElem (_("... as new track"), bind (mem_fun(*this, &Editor::import_audio), true))); + import_items.push_back (MenuElem (_("... as new region"), bind (mem_fun(*this, &Editor::import_audio), false))); Menu* embed_menu = manage (new Menu()); embed_menu->set_name ("ArdourContextMenu"); MenuList& embed_items = embed_menu->items(); - embed_items.push_back (MenuElem (_("... as new track"), bind (slot (*this, &Editor::insert_sndfile), true))); - embed_items.push_back (MenuElem (_("... as new region"), slot (*this, &Editor::embed_audio))); + embed_items.push_back (MenuElem (_("... as new track"), bind (mem_fun(*this, &Editor::insert_sndfile), true))); + embed_items.push_back (MenuElem (_("... as new region"), mem_fun(*this, &Editor::embed_audio))); edit_items.push_back (MenuElem (_("Import audio (copy)"), *import_menu)); edit_items.push_back (MenuElem (_("Embed audio (link)"), *embed_menu)); edit_items.push_back (SeparatorElem()); - edit_items.push_back (MenuElem (_("Remove last capture"), slot (*this, &Editor::remove_last_capture))); + 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); } @@ -4539,7 +4539,7 @@ Editor::get_nudge_distance (jack_nframes_t pos, jack_nframes_t& next) void Editor::end_location_changed (Location* location) { - ENSURE_GUI_THREAD (bind (slot (*this, &Editor::end_location_changed), location)); + ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::end_location_changed), location)); track_canvas_scroller.get_hadjustment()->set_upper (location->end() / frames_per_unit); } diff --git a/gtk2_ardour/editor_edit_groups.cc b/gtk2_ardour/editor_edit_groups.cc index 660f7313f5..48f1b13c1c 100644 --- a/gtk2_ardour/editor_edit_groups.cc +++ b/gtk2_ardour/editor_edit_groups.cc @@ -59,8 +59,8 @@ Editor::build_edit_group_list_menu () edit_group_list_menu->set_name ("ArdourContextMenu"); MenuList& items = edit_group_list_menu->items(); - items.push_back (MenuElem (_("Show All"), slot (*this, &Editor::select_all_edit_groups))); - items.push_back (MenuElem (_("Hide All"), slot (*this, &Editor::unselect_all_edit_groups))); + items.push_back (MenuElem (_("Show All"), mem_fun(*this, &Editor::select_all_edit_groups))); + items.push_back (MenuElem (_("Hide All"), mem_fun(*this, &Editor::unselect_all_edit_groups))); } void @@ -189,7 +189,7 @@ Editor::add_edit_group (RouteGroup* group) edit_group_list.rows().back().set_data (group); edit_group_list.rows().back().select(); - group->FlagsChanged.connect (bind (slot (*this, &Editor::group_flags_changed), group)); + group->FlagsChanged.connect (bind (mem_fun(*this, &Editor::group_flags_changed), group)); } void diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc index 2ffbbadb5c..1114995cc5 100644 --- a/gtk2_ardour/editor_export_audio.cc +++ b/gtk2_ardour/editor_export_audio.cc @@ -103,10 +103,10 @@ Editor::write_a_region () FileSelection file_selector; - file_selector.get_selection_entry()->activate.connect (bind (slot (*this, &Editor::finish_sub_event_loop), 1)); - file_selector.get_cancel_button()-.signal_clicked().connect (bind (slot (*this, &Editor::finish_sub_event_loop), -1)); - file_selector.get_ok_button()-.signal_clicked().connect (bind (slot (*this, &Editor::finish_sub_event_loop), 1)); - file_selector.delete_event.connect (bind (slot (*this, &Editor::finish_sub_event_loop_on_delete), -1)); + file_selector.get_selection_entry()->activate.connect (bind (mem_fun(*this, &Editor::finish_sub_event_loop), 1)); + file_selector.get_cancel_button()-.signal_clicked().connect (bind (mem_fun(*this, &Editor::finish_sub_event_loop), -1)); + file_selector.get_ok_button()-.signal_clicked().connect (bind (mem_fun(*this, &Editor::finish_sub_event_loop), 1)); + file_selector.delete_event.connect (bind (mem_fun(*this, &Editor::finish_sub_event_loop_on_delete), -1)); file_selector.show_all(); diff --git a/gtk2_ardour/editor_imageframe.cc b/gtk2_ardour/editor_imageframe.cc index 99b3d4aa08..62785036ab 100644 --- a/gtk2_ardour/editor_imageframe.cc +++ b/gtk2_ardour/editor_imageframe.cc @@ -32,7 +32,7 @@ Editor::add_imageframe_time_axis(std::string track_name, void* src) } else { - Gtkmm2ext::UI::instance()->call_slot(bind(slot(*this, &Editor::handle_new_imageframe_time_axis_view),track_name, src)) ; + Gtkmm2ext::UI::instance()->call_slot(bind(mem_fun(*this, &Editor::handle_new_imageframe_time_axis_view),track_name, src)) ; } } @@ -90,7 +90,7 @@ Editor::add_imageframe_marker_time_axis(std::string track_name, TimeAxisView* ma // Can we only bind 2 data Items? // @todo we really want to bind the src attribute too, for the moment tracks can only be added remotely, // so this is not too much of an issue, however will need to be looked at again - Gtkmm2ext::UI::instance()->call_slot(SigC::bind(slot(*this, &Editor::handle_new_imageframe_marker_time_axis_view),track_name, marked_track)) ; + Gtkmm2ext::UI::instance()->call_slot(sigc::bind(mem_fun(*this, &Editor::handle_new_imageframe_marker_time_axis_view),track_name, marked_track)) ; } void @@ -1157,8 +1157,8 @@ Editor::handle_new_imageframe_time_axis_view(std::string track_name, void* src) route_list.rows().push_back(rowdata) ; route_list.rows().back().set_data(iftav) ; route_list.rows().back().select() ; - iftav->GoingAway.connect(bind(slot(*this, &Editor::remove_route), (TimeAxisView*)iftav)) ; - iftav->gui_changed.connect(slot(*this, &Editor::handle_gui_changes)) ; + iftav->GoingAway.connect(bind(mem_fun(*this, &Editor::remove_route), (TimeAxisView*)iftav)) ; + iftav->gui_changed.connect(mem_fun(*this, &Editor::handle_gui_changes)) ; } void @@ -1172,7 +1172,7 @@ Editor::handle_new_imageframe_marker_time_axis_view(std::string track_name, Time route_list.rows().push_back(rowdata) ; route_list.rows().back().set_data (mta) ; route_list.rows().back().select() ; - mta->GoingAway.connect(bind(slot (*this, &Editor::remove_route), (TimeAxisView*)mta)) ; + mta->GoingAway.connect(bind(mem_fun(*this, &Editor::remove_route), (TimeAxisView*)mta)) ; } diff --git a/gtk2_ardour/editor_keyboard.cc b/gtk2_ardour/editor_keyboard.cc index 8fb0e64235..36337f55ea 100644 --- a/gtk2_ardour/editor_keyboard.cc +++ b/gtk2_ardour/editor_keyboard.cc @@ -25,7 +25,7 @@ #include "selection.h" void -Editor::kbd_driver (SigC::Slot1 theslot, bool use_track_canvas, bool use_time_canvas, bool can_select) +Editor::kbd_driver (sigc::slot theslot, bool use_track_canvas, bool use_time_canvas, bool can_select) { gint x, y; double dx, dy; @@ -63,13 +63,13 @@ Editor::kbd_driver (SigC::Slot1 theslot, bool use_track_canvas, void Editor::kbd_set_playhead_cursor () { - kbd_driver (slot (*this, &Editor::set_playhead_cursor), true, true, false); + kbd_driver (mem_fun(*this, &Editor::set_playhead_cursor), true, true, false); } void Editor::kbd_set_edit_cursor () { - kbd_driver (slot (*this, &Editor::set_edit_cursor), true, true, false); + kbd_driver (mem_fun(*this, &Editor::set_edit_cursor), true, true, false); } @@ -92,7 +92,7 @@ Editor::kbd_do_split (GdkEvent* ev) void Editor::kbd_split () { - kbd_driver (slot (*this, &Editor::kbd_do_split), true, true, false); + kbd_driver (mem_fun(*this, &Editor::kbd_do_split), true, true, false); } void @@ -104,7 +104,7 @@ Editor::kbd_do_align (GdkEvent* ev, ARDOUR::RegionPoint what) void Editor::kbd_align (ARDOUR::RegionPoint what) { - kbd_driver (bind (slot (*this, &Editor::kbd_do_align), what)); + kbd_driver (bind (mem_fun(*this, &Editor::kbd_do_align), what)); } void @@ -116,7 +116,7 @@ Editor::kbd_do_align_relative (GdkEvent* ev, ARDOUR::RegionPoint what) void Editor::kbd_align_relative (ARDOUR::RegionPoint what) { - kbd_driver (bind (slot (*this, &Editor::kbd_do_align), what), true, true, false); + kbd_driver (bind (mem_fun(*this, &Editor::kbd_do_align), what), true, true, false); } void @@ -128,7 +128,7 @@ Editor::kbd_do_brush (GdkEvent *ev) void Editor::kbd_brush () { - kbd_driver (slot (*this, &Editor::kbd_do_brush), true, true, false); + kbd_driver (mem_fun(*this, &Editor::kbd_do_brush), true, true, false); } void @@ -140,5 +140,5 @@ Editor::kbd_do_audition (GdkEvent *ignored) void Editor::kbd_audition () { - kbd_driver (slot (*this, &Editor::kbd_do_audition), true, false, true); + kbd_driver (mem_fun(*this, &Editor::kbd_do_audition), true, false, true); } diff --git a/gtk2_ardour/editor_keys.cc b/gtk2_ardour/editor_keys.cc index 81a855d663..b0a97f5093 100644 --- a/gtk2_ardour/editor_keys.cc +++ b/gtk2_ardour/editor_keys.cc @@ -46,138 +46,138 @@ Editor::install_keybindings () { /* add named actions for the editor */ - add_action ("toggle-xfades-active", slot (*this, &Editor::toggle_xfades_active)); + add_action ("toggle-xfades-active", mem_fun(*this, &Editor::toggle_xfades_active)); - add_action ("playhead-to-next-region-start", bind (slot (*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (Start))); - add_action ("playhead-to-next-region-end", bind (slot (*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (End))); - add_action ("playhead-to-next-region-sync", bind (slot (*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (SyncPoint))); + 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 (slot (*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (Start))); - add_action ("playhead-to-previous-region-end", bind (slot (*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (End))); - add_action ("playhead-to-previous-region-sync", bind (slot (*this, &Editor::cursor_to_previous_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 (slot (*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (Start))); - add_action ("edit-cursor-to-next-region-end", bind (slot (*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (End))); - add_action ("edit-cursor-to-next-region-sync", bind (slot (*this, &Editor::cursor_to_next_region_point), edit_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 (slot (*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (Start))); - add_action ("edit-cursor-to-previous-region-end", bind (slot (*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (End))); - add_action ("edit-cursor-to-previous-region-sync", bind (slot (*this, &Editor::cursor_to_previous_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 (slot (*this, &Editor::cursor_to_selection_start), playhead_cursor)); - add_action ("playhead-to-range-end", bind (slot (*this, &Editor::cursor_to_selection_end), playhead_cursor)); + 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 (slot (*this, &Editor::cursor_to_selection_start), edit_cursor)); - add_action ("edit-cursor-to-range-end", bind (slot (*this, &Editor::cursor_to_selection_end), edit_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", slot (*this, &Editor::jump_forward_to_mark)); - add_action ("jump-backward-to-mark", slot (*this, &Editor::jump_backward_to_mark)); - add_action ("add-location-from-playhead", slot (*this, &Editor::add_location_from_playhead_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 (slot (*this, &Editor::nudge_forward), false)); - add_action ("nudge-next-forward", bind (slot (*this, &Editor::nudge_forward), true)); - add_action ("nudge-backward", bind (slot (*this, &Editor::nudge_backward), false)); - add_action ("nudge-next-backward", bind (slot (*this, &Editor::nudge_backward), true)); + 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 (slot (*this, &Editor::toggle_playback), false)); - add_action ("toggle-playback-forget-capture", bind (slot (*this, &Editor::toggle_playback), 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", slot (*this, &Editor::toggle_loop_playback)); + add_action ("toggle-loop-playback", mem_fun(*this, &Editor::toggle_loop_playback)); - add_action ("temporal-zoom-out", bind (slot (*this, &Editor::temporal_zoom_step), true)); - add_action ("temporal-zoom-in", bind (slot (*this, &Editor::temporal_zoom_step), false)); - add_action ("zoom-to-session", slot (*this, &Editor::temporal_zoom_session)); - - add_action ("scroll-tracks-up", slot (*this, &Editor::scroll_tracks_up)); - add_action ("scroll-tracks-down", slot (*this, &Editor::scroll_tracks_down)); - add_action ("step-tracks-up", slot (*this, &Editor::scroll_tracks_up_line)); - add_action ("step-tracks-down", slot (*this, &Editor::scroll_tracks_down_line)); - - add_action ("scroll-backward", bind (slot (*this, &Editor::scroll_backward), 0.8f)); - add_action ("scroll-forward", bind (slot (*this, &Editor::scroll_forward), 0.8f)); - add_action ("goto", slot (*this, &Editor::goto_frame)); - add_action ("center-playhead", slot (*this, &Editor::center_playhead)); - add_action ("center-edit_cursor", slot (*this, &Editor::center_edit_cursor)); - add_action ("playhead-forward", slot (*this, &Editor::playhead_forward)); - add_action ("playhead-backward", slot (*this, &Editor::playhead_backward)); - add_action ("playhead-to-edit", bind (slot (*this, &Editor::cursor_align), true)); - add_action ("edit-to-playhead", bind (slot (*this, &Editor::cursor_align), false)); - - add_action ("align-regions-start", bind (slot (*this, &Editor::align), ARDOUR::Start)); - add_action ("align-regions-start-relative", bind (slot (*this, &Editor::align_relative), ARDOUR::Start)); - add_action ("align-regions-end", bind (slot (*this, &Editor::align), ARDOUR::End)); - add_action ("align-regions-end-relative", bind (slot (*this, &Editor::align_relative), ARDOUR::End)); - add_action ("align-regions-sync", bind (slot (*this, &Editor::align), ARDOUR::SyncPoint)); - add_action ("align-regions-sync-relative", bind (slot (*this, &Editor::align_relative), ARDOUR::SyncPoint)); + 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", slot (*this, &Editor::kbd_set_playhead_cursor)); - add_action ("set-edit-cursor", slot (*this, &Editor::kbd_set_edit_cursor)); - - add_action ("set-mouse-mode-object", bind (slot (*this, &Editor::set_mouse_mode), Editing::MouseObject, false)); - add_action ("set-mouse-mode-range", bind (slot (*this, &Editor::set_mouse_mode), Editing::MouseRange, false)); - add_action ("set-mouse-mode-gain", bind (slot (*this, &Editor::set_mouse_mode), Editing::MouseGain, false)); - add_action ("set-mouse-mode-zoom", bind (slot (*this, &Editor::set_mouse_mode), Editing::MouseZoom, false)); - add_action ("set-mouse-mode-timefx", bind (slot (*this, &Editor::set_mouse_mode), Editing::MouseTimeFX, false)); - - add_action ("set-undo", bind (slot (*this, &Editor::undo), 1U)); - add_action ("set-redo", bind (slot (*this, &Editor::redo), 1U)); - - add_action ("export-session", slot (*this, &Editor::export_session)); - add_action ("export-range", slot (*this, &Editor::export_selection)); - - add_action ("editor-cut", slot (*this, &Editor::cut)); - add_action ("editor-copy", slot (*this, &Editor::copy)); - add_action ("editor-paste", slot (*this, &Editor::keyboard_paste)); - add_action ("duplicate-region", slot (*this, &Editor::keyboard_duplicate_region)); - add_action ("duplicate-range", slot (*this, &Editor::keyboard_duplicate_selection)); - add_action ("insert-region", slot (*this, &Editor::keyboard_insert_region_list_selection)); - add_action ("reverse-region", slot (*this, &Editor::reverse_region)); - add_action ("normalize-region", slot (*this, &Editor::normalize_region)); - add_action ("editor-crop", slot (*this, &Editor::crop_region_to_selection)); - add_action ("insert-chunk", bind (slot (*this, &Editor::paste_named_selection), 1.0f)); - - add_action ("split-at-edit-cursor", slot (*this, &Editor::split_region)); - add_action ("split-at-mouse", slot (*this, &Editor::kbd_split)); - - add_action ("brush-at-mouse", slot (*this, &Editor::kbd_brush)); - add_action ("audition-at-mouse", slot (*this, &Editor::kbd_audition)); - - add_action ("start-range", slot (*this, &Editor::keyboard_selection_begin)); - add_action ("finish-range", bind (slot (*this, &Editor::keyboard_selection_finish), false)); - add_action ("finish-add-range", bind (slot (*this, &Editor::keyboard_selection_finish), true)); - - add_action ("extend-range-to-end-of-region", bind (slot (*this, &Editor::extend_selection_to_end_of_region), false)); - add_action ("extend-range-to-start-of-region", bind (slot (*this, &Editor::extend_selection_to_start_of_region), false)); - - add_action ("zoom-focus-left", bind (slot (*this, &Editor::set_zoom_focus), Editing::ZoomFocusLeft)); - add_action ("zoom-focus-right", bind (slot (*this, &Editor::set_zoom_focus), Editing::ZoomFocusRight)); - add_action ("zoom-focus-center", bind (slot (*this, &Editor::set_zoom_focus), Editing::ZoomFocusCenter)); - add_action ("zoom-focus-playhead", bind (slot (*this, &Editor::set_zoom_focus), Editing::ZoomFocusPlayhead)); - add_action ("zoom-focus-edit", bind (slot (*this, &Editor::set_zoom_focus), Editing::ZoomFocusEdit)); - - add_action ("toggle-follow-playhead", (slot (*this, &Editor::toggle_follow_playhead))); - add_action ("remove-last-capture", (slot (*this, &Editor::remove_last_capture))); - - add_action ("snap-to-frame", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToFrame))); - add_action ("snap-to-cd-frame", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToCDFrame))); - add_action ("snap-to-smpte-frame", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToSMPTEFrame))); - add_action ("snap-to-smpte-seconds", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToSMPTESeconds))); - add_action ("snap-to-smpte-minutes", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToSMPTEMinutes))); - add_action ("snap-to-seconds", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToSeconds))); - add_action ("snap-to-minutes", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToMinutes))); - add_action ("snap-to-thirtyseconds", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToAThirtysecondBeat))); - add_action ("snap-to-asixteenthbeat", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToASixteenthBeat))); - add_action ("snap-to-eighths", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToAEighthBeat))); - add_action ("snap-to-quarters", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToAQuarterBeat))); - add_action ("snap-to-thirds", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToAThirdBeat))); - add_action ("snap-to-beat", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToBeat))); - add_action ("snap-to-bar", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToBar))); - add_action ("snap-to-mark", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToMark))); - add_action ("snap-to-edit-cursor", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToEditCursor))); - add_action ("snap-to-region-start", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToRegionStart))); - add_action ("snap-to-region-end", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToRegionEnd))); - add_action ("snap-to-region-sync", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToRegionSync))); - add_action ("snap-to-region-boundary", (bind (slot (*this, &Editor::set_snap_to), Editing::SnapToRegionBoundary))); + 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 ("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)); + + add_action ("toggle-follow-playhead", (mem_fun(*this, &Editor::toggle_follow_playhead))); + add_action ("remove-last-capture", (mem_fun(*this, &Editor::remove_last_capture))); + + 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))); } void diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index d32ccadadb..e209f56841 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -102,11 +102,11 @@ Editor::add_new_location (Location *location) lam->show (); } - location->start_changed.connect (slot (*this, &Editor::location_changed)); - location->end_changed.connect (slot (*this, &Editor::location_changed)); - location->changed.connect (slot (*this, &Editor::location_changed)); - location->name_changed.connect (slot (*this, &Editor::location_changed)); - location->FlagsChanged.connect (slot (*this, &Editor::location_flags_changed)); + location->start_changed.connect (mem_fun(*this, &Editor::location_changed)); + location->end_changed.connect (mem_fun(*this, &Editor::location_changed)); + location->changed.connect (mem_fun(*this, &Editor::location_changed)); + location->name_changed.connect (mem_fun(*this, &Editor::location_changed)); + location->FlagsChanged.connect (mem_fun(*this, &Editor::location_flags_changed)); pair newpair; @@ -119,7 +119,7 @@ Editor::add_new_location (Location *location) void Editor::location_changed (Location *location) { - ENSURE_GUI_THREAD (bind (slot (*this, &Editor::location_changed), location)); + ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::location_changed), location)); LocationMarkers *lam = find_location_markers (location); @@ -141,7 +141,7 @@ Editor::location_changed (Location *location) void Editor::location_flags_changed (Location *location, void *src) { - ENSURE_GUI_THREAD(bind (slot (*this, &Editor::location_flags_changed), location, src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::location_flags_changed), location, src)); LocationMarkers *lam = find_location_markers (location); @@ -226,7 +226,7 @@ Editor::refresh_location_display_internal (Locations::LocationList& locations) void Editor::refresh_location_display () { - ENSURE_GUI_THREAD(slot (*this, &Editor::refresh_location_display)); + ENSURE_GUI_THREAD(mem_fun(*this, &Editor::refresh_location_display)); if (session) { session->locations()->apply (*this, &Editor::refresh_location_display_internal); @@ -236,7 +236,7 @@ Editor::refresh_location_display () void Editor::refresh_location_display_s (Change ignored) { - ENSURE_GUI_THREAD(bind (slot (*this, &Editor::refresh_location_display_s), ignored)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::refresh_location_display_s), ignored)); if (session) { session->locations()->apply (*this, &Editor::refresh_location_display_internal); @@ -315,7 +315,7 @@ Editor::remove_marker (GtkCanvasItem* item, GdkEvent* event) loc->set_hidden (true, this); } else { - Gtk::Main::idle.connect (bind (slot (*this, &Editor::really_remove_marker), loc)); + Gtk::Main::idle.connect (bind (mem_fun(*this, &Editor::really_remove_marker), loc)); } } } @@ -334,7 +334,7 @@ Editor::really_remove_marker (Location* loc) void Editor::location_gone (Location *location) { - ENSURE_GUI_THREAD(bind (slot (*this, &Editor::location_gone), location)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::location_gone), location)); LocationMarkerMap::iterator i; @@ -441,17 +441,17 @@ Editor::build_marker_menu () MenuList& items = marker_menu->items(); marker_menu->set_name ("ArdourContextMenu"); - items.push_back (MenuElem (_("Locate to"), slot (*this, &Editor::marker_menu_set_playhead))); - items.push_back (MenuElem (_("Play from"), slot (*this, &Editor::marker_menu_play_from))); - items.push_back (MenuElem (_("Loop range"), slot (*this, &Editor::marker_menu_loop_range))); - items.push_back (MenuElem (_("Set from playhead"), slot (*this, &Editor::marker_menu_set_from_playhead))); - items.push_back (MenuElem (_("Set from range"), slot (*this, &Editor::marker_menu_set_from_selection))); + items.push_back (MenuElem (_("Locate to"), mem_fun(*this, &Editor::marker_menu_set_playhead))); + items.push_back (MenuElem (_("Play from"), mem_fun(*this, &Editor::marker_menu_play_from))); + items.push_back (MenuElem (_("Loop range"), mem_fun(*this, &Editor::marker_menu_loop_range))); + items.push_back (MenuElem (_("Set from playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead))); + items.push_back (MenuElem (_("Set from range"), mem_fun(*this, &Editor::marker_menu_set_from_selection))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Rename"), slot (*this, &Editor::marker_menu_rename))); - items.push_back (MenuElem (_("Hide"), slot (*this, &Editor::marker_menu_hide))); - items.push_back (MenuElem (_("Remove"), slot (*this, &Editor::marker_menu_remove))); + items.push_back (MenuElem (_("Rename"), mem_fun(*this, &Editor::marker_menu_rename))); + items.push_back (MenuElem (_("Hide"), mem_fun(*this, &Editor::marker_menu_hide))); + items.push_back (MenuElem (_("Remove"), mem_fun(*this, &Editor::marker_menu_remove))); } void @@ -463,8 +463,8 @@ Editor::build_tm_marker_menu () MenuList& items = tm_marker_menu->items(); tm_marker_menu->set_name ("ArdourContextMenu"); - items.push_back (MenuElem (_("Edit"), slot (*this, &Editor::marker_menu_edit))); - items.push_back (MenuElem (_("Remove"), slot (*this, &Editor::marker_menu_remove))); + items.push_back (MenuElem (_("Edit"), mem_fun(*this, &Editor::marker_menu_edit))); + items.push_back (MenuElem (_("Remove"), mem_fun(*this, &Editor::marker_menu_remove))); } void @@ -476,10 +476,10 @@ Editor::build_new_transport_marker_menu () MenuList& items = new_transport_marker_menu->items(); new_transport_marker_menu->set_name ("ArdourContextMenu"); - items.push_back (MenuElem (_("Set Loop Range"), slot (*this, &Editor::new_transport_marker_menu_set_loop))); - items.push_back (MenuElem (_("Set Punch Range"), slot (*this, &Editor::new_transport_marker_menu_set_punch))); + items.push_back (MenuElem (_("Set Loop Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_loop))); + items.push_back (MenuElem (_("Set Punch Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_punch))); - new_transport_marker_menu->unmap_event.connect ( slot (*this, &Editor::new_transport_marker_menu_popdown)); + new_transport_marker_menu->unmap_event.connect ( mem_fun(*this, &Editor::new_transport_marker_menu_popdown)); } void @@ -491,12 +491,12 @@ Editor::build_transport_marker_menu () MenuList& items = transport_marker_menu->items(); transport_marker_menu->set_name ("ArdourContextMenu"); - items.push_back (MenuElem (_("Locate to"), slot (*this, &Editor::marker_menu_set_playhead))); - items.push_back (MenuElem (_("Play from"), slot (*this, &Editor::marker_menu_play_from))); - items.push_back (MenuElem (_("Set from playhead"), slot (*this, &Editor::marker_menu_set_from_playhead))); - items.push_back (MenuElem (_("Set from range"), slot (*this, &Editor::marker_menu_set_from_selection))); + items.push_back (MenuElem (_("Locate to"), mem_fun(*this, &Editor::marker_menu_set_playhead))); + items.push_back (MenuElem (_("Play from"), mem_fun(*this, &Editor::marker_menu_play_from))); + items.push_back (MenuElem (_("Set from playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead))); + items.push_back (MenuElem (_("Set from range"), mem_fun(*this, &Editor::marker_menu_set_from_selection))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Hide"), slot (*this, &Editor::marker_menu_hide))); + items.push_back (MenuElem (_("Hide"), mem_fun(*this, &Editor::marker_menu_hide))); } void @@ -753,10 +753,10 @@ Editor::marker_menu_rename () ok_button.set_name ("EditorGTKButton"); cancel_button.set_name ("EditorGTKButton"); - entry.activate.connect (bind (slot (*this, &Editor::finish_sub_event_loop), 1)); - cancel_button.signal_clicked().connect (bind (slot (*this, &Editor::finish_sub_event_loop), -1)); - ok_button.signal_clicked().connect (bind (slot (*this, &Editor::finish_sub_event_loop), 1)); - dialog.delete_event.connect (bind (slot (*this, &Editor::finish_sub_event_loop_on_delete), -1)); + entry.activate.connect (bind (mem_fun(*this, &Editor::finish_sub_event_loop), 1)); + cancel_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::finish_sub_event_loop), -1)); + ok_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::finish_sub_event_loop), 1)); + dialog.delete_event.connect (bind (mem_fun(*this, &Editor::finish_sub_event_loop_on_delete), -1)); dialog.show_all (); entry.grab_focus (); @@ -801,8 +801,8 @@ Editor::new_transport_marker_menu_set_loop () session->add_redo_no_execute (session->locations()->get_memento()); } else { - session->add_undo (rettype(bind (slot (*tll, &Location::set), tll->start(), tll->end()))); - session->add_redo (rettype(bind (slot (*tll, &Location::set), temp_location->start(), temp_location->end()))); + session->add_undo (rettype(bind (mem_fun (*tll, &Location::set), tll->start(), tll->end()))); + session->add_redo (rettype(bind (mem_fun (*tll, &Location::set), temp_location->start(), temp_location->end()))); tll->set_hidden (false, this); tll->set (temp_location->start(), temp_location->end()); } @@ -826,8 +826,8 @@ Editor::new_transport_marker_menu_set_punch () session->set_auto_punch_location (tpl); session->add_redo_no_execute (session->locations()->get_memento()); } else { - session->add_undo (rettype(bind (slot (*tpl, &Location::set), tpl->start(), tpl->end()))); - session->add_redo (rettype(bind (slot (*tpl, &Location::set), temp_location->start(), temp_location->end()))); + session->add_undo (rettype(bind (mem_fun (*tpl, &Location::set), tpl->start(), tpl->end()))); + session->add_redo (rettype(bind (mem_fun (*tpl, &Location::set), temp_location->start(), temp_location->end()))); tpl->set_hidden(false, this); tpl->set(temp_location->start(), temp_location->end()); } diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index 80838b3cc0..8b6c81be5b 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -63,7 +63,7 @@ Editor::show_editor_mixer (bool yn) *session, atv->route(), false); - current_mixer_strip->GoingAway.connect (slot (*this, &Editor::cms_deleted)); + current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::cms_deleted)); break; } } @@ -77,7 +77,7 @@ Editor::show_editor_mixer (bool yn) current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(), *session, atv->route(), false); - current_mixer_strip->GoingAway.connect (slot (*this, &Editor::cms_deleted)); + current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::cms_deleted)); break; } } @@ -92,8 +92,8 @@ Editor::show_editor_mixer (bool yn) if (current_mixer_strip->get_parent() == 0) { current_mixer_strip->set_embedded (true); - current_mixer_strip->Hiding.connect (slot (*this, &Editor::current_mixer_strip_hidden)); - current_mixer_strip->GoingAway.connect (slot (*this, &Editor::current_mixer_strip_removed)); + current_mixer_strip->Hiding.connect (mem_fun(*this, &Editor::current_mixer_strip_hidden)); + current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::current_mixer_strip_removed)); current_mixer_strip->set_width (editor_mixer_strip_width); current_mixer_strip->show_all (); @@ -141,7 +141,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view) current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(), *session, at->route()); - current_mixer_strip->GoingAway.connect (slot (*this, &Editor::cms_deleted)); + current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::cms_deleted)); if (show) { show_editor_mixer (true); diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index d129ca7300..7eade9e793 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -726,7 +726,7 @@ Editor::button_press_handler (GtkCanvasItem* item, GdkEvent* event, ItemType ite if (clicked_trackview) { if (!current_stepping_trackview) { TimeoutSig t; - step_timeout = t.connect (slot (*this, &Editor::track_height_step_timeout), 500); + step_timeout = t.connect (mem_fun(*this, &Editor::track_height_step_timeout), 500); current_stepping_trackview = clicked_trackview; } gettimeofday (&last_track_height_step_timestamp, 0); @@ -763,7 +763,7 @@ Editor::button_press_handler (GtkCanvasItem* item, GdkEvent* event, ItemType ite if (clicked_trackview) { if (!current_stepping_trackview) { TimeoutSig t; - step_timeout = t.connect (slot (*this, &Editor::track_height_step_timeout), 500); + step_timeout = t.connect (mem_fun(*this, &Editor::track_height_step_timeout), 500); current_stepping_trackview = clicked_trackview; } gettimeofday (&last_track_height_step_timestamp, 0); @@ -1415,7 +1415,7 @@ Editor::leave_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type) gdk_window_set_cursor (track_canvas_scroller.get_window(), current_canvas_cursor); clear_entered_track = true; - Main::idle.connect (slot (*this, &Editor::left_automation_track)); + Main::idle.connect (mem_fun(*this, &Editor::left_automation_track)); } break; @@ -2523,7 +2523,7 @@ Editor::start_region_copy_grab (GtkCanvasItem* item, GdkEvent* event) session->add_undo (to_playlist->get_memento ()); latest_regionview = 0; - sigc::connection c = atv->view->AudioRegionViewAdded.connect (slot (*this, &Editor::collect_new_region_view)); + sigc::connection c = atv->view->AudioRegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view)); /* create a new region with the same name. */ @@ -3179,7 +3179,7 @@ Editor::region_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event) from_playlist->remove_region (&((*i)->region)); - sigc::connection c = atv2->view->AudioRegionViewAdded.connect (slot (*this, &Editor::collect_new_region_view)); + sigc::connection c = atv2->view->AudioRegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view)); to_playlist->add_region (*new_region, where); c.disconnect (); @@ -3416,7 +3416,7 @@ Editor::start_selection_grab (GtkCanvasItem* item, GdkEvent* event) */ latest_regionview = 0; - sigc::connection c = clicked_audio_trackview->view->AudioRegionViewAdded.connect (slot (*this, &Editor::collect_new_region_view)); + sigc::connection c = clicked_audio_trackview->view->AudioRegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view)); /* A selection grab currently creates two undo/redo operations, one for creating the new region and another for moving it. diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 08f7931ff2..18d4a4a37b 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -1089,8 +1089,8 @@ Editor::temporal_zoom (gdouble fpu) // leftmost_after_zoom = min (leftmost_after_zoom, session->current_end_frame()); // begin_reversible_command (_("zoom")); -// session->add_undo (bind (slot (*this, &Editor::reposition_and_zoom), current_leftmost, frames_per_unit)); -// session->add_redo (bind (slot (*this, &Editor::reposition_and_zoom), leftmost_after_zoom, nfpu)); +// session->add_undo (bind (mem_fun(*this, &Editor::reposition_and_zoom), current_leftmost, frames_per_unit)); +// session->add_redo (bind (mem_fun(*this, &Editor::reposition_and_zoom), leftmost_after_zoom, nfpu)); // commit_reversible_command (); reposition_and_zoom (leftmost_after_zoom, nfpu); @@ -1145,8 +1145,8 @@ Editor::temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, string if (new_leftmost > middle) new_leftmost = 0; // begin_reversible_command (op); -// session->add_undo (bind (slot (*this, &Editor::reposition_and_zoom), leftmost_frame, frames_per_unit)); -// session->add_redo (bind (slot (*this, &Editor::reposition_and_zoom), new_leftmost, new_fpu)); +// session->add_undo (bind (mem_fun(*this, &Editor::reposition_and_zoom), leftmost_frame, frames_per_unit)); +// session->add_redo (bind (mem_fun(*this, &Editor::reposition_and_zoom), new_leftmost, new_fpu)); // commit_reversible_command (); reposition_and_zoom (new_leftmost, new_fpu); @@ -1177,8 +1177,8 @@ Editor::temporal_zoom_to_frame (bool coarser, jack_nframes_t frame) if (new_leftmost > frame) new_leftmost = 0; // begin_reversible_command (_("zoom to frame")); -// session->add_undo (bind (slot (*this, &Editor::reposition_and_zoom), leftmost_frame, frames_per_unit)); -// session->add_redo (bind (slot (*this, &Editor::reposition_and_zoom), new_leftmost, new_fpu)); +// session->add_undo (bind (mem_fun(*this, &Editor::reposition_and_zoom), leftmost_frame, frames_per_unit)); +// session->add_redo (bind (mem_fun(*this, &Editor::reposition_and_zoom), new_leftmost, new_fpu)); // commit_reversible_command (); reposition_and_zoom (new_leftmost, new_fpu); @@ -1758,9 +1758,9 @@ Editor::rename_region () region_renamed = false; - entry.activate.connect (bind (slot (*this, &Editor::rename_region_finished), true)); - ok_button.signal_clicked().connect (bind (slot (*this, &Editor::rename_region_finished), true)); - cancel_button.signal_clicked().connect (bind (slot (*this, &Editor::rename_region_finished), false)); + entry.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)); /* recurse */ @@ -1832,7 +1832,7 @@ Editor::build_interthread_progress_window () interthread_cancel_button.add (interthread_cancel_label); - interthread_cancel_button.signal_clicked().connect (slot (*this, &Editor::interthread_cancel_clicked)); + interthread_cancel_button.signal_clicked().connect (mem_fun(*this, &Editor::interthread_cancel_clicked)); interthread_progress_window->set_modal (true); interthread_progress_window->set_default_size (200, 100); @@ -1897,10 +1897,10 @@ Editor::import_audio (bool as_tracks) string str; if (as_tracks) { - c = sfdb.Action.connect (bind (slot (*this, &Editor::do_import), true)); + c = sfdb.Action.connect (bind (mem_fun(*this, &Editor::do_import), true)); str =_("Import selected as tracks"); } else { - c = sfdb.Action.connect (bind (slot (*this, &Editor::do_import), false)); + c = sfdb.Action.connect (bind (mem_fun(*this, &Editor::do_import), false)); str = _("Import selected to region list"); } @@ -1937,7 +1937,7 @@ Editor::do_import (vector paths, bool split, bool as_tracks) interthread_cancel_label.set_text (_("Cancel Import")); current_interthread_info = &import_status; - c = session->AudioRegionAdded.connect (slot (*this, &Editor::catch_new_audio_region)); + c = session->AudioRegionAdded.connect (mem_fun(*this, &Editor::catch_new_audio_region)); for (vector::iterator i = paths.begin(); i != paths.end(); ++i ) { @@ -1950,7 +1950,7 @@ Editor::do_import (vector paths, bool split, bool as_tracks) import_status.done = 0.0; interthread_progress_connection = - Gtk::Main::timeout.connect (bind (slot (*this, &Editor::import_progress_timeout), (gpointer) 0), 100); + Gtk::Main::timeout.connect (bind (mem_fun(*this, &Editor::import_progress_timeout), (gpointer) 0), 100); last_audio_region = 0; @@ -2034,7 +2034,7 @@ Editor::embed_audio () } SoundFileSelector& sfdb (ARDOUR_UI::instance()->get_sfdb_window()); - sigc::connection c = sfdb.Action.connect (slot (*this, &Editor::do_embed_sndfiles)); + sigc::connection c = sfdb.Action.connect (mem_fun(*this, &Editor::do_embed_sndfiles)); sfdb.run (_("Add to External Region list"), true); @@ -2167,7 +2167,7 @@ Editor::insert_sndfile (bool as_tracks) if (as_tracks) { - c = sfdb.Action.connect (slot (*this, &Editor::insert_paths_as_new_tracks)); + c = sfdb.Action.connect (mem_fun(*this, &Editor::insert_paths_as_new_tracks)); str = _("Insert selected as new tracks"); } else { @@ -2182,7 +2182,7 @@ Editor::insert_sndfile (bool as_tracks) return; } - c = sfdb.Action.connect (bind (slot (*this, &Editor::do_insert_sndfile), pos)); + c = sfdb.Action.connect (bind (mem_fun(*this, &Editor::do_insert_sndfile), pos)); str = _("Insert selected"); } @@ -2915,7 +2915,7 @@ Editor::freeze_route () current_interthread_info = &itt; interthread_progress_connection = - Gtk::Main::timeout.connect (bind (slot (*this, &Editor::freeze_progress_timeout), (gpointer) 0), 100); + Gtk::Main::timeout.connect (bind (mem_fun(*this, &Editor::freeze_progress_timeout), (gpointer) 0), 100); itt.done = false; itt.cancel = false; diff --git a/gtk2_ardour/editor_region_list.cc b/gtk2_ardour/editor_region_list.cc index c9d2346539..cd6afea5f3 100644 --- a/gtk2_ardour/editor_region_list.cc +++ b/gtk2_ardour/editor_region_list.cc @@ -197,7 +197,7 @@ Editor::handle_new_audio_region (AudioRegion *region) void Editor::region_hidden (Region* r) { - ENSURE_GUI_THREAD(bind (slot (*this, &Editor::region_hidden), r)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::region_hidden), r)); redisplay_regions (); } @@ -393,11 +393,11 @@ Editor::build_region_list_menu () MenuList& items = region_list_menu->items(); region_list_menu->set_name ("ArdourContextMenu"); - items.push_back (MenuElem (_("Audition"), slot (*this, &Editor::audition_region_from_region_list))); + 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"), slot (*this, &Editor::hide_region_from_region_list))); + 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"), slot (*this, &Editor::remove_region_from_region_list))); + items.push_back (MenuElem (_("Remove"), mem_fun(*this, &Editor::remove_region_from_region_list))); rl_context_menu_region_items.push_back (items.back()); @@ -405,7 +405,7 @@ Editor::build_region_list_menu () // items.push_back (MenuElem (_("Find"))); - items.push_back (CheckMenuElem (_("Show all"), slot (*this, &Editor::toggle_full_region_list))); + items.push_back (CheckMenuElem (_("Show all"), mem_fun(*this, &Editor::toggle_full_region_list))); toggle_full_region_list_item = static_cast (items.back()); Gtk::Menu *sort_menu = manage (new Menu); @@ -415,46 +415,46 @@ Editor::build_region_list_menu () RadioMenuItem::Group sort_type_group; sort_items.push_back (RadioMenuElem (sort_order_group, _("Ascending"), - bind (slot (*this, &Editor::reset_region_list_sort_direction), true))); + bind (mem_fun(*this, &Editor::reset_region_list_sort_direction), true))); sort_items.push_back (RadioMenuElem (sort_order_group, _("Descending"), - bind (slot (*this, &Editor::reset_region_list_sort_direction), false))); + 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 (slot (*this, &Editor::reset_region_list_sort_type), ByName))); + bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByName))); sort_items.push_back (RadioMenuElem (sort_type_group, _("By Region Length"), - bind (slot (*this, &Editor::reset_region_list_sort_type), ByLength))); + bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByLength))); sort_items.push_back (RadioMenuElem (sort_type_group, _("By Region Position"), - bind (slot (*this, &Editor::reset_region_list_sort_type), ByPosition))); + bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByPosition))); sort_items.push_back (RadioMenuElem (sort_type_group, _("By Region Timestamp"), - bind (slot (*this, &Editor::reset_region_list_sort_type), ByTimestamp))); + 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 (slot (*this, &Editor::reset_region_list_sort_type), ByStartInFile))); + 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 (slot (*this, &Editor::reset_region_list_sort_type), ByEndInFile))); + bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByEndInFile))); sort_items.push_back (RadioMenuElem (sort_type_group, _("By Source File Name"), - bind (slot (*this, &Editor::reset_region_list_sort_type), BySourceFileName))); + bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileName))); sort_items.push_back (RadioMenuElem (sort_type_group, _("By Source File Length"), - bind (slot (*this, &Editor::reset_region_list_sort_type), BySourceFileLength))); + 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 (slot (*this, &Editor::reset_region_list_sort_type), BySourceFileCreationDate))); + bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileCreationDate))); sort_items.push_back (RadioMenuElem (sort_type_group, _("By Source Filesystem"), - bind (slot (*this, &Editor::reset_region_list_sort_type), BySourceFileFS))); + 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"), slot (*this, &Editor::toggle_show_auto_regions))); +// items.push_back (CheckMenuElem (_("Display Automatic Regions"), mem_fun(*this, &Editor::toggle_show_auto_regions))); // toggle_auto_regions_item = static_cast (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 (slot (*this, &Editor::import_audio), false))); + 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)"), slot (*this, &Editor::embed_audio))); + 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); diff --git a/gtk2_ardour/editor_route_list.cc b/gtk2_ardour/editor_route_list.cc index c5dde76a46..49540fbe0f 100644 --- a/gtk2_ardour/editor_route_list.cc +++ b/gtk2_ardour/editor_route_list.cc @@ -39,7 +39,7 @@ using namespace Gtk; void Editor::handle_new_route_p (Route* route) { - ENSURE_GUI_THREAD(bind (slot (*this, &Editor::handle_new_route_p), route)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::handle_new_route_p), route)); handle_new_route (*route); } @@ -76,9 +76,9 @@ Editor::handle_new_route (Route& route) ignore_route_list_reorder = false; - route.gui_changed.connect (slot (*this, &Editor::handle_gui_changes)); + route.gui_changed.connect (mem_fun(*this, &Editor::handle_gui_changes)); - tv->GoingAway.connect (bind (slot (*this, &Editor::remove_route), tv)); + tv->GoingAway.connect (bind (mem_fun(*this, &Editor::remove_route), tv)); editor_mixer_button.set_sensitive(true); @@ -87,7 +87,7 @@ Editor::handle_new_route (Route& route) void Editor::handle_gui_changes (string what, void *src) { - ENSURE_GUI_THREAD(bind (slot (*this, &Editor::handle_gui_changes), what, src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::handle_gui_changes), what, src)); if (what == "track_height") { route_list_reordered (); @@ -97,7 +97,7 @@ Editor::handle_gui_changes (string what, void *src) void Editor::remove_route (TimeAxisView *tv) { - ENSURE_GUI_THREAD(bind (slot (*this, &Editor::remove_route), tv)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::remove_route), tv)); TrackViewList::iterator i; CList_Helpers::RowList::iterator ri; @@ -199,7 +199,7 @@ Editor::queue_route_list_reordered (gint arg1, gint arg2) is complete. */ - Main::idle.connect (slot (*this, &Editor::route_list_reordered)); + Main::idle.connect (mem_fun(*this, &Editor::route_list_reordered)); } void @@ -295,12 +295,12 @@ Editor::build_route_list_menu () MenuList& items = route_list_menu->items(); route_list_menu->set_name ("ArdourContextMenu"); - items.push_back (MenuElem (_("Show All"), slot (*this, &Editor::select_all_routes))); - items.push_back (MenuElem (_("Hide All"), slot (*this, &Editor::unselect_all_routes))); - items.push_back (MenuElem (_("Show All AbstractTracks"), slot (*this, &Editor::select_all_audiotracks))); - items.push_back (MenuElem (_("Hide All AbstractTracks"), slot (*this, &Editor::unselect_all_audiotracks))); - items.push_back (MenuElem (_("Show All AudioBus"), slot (*this, &Editor::select_all_audiobus))); - items.push_back (MenuElem (_("Hide All AudioBus"), slot (*this, &Editor::unselect_all_audiobus))); + items.push_back (MenuElem (_("Show All"), mem_fun(*this, &Editor::select_all_routes))); + items.push_back (MenuElem (_("Hide All"), mem_fun(*this, &Editor::unselect_all_routes))); + items.push_back (MenuElem (_("Show All AbstractTracks"), mem_fun(*this, &Editor::select_all_audiotracks))); + items.push_back (MenuElem (_("Hide All AbstractTracks"), mem_fun(*this, &Editor::unselect_all_audiotracks))); + items.push_back (MenuElem (_("Show All AudioBus"), mem_fun(*this, &Editor::select_all_audiobus))); + items.push_back (MenuElem (_("Hide All AudioBus"), mem_fun(*this, &Editor::unselect_all_audiobus))); } diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc index 052cb01ddd..a879490415 100644 --- a/gtk2_ardour/editor_rulers.cc +++ b/gtk2_ardour/editor_rulers.cc @@ -94,20 +94,20 @@ Editor::initialize_rulers () 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->button_release_event.connect (slot (*this, &Editor::ruler_button_release)); - bbt_ruler->button_release_event.connect (slot (*this, &Editor::ruler_button_release)); - frames_ruler->button_release_event.connect (slot (*this, &Editor::ruler_button_release)); - minsec_ruler->button_release_event.connect (slot (*this, &Editor::ruler_button_release)); - - smpte_ruler->button_press_event.connect (slot (*this, &Editor::ruler_button_press)); - bbt_ruler->button_press_event.connect (slot (*this, &Editor::ruler_button_press)); - frames_ruler->button_press_event.connect (slot (*this, &Editor::ruler_button_press)); - minsec_ruler->button_press_event.connect (slot (*this, &Editor::ruler_button_press)); + smpte_ruler->button_release_event.connect (mem_fun(*this, &Editor::ruler_button_release)); + bbt_ruler->button_release_event.connect (mem_fun(*this, &Editor::ruler_button_release)); + frames_ruler->button_release_event.connect (mem_fun(*this, &Editor::ruler_button_release)); + minsec_ruler->button_release_event.connect (mem_fun(*this, &Editor::ruler_button_release)); + + smpte_ruler->button_press_event.connect (mem_fun(*this, &Editor::ruler_button_press)); + bbt_ruler->button_press_event.connect (mem_fun(*this, &Editor::ruler_button_press)); + frames_ruler->button_press_event.connect (mem_fun(*this, &Editor::ruler_button_press)); + minsec_ruler->button_press_event.connect (mem_fun(*this, &Editor::ruler_button_press)); - smpte_ruler->motion_notify_event.connect (slot (*this, &Editor::ruler_mouse_motion)); - bbt_ruler->motion_notify_event.connect (slot (*this, &Editor::ruler_mouse_motion)); - frames_ruler->motion_notify_event.connect (slot (*this, &Editor::ruler_mouse_motion)); - minsec_ruler->motion_notify_event.connect (slot (*this, &Editor::ruler_mouse_motion)); + smpte_ruler->motion_notify_event.connect (mem_fun(*this, &Editor::ruler_mouse_motion)); + bbt_ruler->motion_notify_event.connect (mem_fun(*this, &Editor::ruler_mouse_motion)); + frames_ruler->motion_notify_event.connect (mem_fun(*this, &Editor::ruler_mouse_motion)); + minsec_ruler->motion_notify_event.connect (mem_fun(*this, &Editor::ruler_mouse_motion)); visible_timebars = 7; /* 4 here, 3 in time_canvas */ ruler_pressed_button = 0; @@ -308,13 +308,13 @@ Editor::popup_ruler_menu (jack_nframes_t where, ItemType t) switch (t) { case MarkerBarItem: - ruler_items.push_back (MenuElem (_("New location marker"), bind ( slot (*this, &Editor::mouse_add_new_marker), where))); - ruler_items.push_back (MenuElem (_("Clear all locations"), slot (*this, &Editor::clear_markers))); + ruler_items.push_back (MenuElem (_("New location marker"), bind ( mem_fun(*this, &Editor::mouse_add_new_marker), where))); + ruler_items.push_back (MenuElem (_("Clear all locations"), mem_fun(*this, &Editor::clear_markers))); ruler_items.push_back (SeparatorElem ()); break; case RangeMarkerBarItem: //ruler_items.push_back (MenuElem (_("New Range"))); - ruler_items.push_back (MenuElem (_("Clear all ranges"), slot (*this, &Editor::clear_ranges))); + ruler_items.push_back (MenuElem (_("Clear all ranges"), mem_fun(*this, &Editor::clear_ranges))); ruler_items.push_back (SeparatorElem ()); break; @@ -323,13 +323,13 @@ Editor::popup_ruler_menu (jack_nframes_t where, ItemType t) break; case TempoBarItem: - ruler_items.push_back (MenuElem (_("New Tempo"), bind ( slot (*this, &Editor::mouse_add_new_tempo_event), where))); + ruler_items.push_back (MenuElem (_("New Tempo"), bind ( mem_fun(*this, &Editor::mouse_add_new_tempo_event), where))); ruler_items.push_back (MenuElem (_("Clear tempo"))); ruler_items.push_back (SeparatorElem ()); break; case MeterBarItem: - ruler_items.push_back (MenuElem (_("New Meter"), bind ( slot (*this, &Editor::mouse_add_new_meter_event), where))); + ruler_items.push_back (MenuElem (_("New Meter"), bind ( mem_fun(*this, &Editor::mouse_add_new_meter_event), where))); ruler_items.push_back (MenuElem (_("Clear meter"))); ruler_items.push_back (SeparatorElem ()); break; @@ -338,25 +338,25 @@ Editor::popup_ruler_menu (jack_nframes_t where, ItemType t) break; } - ruler_items.push_back (CheckMenuElem (_("Min:Secs"), bind (slot (*this, &Editor::ruler_toggled), (int)ruler_metric_minsec))); + ruler_items.push_back (CheckMenuElem (_("Min:Secs"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_minsec))); mitem = (CheckMenuItem *) ruler_items.back(); if (ruler_shown[ruler_metric_minsec]) { mitem->set_active(true); } - ruler_items.push_back (CheckMenuElem (X_("SMPTE"), bind (slot (*this, &Editor::ruler_toggled), (int)ruler_metric_smpte))); + ruler_items.push_back (CheckMenuElem (X_("SMPTE"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_smpte))); mitem = (CheckMenuItem *) ruler_items.back(); if (ruler_shown[ruler_metric_smpte]) { mitem->set_active(true); } - ruler_items.push_back (CheckMenuElem (_("Frames"), bind (slot (*this, &Editor::ruler_toggled), (int)ruler_metric_frames))); + ruler_items.push_back (CheckMenuElem (_("Frames"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_frames))); mitem = (CheckMenuItem *) ruler_items.back(); if (ruler_shown[ruler_metric_frames]) { mitem->set_active(true); } - ruler_items.push_back (CheckMenuElem (_("Bars:Beats"), bind (slot (*this, &Editor::ruler_toggled), (int)ruler_metric_bbt))); + ruler_items.push_back (CheckMenuElem (_("Bars:Beats"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_bbt))); mitem = (CheckMenuItem *) ruler_items.back(); if (ruler_shown[ruler_metric_bbt]) { mitem->set_active(true); @@ -364,31 +364,31 @@ Editor::popup_ruler_menu (jack_nframes_t where, ItemType t) ruler_items.push_back (SeparatorElem ()); - ruler_items.push_back (CheckMenuElem (_("Meter"), bind (slot (*this, &Editor::ruler_toggled), (int)ruler_time_meter))); + ruler_items.push_back (CheckMenuElem (_("Meter"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_time_meter))); mitem = (CheckMenuItem *) ruler_items.back(); if (ruler_shown[ruler_time_meter]) { mitem->set_active(true); } - ruler_items.push_back (CheckMenuElem (_("Tempo"), bind (slot (*this, &Editor::ruler_toggled), (int)ruler_time_tempo))); + ruler_items.push_back (CheckMenuElem (_("Tempo"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_time_tempo))); mitem = (CheckMenuItem *) ruler_items.back(); if (ruler_shown[ruler_time_tempo]) { mitem->set_active(true); } - ruler_items.push_back (CheckMenuElem (_("Location Markers"), bind (slot (*this, &Editor::ruler_toggled), (int)ruler_time_marker))); + ruler_items.push_back (CheckMenuElem (_("Location Markers"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_time_marker))); mitem = (CheckMenuItem *) ruler_items.back(); if (ruler_shown[ruler_time_marker]) { mitem->set_active(true); } - ruler_items.push_back (CheckMenuElem (_("Range Markers"), bind (slot (*this, &Editor::ruler_toggled), (int)ruler_time_range_marker))); + ruler_items.push_back (CheckMenuElem (_("Range Markers"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_time_range_marker))); 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 (slot (*this, &Editor::ruler_toggled), (int)ruler_time_transport_marker))); + 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(); if (ruler_shown[ruler_time_transport_marker]) { mitem->set_active(true); @@ -557,20 +557,20 @@ Editor::update_ruler_visibility () 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->button_release_event.connect (slot (*this, &Editor::ruler_button_release)); - bbt_ruler->button_release_event.connect (slot (*this, &Editor::ruler_button_release)); - frames_ruler->button_release_event.connect (slot (*this, &Editor::ruler_button_release)); - minsec_ruler->button_release_event.connect (slot (*this, &Editor::ruler_button_release)); + smpte_ruler->button_release_event.connect (mem_fun(*this, &Editor::ruler_button_release)); + bbt_ruler->button_release_event.connect (mem_fun(*this, &Editor::ruler_button_release)); + frames_ruler->button_release_event.connect (mem_fun(*this, &Editor::ruler_button_release)); + minsec_ruler->button_release_event.connect (mem_fun(*this, &Editor::ruler_button_release)); - smpte_ruler->button_press_event.connect (slot (*this, &Editor::ruler_button_press)); - bbt_ruler->button_press_event.connect (slot (*this, &Editor::ruler_button_press)); - frames_ruler->button_press_event.connect (slot (*this, &Editor::ruler_button_press)); - minsec_ruler->button_press_event.connect (slot (*this, &Editor::ruler_button_press)); + smpte_ruler->button_press_event.connect (mem_fun(*this, &Editor::ruler_button_press)); + bbt_ruler->button_press_event.connect (mem_fun(*this, &Editor::ruler_button_press)); + frames_ruler->button_press_event.connect (mem_fun(*this, &Editor::ruler_button_press)); + minsec_ruler->button_press_event.connect (mem_fun(*this, &Editor::ruler_button_press)); - smpte_ruler->motion_notify_event.connect (slot (*this, &Editor::ruler_mouse_motion)); - bbt_ruler->motion_notify_event.connect (slot (*this, &Editor::ruler_mouse_motion)); - frames_ruler->motion_notify_event.connect (slot (*this, &Editor::ruler_mouse_motion)); - minsec_ruler->motion_notify_event.connect (slot (*this, &Editor::ruler_mouse_motion)); + smpte_ruler->motion_notify_event.connect (mem_fun(*this, &Editor::ruler_mouse_motion)); + bbt_ruler->motion_notify_event.connect (mem_fun(*this, &Editor::ruler_mouse_motion)); + frames_ruler->motion_notify_event.connect (mem_fun(*this, &Editor::ruler_mouse_motion)); + minsec_ruler->motion_notify_event.connect (mem_fun(*this, &Editor::ruler_mouse_motion)); if (ruler_shown[ruler_metric_minsec]) { @@ -698,7 +698,7 @@ Editor::update_ruler_visibility () void Editor::update_just_smpte () { - ENSURE_GUI_THREAD(slot (*this, &Editor::update_just_smpte)); + ENSURE_GUI_THREAD(mem_fun(*this, &Editor::update_just_smpte)); if (session == 0) { return; diff --git a/gtk2_ardour/editor_selection_list.cc b/gtk2_ardour/editor_selection_list.cc index 46a11c75f3..d6681cf5a5 100644 --- a/gtk2_ardour/editor_selection_list.cc +++ b/gtk2_ardour/editor_selection_list.cc @@ -46,7 +46,7 @@ using namespace Gtkmm2ext; void Editor::handle_new_named_selection () { - ARDOUR_UI::instance()->call_slot (slot (*this, &Editor::redisplay_named_selections)); + ARDOUR_UI::instance()->call_slot (mem_fun(*this, &Editor::redisplay_named_selections)); } void @@ -115,7 +115,7 @@ Editor::name_selection () ArdourPrompter p; p.set_prompt (_("name for chunk:")); - p.done.connect (slot (*this, &Editor::named_selection_name_chosen)); + p.done.connect (mem_fun(*this, &Editor::named_selection_name_chosen)); p.change_labels (_("Create chunk"), _("Forget it")); p.show_all (); diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index eae91fc92c..db62c8817e 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -85,7 +85,7 @@ Editor::draw_metric_marks (const Metrics& metrics) void Editor::tempo_map_changed (Change ignored) { - ENSURE_GUI_THREAD(bind (slot (*this, &Editor::tempo_map_changed), ignored)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::tempo_map_changed), ignored)); if (current_bbt_points) { delete current_bbt_points; @@ -342,7 +342,7 @@ Editor::remove_tempo_marker (GtkCanvasItem* item) } if (tempo_marker->tempo().movable()) { - Gtk::Main::idle.connect (bind (slot (*this, &Editor::real_remove_tempo_marker), &tempo_marker->tempo())); + Gtk::Main::idle.connect (bind (mem_fun(*this, &Editor::real_remove_tempo_marker), &tempo_marker->tempo())); } } @@ -477,7 +477,7 @@ Editor::remove_meter_marker (GtkCanvasItem* item) } if (meter_marker->meter().movable()) { - Gtk::Main::idle.connect (bind (slot (*this, &Editor::real_remove_meter_marker), &meter_marker->meter())); + Gtk::Main::idle.connect (bind (mem_fun(*this, &Editor::real_remove_meter_marker), &meter_marker->meter())); } } diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc index 39c0b3c5eb..ccc5750a64 100644 --- a/gtk2_ardour/editor_timefx.cc +++ b/gtk2_ardour/editor_timefx.cc @@ -85,7 +85,7 @@ Editor::TimeStretchDialog::TimeStretchDialog (Editor& e) antialias_button.set_name (N_("TimeStretchButton")); progress_bar.set_name (N_("TimeStretchProgress")); - action_button.signal_clicked().connect (bind (slot (*this, &ArdourDialog::stop), 1)); + action_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), 1)); } gint @@ -120,8 +120,8 @@ Editor::run_timestretch (AudioRegionSelection& regions, float fraction) } current_timestretch->progress_bar.set_percentage (0.0f); - current_timestretch->first_cancel = current_timestretch->cancel_button.signal_clicked().connect (bind (slot (*current_timestretch, &ArdourDialog::stop), -1)); - current_timestretch->first_delete = current_timestretch->delete_event.connect (slot (*current_timestretch, &ArdourDialog::wm_close_event)); + current_timestretch->first_cancel = current_timestretch->cancel_button.signal_clicked().connect (bind (mem_fun (*current_timestretch, &ArdourDialog::stop), -1)); + current_timestretch->first_delete = current_timestretch->delete_event.connect (mem_fun (*current_timestretch, &ArdourDialog::wm_close_event)); current_timestretch->run (); @@ -143,8 +143,8 @@ Editor::run_timestretch (AudioRegionSelection& regions, float fraction) current_timestretch->first_cancel.disconnect(); current_timestretch->first_delete.disconnect(); - current_timestretch->cancel_button.signal_clicked().connect (slot (current_timestretch, &TimeStretchDialog::cancel_timestretch_in_progress)); - current_timestretch->delete_event.connect (slot (current_timestretch, &TimeStretchDialog::delete_timestretch_in_progress)); + current_timestretch->cancel_button.signal_clicked().connect (mem_fun (current_timestretch, &TimeStretchDialog::cancel_timestretch_in_progress)); + current_timestretch->delete_event.connect (mem_fun (current_timestretch, &TimeStretchDialog::delete_timestretch_in_progress)); if (pthread_create_and_store ("timestretch", &thread, 0, timestretch_thread, current_timestretch)) { current_timestretch->close (); @@ -154,7 +154,7 @@ Editor::run_timestretch (AudioRegionSelection& regions, float fraction) pthread_detach (thread); - sigc::connection c = Main::timeout.connect (slot (current_timestretch, &TimeStretchDialog::update_progress), 100); + sigc::connection c = Main::timeout.connect (mem_fun (current_timestretch, &TimeStretchDialog::update_progress), 100); while (current_timestretch->request.running) { gtk_main_iteration (); diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index bd194d5aae..5f2365cdce 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -141,8 +141,8 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r) file_selector = 0; spec.running = false; - file_entry.signal_focus_in_event().connect (slot (ARDOUR_UI::generic_focus_in_event)); - file_entry.signal_focus_out_event().connect (slot (ARDOUR_UI::generic_focus_out_event)); + 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.set_name ("ExportFileNameEntry"); @@ -156,7 +156,7 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r) master_selector.set_column_title (0, _("Output")); master_selector.column_titles_show (); master_selector.set_selection_mode (GTK_SELECTION_MULTIPLE); - master_selector.button_press_event.connect (slot (*this, &ExportDialog::master_selector_button_press_event)); + master_selector.button_press_event.connect (mem_fun(*this, &ExportDialog::master_selector_button_press_event)); track_selector.set_name ("ExportTrackSelector"); track_selector.set_size_request (-1, 130); @@ -168,7 +168,7 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r) track_selector.set_column_title (0, _("Track")); track_selector.column_titles_show (); track_selector.set_selection_mode (GTK_SELECTION_MULTIPLE); - track_selector.button_press_event.connect (slot (*this, &ExportDialog::track_selector_button_press_event)); + track_selector.button_press_event.connect (mem_fun(*this, &ExportDialog::track_selector_button_press_event)); check_pixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, gtk_widget_get_colormap(GTK_WIDGET(track_selector.gobj())), @@ -214,7 +214,7 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r) vpacker.pack_start (hpacker, true, true); track_selector_button.set_name ("EditorGTKButton"); - track_selector_button.signal_clicked().connect (slot (*this, &ExportDialog::track_selector_button_click)); + track_selector_button.signal_clicked().connect (mem_fun(*this, &ExportDialog::track_selector_button_click)); vpacker.pack_start (button_box, false, false); vpacker.pack_start (progress_bar, false, false); @@ -378,18 +378,18 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r) cancel_button.set_name ("EditorGTKButton"); file_entry.set_name ("ExportFileDisplay"); - delete_event.connect (slot (*this, &ExportDialog::window_closed)); - ok_button.signal_clicked().connect (slot (*this, &ExportDialog::do_export)); - cancel_button.signal_clicked().connect (slot (*this, &ExportDialog::end_dialog)); + delete_event.connect (mem_fun(*this, &ExportDialog::window_closed)); + ok_button.signal_clicked().connect (mem_fun(*this, &ExportDialog::do_export)); + cancel_button.signal_clicked().connect (mem_fun(*this, &ExportDialog::end_dialog)); file_browse_button.set_name ("EditorGTKButton"); - file_browse_button.signal_clicked().connect (slot (*this, &ExportDialog::initiate_browse)); + file_browse_button.signal_clicked().connect (mem_fun(*this, &ExportDialog::initiate_browse)); - channel_count_combo.get_popwin()->unmap_event.connect (slot (*this, &ExportDialog::channels_chosen)); - bitdepth_format_combo.get_popwin()->unmap_event.connect (slot (*this, &ExportDialog::bitdepth_chosen)); - header_format_combo.get_popwin()->unmap_event.connect (slot (*this, &ExportDialog::header_chosen)); - sample_rate_combo.get_popwin()->unmap_event.connect (slot (*this, &ExportDialog::sample_rate_chosen)); - cue_file_combo.get_popwin()->unmap_event.connect (slot (*this, &ExportDialog::cue_file_type_chosen)); + channel_count_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &ExportDialog::channels_chosen)); + bitdepth_format_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &ExportDialog::bitdepth_chosen)); + header_format_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &ExportDialog::header_chosen)); + sample_rate_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &ExportDialog::sample_rate_chosen)); + cue_file_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &ExportDialog::cue_file_type_chosen)); } ExportDialog::~ExportDialog() @@ -403,7 +403,7 @@ void ExportDialog::connect_to_session (Session *s) { session = s; - session->going_away.connect (slot (*this, &Window::hide_all)); + session->going_away.connect (mem_fun(*this, &Window::hide_all)); switch (session->frame_rate()) { case 22050: @@ -1047,7 +1047,7 @@ ExportDialog::do_export () } } - progress_connection = Main::timeout.connect (slot (*this, &ExportDialog::progress_timeout), 100); + progress_connection = Main::timeout.connect (mem_fun(*this, &ExportDialog::progress_timeout), 100); cancel_label.set_text (_("Stop Export")); if (!audio_region) { @@ -1350,10 +1350,10 @@ ExportDialog::initiate_browse () file_selector = new FileSelection; file_selector->set_modal (true); - file_selector->get_cancel_button()-.signal_clicked().connect (bind (slot (*this, &ExportDialog::finish_browse), -1)); - file_selector->get_ok_button()-.signal_clicked().connect (bind (slot (*this, &ExportDialog::finish_browse), 1)); - file_selector->map_event.connect (bind (slot (*this, &ExportDialog::change_focus_policy), true)); - file_selector->unmap_event.connect (bind (slot (*this, &ExportDialog::change_focus_policy), false)); + 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->map_event.connect (bind (mem_fun(*this, &ExportDialog::change_focus_policy), true)); + file_selector->unmap_event.connect (bind (mem_fun(*this, &ExportDialog::change_focus_policy), false)); } file_selector->show_all (); } diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 0e7f3b77aa..c894dd12a3 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -27,11 +27,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -48,9 +48,9 @@ #include "misc_xpms" using namespace ARDOUR; -using namespace Gtkmmext; +using namespace Gtkmm2ext; using namespace Gtk; -using namespace SigC; +using namespace sigc; Signal0 GainMeter::ResetAllPeakDisplays; Signal1 GainMeter::ResetGroupPeakDisplays; @@ -97,8 +97,8 @@ GainMeter::GainMeter (IO& io, Session& s) & _io.midi_gain_control(), false)); - gain_slider->button_press_event.connect (slot (*this, &GainMeter::start_gain_touch)); - gain_slider->button_release_event.connect (slot (*this, &GainMeter::end_gain_touch)); + gain_slider->button_press_event.connect (mem_fun(*this, &GainMeter::start_gain_touch)); + gain_slider->button_release_event.connect (mem_fun(*this, &GainMeter::end_gain_touch)); gain_slider->set_name ("MixerGainMeter"); if (_session.midi_port()) { @@ -107,7 +107,7 @@ GainMeter::GainMeter (IO& io, Session& s) } gain_display.set_print_func (_gain_printer, this); - set_usize_to_display_given_text (gain_display, "-86.0", 2, 2); + set_size_request_to_display_given_text (gain_display, "-86.0", 2, 2); gain_unit_button.add (gain_unit_label); gain_unit_button.set_name ("MixerStripGainUnitButton"); @@ -120,7 +120,7 @@ GainMeter::GainMeter (IO& io, Session& s) Route* r; if ((r = dynamic_cast (&_io)) != 0) { - r->meter_change.connect (slot (*this, &GainMeter::meter_changed)); + r->meter_change.connect (mem_fun(*this, &GainMeter::meter_changed)); meter_point_button.add (meter_point_label); meter_point_button.set_name ("MixerStripMeterPreButton"); meter_point_label.set_name ("MixerStripMeterPreButton"); @@ -143,24 +143,24 @@ GainMeter::GainMeter (IO& io, Session& s) used to describe meter points. In english, its "input". */ - set_usize_to_display_given_text (meter_point_button, _("tupni"), 2, 2); + set_size_request_to_display_given_text (meter_point_button, _("tupni"), 2, 2); - meter_point_button.button_press_event.connect (slot (*this, &GainMeter::meter_press)); - meter_point_button.button_release_event.connect (slot (*this, &GainMeter::meter_release)); + meter_point_button.button_press_event.connect (mem_fun(*this, &GainMeter::meter_press)); + meter_point_button.button_release_event.connect (mem_fun(*this, &GainMeter::meter_release)); top_table.attach (meter_point_button, 1, 2, 0, 1); } gain_display_box.set_spacing (2); - gain_display_frame.set_shadow_type (GTK_SHADOW_IN); + gain_display_frame.set_shadow_type (Gtk::SHADOW_IN); gain_display_frame.set_name ("BaseFrame"); gain_display_frame.add (gain_display); gain_display_box.pack_start (gain_display_frame, false, false); peak_display.set_name ("MixerStripPeakDisplay"); - set_usize_to_display_given_text (peak_display, "-86.0", 2, 2); + set_size_request_to_display_given_text (peak_display, "-86.0", 2, 2); peak_display.add (peak_display_label); - peak_display_frame.set_shadow_type (GTK_SHADOW_IN); + peak_display_frame.set_shadow_type (Gtk::SHADOW_IN); peak_display_frame.set_name ("BaseFrame"); peak_display_frame.add (peak_display); max_peak = minus_infinity(); @@ -169,7 +169,7 @@ GainMeter::GainMeter (IO& io, Session& s) gain_display_box.pack_start (peak_display_frame, false, false); - meter_metric_area.set_usize (18, -1); + meter_metric_area.set_size_request (18, -1); meter_metric_area.set_name ("MeterMetricsStrip"); meter_packer.show (); @@ -191,19 +191,19 @@ GainMeter::GainMeter (IO& io, Session& s) show_all (); - _io.gain_changed.connect (slot (*this, &GainMeter::gain_changed)); + _io.gain_changed.connect (mem_fun(*this, &GainMeter::gain_changed)); - meter_metric_area.expose_event.connect (slot (*this, &GainMeter::meter_metrics_expose)); - gain_adjustment.value_changed.connect (slot (*this, &GainMeter::gain_adjusted)); - peak_display.button_release_event.connect (slot (*this, &GainMeter::peak_button_release)); + meter_metric_area.expose_event.connect (mem_fun(*this, &GainMeter::meter_metrics_expose)); + gain_adjustment.value_changed.connect (mem_fun(*this, &GainMeter::gain_adjusted)); + peak_display.button_release_event.connect (mem_fun(*this, &GainMeter::peak_button_release)); - _session.MeterHoldChanged.connect (slot (*this, &GainMeter::meter_hold_changed)); + _session.MeterHoldChanged.connect (mem_fun(*this, &GainMeter::meter_hold_changed)); gain_changed (0); update_gain_sensitive (); - ResetAllPeakDisplays.connect (slot (*this, &GainMeter::reset_peak_display)); - ResetGroupPeakDisplays.connect (slot (*this, &GainMeter::reset_group_peak_display)); + ResetAllPeakDisplays.connect (mem_fun(*this, &GainMeter::reset_peak_display)); + ResetGroupPeakDisplays.connect (mem_fun(*this, &GainMeter::reset_group_peak_display)); } void @@ -230,8 +230,8 @@ GainMeter::meter_metrics_expose (GdkEventExpose *ev) double fraction; Gdk_Window 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_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()); gint x, y, width, height, depth; gint pos; @@ -349,7 +349,7 @@ GainMeter::update_meters_falloff () void GainMeter::meter_hold_changed() { - ENSURE_GUI_THREAD(slot (*this, &GainMeter::meter_hold_changed)); + ENSURE_GUI_THREAD(mem_fun(*this, &GainMeter::meter_hold_changed)); vector::iterator i; uint32_t n; @@ -433,10 +433,10 @@ GainMeter::setup_meters () meters[n].meter = new FastMeter ((uint32_t) floor (_session.meter_hold()), width, FastMeter::Vertical); meters[n].width = width; - meters[n].meter->add_events (GDK_BUTTON_RELEASE_MASK); + meters[n].meter->add_events (Gdk::BUTTON_RELEASE_MASK); meters[n].meter->button_release_event.connect - (bind (slot (*this, &GainMeter::meter_button_release), n)); - meters[n].meter->button_release_event.connect_after (slot (do_not_propagate)); + (bind (mem_fun(*this, &GainMeter::meter_button_release), n)); + meters[n].meter->button_release_event.connect_after (ptr_fun (do_not_propagate)); } meter_packer.pack_start (*meters[n].meter, false, false); @@ -563,7 +563,7 @@ GainMeter::effective_gain_display () void GainMeter::gain_changed (void *src) { - Gtkmmext::UI::instance()->call_slot (slot (*this, &GainMeter::effective_gain_display)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &GainMeter::effective_gain_display)); } gint @@ -593,7 +593,7 @@ GainMeter::set_fader_name (string name) void GainMeter::update_gain_sensitive () { - static_cast(gain_slider)->set_sensitive (!(_io.gain_automation_state() & Play)); + static_cast(gain_slider)->set_sensitive (!(_io.gain_automation_state() & Play)); } @@ -715,7 +715,7 @@ GainMeter::meter_changed (void *src) { Route* r; - ENSURE_GUI_THREAD (bind (slot (*this, &GainMeter::meter_changed), src)); + ENSURE_GUI_THREAD (bind (mem_fun(*this, &GainMeter::meter_changed), src)); if ((r = dynamic_cast (&_io)) != 0) { diff --git a/gtk2_ardour/imageframe_socket_handler.cc b/gtk2_ardour/imageframe_socket_handler.cc index c007c02adb..2bc275bf5e 100644 --- a/gtk2_ardour/imageframe_socket_handler.cc +++ b/gtk2_ardour/imageframe_socket_handler.cc @@ -332,7 +332,7 @@ ImageFrameSocketHandler::send_imageframe_time_axis_removed(std::string track_id, void ImageFrameSocketHandler::send_imageframe_time_axis_renamed(std::string new_id, std::string old_id, void* src, ImageFrameTimeAxis* time_axis) { - // ENSURE_GUI_THREAD(SigC::bind (slot (*this, &ImageFrameSocketHandler::send_imageframe_time_axis_renamed), new_id, old_id, src, time_axis)); + // ENSURE_GUI_THREAD(SigC::bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_renamed), new_id, old_id, src, time_axis)); if(this == src || src == 0) { @@ -409,7 +409,7 @@ ImageFrameSocketHandler::send_marker_time_axis_removed(std::string track_id, voi void ImageFrameSocketHandler::send_marker_time_axis_renamed(std::string new_id, std::string old_id, void* src, MarkerTimeAxis* time_axis) { - // ENSURE_GUI_THREAD(bind (slot (*this, &ImageFrameSocketHandler::send_marker_time_axis_renamed), new_id, old_id, src, time_axis)); + // ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_marker_time_axis_renamed), new_id, old_id, src, time_axis)); if(this == src || src == 0) { @@ -492,7 +492,7 @@ ImageFrameSocketHandler::send_imageframe_time_axis_group_removed(std::string gro void ImageFrameSocketHandler::send_imageframe_time_axis_group_renamed(std::string new_id, std::string old_id, void* src, ImageFrameTimeAxisGroup* group) { - // ENSURE_GUI_THREAD(bind (slot (*this, &ImageFrameSocketHandler::send_imageframe_time_axis_group_renamed), new_id, old_id, src, group)); + // ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_group_renamed), new_id, old_id, src, group)); if(this == src || src == 0) { @@ -540,7 +540,7 @@ ImageFrameSocketHandler::send_imageframe_time_axis_group_renamed(std::string new void ImageFrameSocketHandler::send_imageframe_view_position_change(jack_nframes_t pos, void* src, ImageFrameView* item) { - // ENSURE_GUI_THREAD(bind (slot (*this, &ImageFrameSocketHandler::send_imageframe_view_position_change), pos, src, item)); + // ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_position_change), pos, src, item)); if(this == src || src == 0) { @@ -576,7 +576,7 @@ ImageFrameSocketHandler::send_imageframe_view_position_change(jack_nframes_t pos void ImageFrameSocketHandler::send_imageframe_view_duration_change(jack_nframes_t dur, void* src, ImageFrameView* item) { - // ENSURE_GUI_THREAD(bind (slot (*this, &ImageFrameSocketHandler::send_imageframe_view_duration_change), dur, src, item)); + // ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_duration_change), dur, src, item)); if(this == src || src == 0) { @@ -1164,8 +1164,8 @@ ImageFrameSocketHandler::handle_insert_imageframe_time_axis(const char* msg) if(new_tav) { ImageFrameTimeAxis* ifta = (ImageFrameTimeAxis*)new_tav ; - ifta->VisualTimeAxisRemoved.connect(SigC::slot(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_removed)) ; - ifta->NameChanged.connect(SigC::bind(SigC::slot(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_renamed), ifta)) ; + 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)) ; send_return_success() ; } @@ -1230,8 +1230,8 @@ ImageFrameSocketHandler::handle_insert_marker_time_axis(const char* msg) if(mta) { added = true ; - mta->VisualTimeAxisRemoved.connect(SigC::slot(*this, &ImageFrameSocketHandler::send_marker_time_axis_removed)) ; - mta->NameChanged.connect(SigC::bind(SigC::slot(*this, &ImageFrameSocketHandler::send_marker_time_axis_renamed), mta)) ; + mta->VisualTimeAxisRemoved.connect(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_marker_time_axis_removed)) ; + mta->NameChanged.connect(sigc::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_marker_time_axis_renamed), mta)) ; } } @@ -1295,8 +1295,8 @@ ImageFrameSocketHandler::handle_insert_imageframe_group(const char* msg) } else { - iftag->NameChanged.connect(SigC::bind(SigC::slot(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_group_renamed), iftag)) ; - iftag->GroupRemoved.connect(SigC::bind(SigC::slot(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_group_removed), iftag)) ; + iftag->NameChanged.connect(sigc::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_group_renamed), iftag)) ; + iftag->GroupRemoved.connect(sigc::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_group_removed), iftag)) ; send_return_success() ; } } @@ -1441,9 +1441,9 @@ ImageFrameSocketHandler::handle_insert_imageframe_view(const char* msg) ImageFrameView* ifv = iftag->add_imageframe_item(image_id, start, duration, rgb_img_buf, (uint32_t)imgWidth, (uint32_t)imgHeight, (uint32_t)imgChannels, this) ; if(ifv) { - ifv->PositionChanged.connect(SigC::bind(SigC::slot(*this, &ImageFrameSocketHandler::send_imageframe_view_position_change), ifv)) ; - ifv->DurationChanged.connect(SigC::bind(SigC::slot(*this, &ImageFrameSocketHandler::send_imageframe_view_duration_change), ifv)) ; - ifv->ItemRemoved.connect(SigC::bind(SigC::slot(*this, &ImageFrameSocketHandler::send_imageframe_view_removed), ifv)) ; + ifv->PositionChanged.connect(sigc::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_position_change), ifv)) ; + ifv->DurationChanged.connect(sigc::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_duration_change), ifv)) ; + ifv->ItemRemoved.connect(sigc::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_removed), ifv)) ; send_return_success() ; } diff --git a/gtk2_ardour/imageframe_time_axis.cc b/gtk2_ardour/imageframe_time_axis.cc index e8204a3e66..c31255db84 100644 --- a/gtk2_ardour/imageframe_time_axis.cc +++ b/gtk2_ardour/imageframe_time_axis.cc @@ -255,7 +255,7 @@ ImageFrameTimeAxis::build_display_menu() MenuList& items = display_menu->items(); - items.push_back (MenuElem (_("Rename"), slot(*this, &ImageFrameTimeAxis::start_time_axis_rename))); + items.push_back (MenuElem (_("Rename"), mem_fun(*this, &ImageFrameTimeAxis::start_time_axis_rename))); image_action_menu = new Menu() ; image_action_menu->set_name ("ArdourContextMenu"); @@ -263,10 +263,10 @@ ImageFrameTimeAxis::build_display_menu() items.push_back (SeparatorElem()); items.push_back (MenuElem (_("Height"), *size_menu)); - items.push_back (MenuElem (_("Color"), slot(*this, &ImageFrameTimeAxis::select_track_color))); + items.push_back (MenuElem (_("Color"), mem_fun(*this, &ImageFrameTimeAxis::select_track_color))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Remove"), bind(slot(*this, &VisualTimeAxis::remove_this_time_axis), (void*)this))) ; + items.push_back (MenuElem (_("Remove"), bind(mem_fun(*this, &VisualTimeAxis::remove_this_time_axis), (void*)this))) ; } /** @@ -292,14 +292,14 @@ ImageFrameTimeAxis::create_imageframe_menu() if(view) { - duration_items.push_back(MenuElem (_("0.5 seconds"), bind (slot (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 0.5))) ; - duration_items.push_back(MenuElem (_("1 seconds"), bind (slot (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 1.0))) ; - duration_items.push_back(MenuElem (_("1.5 seconds"), bind (slot (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 1.5))) ; - duration_items.push_back(MenuElem (_("2 seconds"), bind (slot (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 2.0))) ; - duration_items.push_back(MenuElem (_("2.5 seconds"), bind (slot (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 2.5))) ; - duration_items.push_back(MenuElem (_("3 seconds"), bind (slot (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 3.0))) ; + duration_items.push_back(MenuElem (_("0.5 seconds"), bind (mem_fun (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 0.5))) ; + duration_items.push_back(MenuElem (_("1 seconds"), bind (mem_fun (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 1.0))) ; + duration_items.push_back(MenuElem (_("1.5 seconds"), bind (mem_fun (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 1.5))) ; + duration_items.push_back(MenuElem (_("2 seconds"), bind (mem_fun (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 2.0))) ; + duration_items.push_back(MenuElem (_("2.5 seconds"), bind (mem_fun (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 2.5))) ; + duration_items.push_back(MenuElem (_("3 seconds"), bind (mem_fun (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 3.0))) ; //duration_items.push_back(SeparatorElem()) ; - //duration_items.push_back(MenuElem (_("custom"), slot (*this, &ImageFrameTimeAxis::set_imageframe_duration_custom))) ; + //duration_items.push_back(MenuElem (_("custom"), mem_fun(*this, &ImageFrameTimeAxis::set_imageframe_duration_custom))) ; } imageframe_sub_items.push_back(MenuElem(_("Duration (sec)"), *duration_menu)) ; @@ -307,11 +307,11 @@ ImageFrameTimeAxis::create_imageframe_menu() imageframe_sub_items.push_back(SeparatorElem()) ; if(view) { - imageframe_sub_items.push_back(MenuElem (_("Remove Frame"), bind(slot (view, &ImageFrameTimeAxisView::remove_selected_imageframe_item), (void*)this))) ; + imageframe_sub_items.push_back(MenuElem (_("Remove Frame"), bind(mem_fun (view, &ImageFrameTimeAxisView::remove_selected_imageframe_item), (void*)this))) ; } items.push_back(MenuElem(_("Image Frame"), *imageframe_item_menu)) ; - items.push_back(MenuElem (_("Rename Track"), slot (*this,&ImageFrameTimeAxis::start_time_axis_rename))) ; + items.push_back(MenuElem (_("Rename Track"), mem_fun(*this,&ImageFrameTimeAxis::start_time_axis_rename))) ; imageframe_menu->show_all() ; } @@ -342,7 +342,7 @@ ImageFrameTimeAxis::add_marker_time_axis(MarkerTimeAxis* marker_track, void* src else { marker_time_axis_list.push_back(marker_track) ; - marker_track->GoingAway.connect(bind(slot(*this, &ImageFrameTimeAxis::remove_time_axis_view), marker_track, (void*)this)); + marker_track->GoingAway.connect(bind(mem_fun(*this, &ImageFrameTimeAxis::remove_time_axis_view), marker_track, (void*)this)); MarkerTimeAxisAdded(marker_track, src) ; /* EMIT_SIGNAL */ ret = true ; @@ -412,7 +412,7 @@ ImageFrameTimeAxis::remove_named_marker_time_axis(std::string track_id, void* sr void ImageFrameTimeAxis::remove_time_axis_view(MarkerTimeAxis* mta, void* src) { - ENSURE_GUI_THREAD(bind (slot (*this, &ImageFrameTimeAxis::remove_time_axis_view), mta, src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameTimeAxis::remove_time_axis_view), mta, src)); MarkerTimeAxisList::iterator i; if((i = find (marker_time_axis_list.begin(), marker_time_axis_list.end(), mta)) != marker_time_axis_list.end()) diff --git a/gtk2_ardour/imageframe_time_axis_group.cc b/gtk2_ardour/imageframe_time_axis_group.cc index bde282be52..4c860f2a36 100644 --- a/gtk2_ardour/imageframe_time_axis_group.cc +++ b/gtk2_ardour/imageframe_time_axis_group.cc @@ -217,7 +217,7 @@ ImageFrameTimeAxisGroup::add_imageframe_item(std::string frame_id, jack_nframes_ imageframe_views.push_front(ifv) ; - ifv->GoingAway.connect(bind(slot (*this,&ImageFrameTimeAxisGroup::remove_imageframe_item), (void*)this)) ; + ifv->GoingAway.connect(bind(mem_fun(*this,&ImageFrameTimeAxisGroup::remove_imageframe_item), (void*)this)) ; ImageFrameAdded(ifv, src) ; /* EMIT_SIGNAL */ } @@ -331,7 +331,7 @@ ImageFrameTimeAxisGroup::remove_named_imageframe_item(std::string frame_id, void void ImageFrameTimeAxisGroup::remove_imageframe_item(ImageFrameView* ifv, void* src) { - ENSURE_GUI_THREAD(bind (slot (*this, &ImageFrameTimeAxisGroup::remove_imageframe_item), ifv, src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameTimeAxisGroup::remove_imageframe_item), ifv, src)); ImageFrameViewList::iterator i; if((i = find (imageframe_views.begin(), imageframe_views.end(), ifv)) != imageframe_views.end()) @@ -439,7 +439,7 @@ ImageFrameTimeAxisGroup::remove_this_group(void* src) defer to idle loop, otherwise we'll delete this object while we're still inside this function ... */ - Gtk::Main::idle.connect(bind(slot(&ImageFrameTimeAxisGroup::idle_remove_this_group), this, src)); + Gtk::Main::idle.connect(bind(mem_fun(&ImageFrameTimeAxisGroup::idle_remove_this_group), this, src)); } /** diff --git a/gtk2_ardour/imageframe_time_axis_view.cc b/gtk2_ardour/imageframe_time_axis_view.cc index 52726941fe..f2a2c9b5af 100644 --- a/gtk2_ardour/imageframe_time_axis_view.cc +++ b/gtk2_ardour/imageframe_time_axis_view.cc @@ -69,7 +69,7 @@ ImageFrameTimeAxisView::ImageFrameTimeAxisView (ImageFrameTimeAxis& tv) _samples_per_unit = _trackview.editor.get_current_zoom() ; - _trackview.editor.ZoomChanged.connect (slot (*this, &ImageFrameTimeAxisView::reset_samples_per_unit)) ; + _trackview.editor.ZoomChanged.connect (mem_fun(*this, &ImageFrameTimeAxisView::reset_samples_per_unit)) ; selected_imageframe_group = 0 ; selected_imageframe_view = 0 ; @@ -234,7 +234,7 @@ ImageFrameTimeAxisView::add_imageframe_group(std::string group_id, void* src) imageframe_groups.push_front(iftag) ; - iftag->GoingAway.connect(bind(slot (*this,&ImageFrameTimeAxisView::remove_imageframe_group), iftag, (void*)this)) ; + iftag->GoingAway.connect(bind(mem_fun(*this,&ImageFrameTimeAxisView::remove_imageframe_group), iftag, (void*)this)) ; ImageFrameGroupAdded(iftag, src) ; /* EMIT_SIGNAL */ } @@ -310,7 +310,7 @@ ImageFrameTimeAxisView::remove_named_imageframe_group(std::string group_id, void void ImageFrameTimeAxisView::remove_imageframe_group(ImageFrameTimeAxisGroup* iftag, void* src) { - ENSURE_GUI_THREAD(bind (slot (*this, &ImageFrameTimeAxisView::remove_imageframe_group), iftag, src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameTimeAxisView::remove_imageframe_group), iftag, src)); ImageFrameGroupList::iterator i; if((i = find (imageframe_groups.begin(), imageframe_groups.end(), iftag)) != imageframe_groups.end()) diff --git a/gtk2_ardour/imageframe_view.cc b/gtk2_ardour/imageframe_view.cc index 7e7f673c9d..8c0b75e71d 100644 --- a/gtk2_ardour/imageframe_view.cc +++ b/gtk2_ardour/imageframe_view.cc @@ -310,7 +310,7 @@ ImageFrameView::add_marker_view_item(MarkerView* item, void* src) { marker_view_list.push_back(item) ; - item->GoingAway.connect(bind(slot(*this, &ImageFrameView::remove_marker_view_item), (void*)this)); + item->GoingAway.connect(bind(mem_fun(*this, &ImageFrameView::remove_marker_view_item), (void*)this)); MarkerViewAdded(item, src) ; /* EMIT_SIGNAL */ } @@ -360,7 +360,7 @@ ImageFrameView::remove_named_marker_view_item(std::string markerId, void* src) void ImageFrameView::remove_marker_view_item(MarkerView* mv, void* src) { - ENSURE_GUI_THREAD(bind (slot (*this, &ImageFrameView::remove_marker_view_item), mv, src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameView::remove_marker_view_item), mv, src)); MarkerViewList::iterator i ; diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc index 1f461b2f2f..4f0bf4375f 100644 --- a/gtk2_ardour/io_selector.cc +++ b/gtk2_ardour/io_selector.cc @@ -87,15 +87,15 @@ IOSelectorWindow::IOSelectorWindow (Session& sess, IO& ior, bool input, bool can vbox.pack_start (_selector); vbox.pack_start (button_box, false, false); - ok_button.signal_clicked().connect (slot (*this, &IOSelectorWindow::accept)); - cancel_button.signal_clicked().connect (slot (*this, &IOSelectorWindow::cancel)); - rescan_button.signal_clicked().connect (slot (*this, &IOSelectorWindow::rescan)); + ok_button.signal_clicked().connect (mem_fun(*this, &IOSelectorWindow::accept)); + cancel_button.signal_clicked().connect (mem_fun(*this, &IOSelectorWindow::cancel)); + rescan_button.signal_clicked().connect (mem_fun(*this, &IOSelectorWindow::rescan)); set_title (title); set_position (Gtk::WIN_POS_MOUSE); add (vbox); - delete_event.connect (bind (slot (just_hide_it), reinterpret_cast (this))); + delete_event.connect (bind (ptr_fun (just_hide_it), reinterpret_cast (this))); } IOSelectorWindow::~IOSelectorWindow() @@ -234,18 +234,18 @@ IOSelector::IOSelector (Session& sess, IO& ior, bool input) rescan(); display_ports (); - clear_connections_button.signal_clicked().connect (slot (*this, &IOSelector::clear_connections)); + clear_connections_button.signal_clicked().connect (mem_fun(*this, &IOSelector::clear_connections)); - add_port_button.signal_clicked().connect (slot (*this, &IOSelector::add_port)); - remove_port_button.signal_clicked().connect (slot (*this, &IOSelector::remove_port)); + add_port_button.signal_clicked().connect (mem_fun(*this, &IOSelector::add_port)); + remove_port_button.signal_clicked().connect (mem_fun(*this, &IOSelector::remove_port)); if (for_input) { - io.input_changed.connect (slot (*this, &IOSelector::ports_changed)); + io.input_changed.connect (mem_fun(*this, &IOSelector::ports_changed)); } else { - io.output_changed.connect (slot (*this, &IOSelector::ports_changed)); + io.output_changed.connect (mem_fun(*this, &IOSelector::ports_changed)); } - io.name_changed.connect (slot (*this, &IOSelector::name_changed)); + io.name_changed.connect (mem_fun(*this, &IOSelector::name_changed)); } IOSelector::~IOSelector () @@ -255,7 +255,7 @@ IOSelector::~IOSelector () void IOSelector::name_changed (void* src) { - ENSURE_GUI_THREAD(bind (slot (*this, &IOSelector::name_changed), src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &IOSelector::name_changed), src)); display_ports (); } @@ -350,7 +350,7 @@ IOSelector::rescan () } client_port_display->columns_autosize (); - client_port_display->select_row.connect (bind (slot (*this, &IOSelector::port_selection_handler), client_port_display)); + client_port_display->select_row.connect (bind (mem_fun(*this, &IOSelector::port_selection_handler), client_port_display)); Label *tab_label = manage (new Label); @@ -361,7 +361,7 @@ IOSelector::rescan () } notebook.set_page (current_page); - notebook.show.connect (bind (slot (notebook, &Notebook::set_page), current_page)); + notebook.show.connect (bind (mem_fun (notebook, &Notebook::set_page), current_page)); selector_box.show_all (); } @@ -447,7 +447,7 @@ IOSelector::display_ports () } B->button_release_event.connect - (bind (slot (*this, &IOSelector::port_column_button_release), clist)); + (bind (mem_fun(*this, &IOSelector::port_column_button_release), clist)); } else { @@ -461,7 +461,7 @@ IOSelector::display_ports () } B->button_release_event.connect - (bind (slot (*this, &IOSelector::port_column_button_release), clist)); + (bind (mem_fun(*this, &IOSelector::port_column_button_release), clist)); } clist->set_name ("IOSelectorPortList"); @@ -488,7 +488,7 @@ IOSelector::display_ports () } clist->columns_autosize (); - clist->button_release_event.connect (bind (slot (*this, &IOSelector::connection_click), clist)); + clist->button_release_event.connect (bind (mem_fun(*this, &IOSelector::connection_click), clist)); } port_box.show_all (); @@ -545,7 +545,7 @@ IOSelector::port_selection_handler (gint row, gint col, GdkEvent *ev, Gtk::CList void IOSelector::ports_changed (IOChange change, void *src) { - ENSURE_GUI_THREAD(bind (slot (*this, &IOSelector::ports_changed), change, src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &IOSelector::ports_changed), change, src)); display_ports (); } @@ -646,7 +646,7 @@ IOSelector::port_column_button_release (GdkEventButton *event, CList *clist) for whom we are handling an event. not good. */ - Gtk::Main::idle.connect (bind (slot (*this, &IOSelector::remove_port_when_idle), port)); + Gtk::Main::idle.connect (bind (mem_fun(*this, &IOSelector::remove_port_when_idle), port)); } else { select_clist(clist); @@ -812,18 +812,18 @@ PortInsertWindow::PortInsertWindow (Session& sess, PortInsert& pi, bool can_canc add (vbox); - ok_button.signal_clicked().connect (slot (*this, &PortInsertWindow::accept)); - cancel_button.signal_clicked().connect (slot (*this, &PortInsertWindow::cancel)); - rescan_button.signal_clicked().connect (slot (*this, &PortInsertWindow::rescan)); + ok_button.signal_clicked().connect (mem_fun(*this, &PortInsertWindow::accept)); + cancel_button.signal_clicked().connect (mem_fun(*this, &PortInsertWindow::cancel)); + rescan_button.signal_clicked().connect (mem_fun(*this, &PortInsertWindow::rescan)); - delete_event.connect (bind (slot (just_hide_it), reinterpret_cast (this))); - pi.GoingAway.connect (slot (*this, &PortInsertWindow::plugin_going_away)); + delete_event.connect (bind (ptr_fun (just_hide_it), reinterpret_cast (this))); + pi.GoingAway.connect (mem_fun(*this, &PortInsertWindow::plugin_going_away)); } void PortInsertWindow::plugin_going_away (ARDOUR::Redirect* ignored) { - ENSURE_GUI_THREAD(bind (slot (*this, &PortInsertWindow::plugin_going_away), ignored)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &PortInsertWindow::plugin_going_away), ignored)); delete_when_idle (this); } diff --git a/gtk2_ardour/keyboard.cc b/gtk2_ardour/keyboard.cc index e0d2314b2f..cf127f82cf 100644 --- a/gtk2_ardour/keyboard.cc +++ b/gtk2_ardour/keyboard.cc @@ -80,7 +80,7 @@ Keyboard::Keyboard () /* some global key actions */ - KeyboardTarget::add_action ("close-dialog", slot (*this, &Keyboard::close_current_dialog)); + KeyboardTarget::add_action ("close-dialog", mem_fun(*this, &Keyboard::close_current_dialog)); XMLNode* node = ARDOUR_UI::instance()->keyboard_settings(); set_state (*node); @@ -849,17 +849,17 @@ Keyboard::register_target (KeyboardTarget *kt) return; } - kt->window().enter_notify_event.connect (bind (slot (*this, &Keyboard::enter_window), kt)); - kt->window().leave_notify_event.connect (slot (*this, &Keyboard::leave_window)); + kt->window().enter_notify_event.connect (bind (mem_fun(*this, &Keyboard::enter_window), kt)); + kt->window().leave_notify_event.connect (mem_fun(*this, &Keyboard::leave_window)); - kt->GoingAway.connect (bind (slot (*this, &Keyboard::maybe_unset_target), kt)); - kt->Hiding.connect (bind (slot (*this, &Keyboard::maybe_unset_target), kt)); + kt->GoingAway.connect (bind (mem_fun(*this, &Keyboard::maybe_unset_target), kt)); + kt->Hiding.connect (bind (mem_fun(*this, &Keyboard::maybe_unset_target), kt)); } void Keyboard::set_current_dialog (ArdourDialog* dialog) { - ENSURE_GUI_THREAD(bind (slot (*this, &Keyboard::set_current_dialog), dialog)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Keyboard::set_current_dialog), dialog)); current_dialog = dialog; @@ -868,13 +868,13 @@ Keyboard::set_current_dialog (ArdourDialog* dialog) if (find (known_dialogs.begin(), known_dialogs.end(), dialog) == known_dialogs.end()) { current_dialog->GoingAway.connect - (bind (slot (*this, &Keyboard::set_current_dialog), + (bind (mem_fun(*this, &Keyboard::set_current_dialog), reinterpret_cast(0))); current_dialog->Hiding.connect - (bind (slot (*this, &Keyboard::set_current_dialog), + (bind (mem_fun(*this, &Keyboard::set_current_dialog), reinterpret_cast(0))); - current_dialog->unmap_event.connect (slot (*this, &Keyboard::current_dialog_vanished)); + current_dialog->unmap_event.connect (mem_fun(*this, &Keyboard::current_dialog_vanished)); known_dialogs.push_back (dialog); } diff --git a/gtk2_ardour/library_ui.cc b/gtk2_ardour/library_ui.cc index 57503519c0..e3afc50547 100644 --- a/gtk2_ardour/library_ui.cc +++ b/gtk2_ardour/library_ui.cc @@ -89,17 +89,17 @@ SoundFileSelector::SoundFileSelector () split_channels.set_active(false); split_channels.set_sensitive (false); - delete_event.connect (slot (*this, &ArdourDialog::wm_close_event)); + delete_event.connect (mem_fun(*this, &ArdourDialog::wm_close_event)); - import_btn.signal_clicked().connect (slot (*this, &SoundFileSelector::import_btn_clicked)); + import_btn.signal_clicked().connect (mem_fun(*this, &SoundFileSelector::import_btn_clicked)); - sfdb_tree.group_selected.connect (slot(*this, &SoundFileSelector::sfdb_group_selected)); - sfdb_tree.member_selected.connect (bind (slot(*this, &SoundFileSelector::member_selected), true)); - sf_browser.member_selected.connect (bind (slot(*this, &SoundFileSelector::member_selected), false)); - sf_browser.member_deselected.connect (bind (slot(*this, &SoundFileSelector::member_deselected), false)); - sfdb_tree.deselected.connect (slot(*this, &SoundFileSelector::sfdb_deselected)); - sf_browser.group_selected.connect (slot(*this, &SoundFileSelector::browser_group_selected)); - notebook.switch_page.connect (slot(*this, &SoundFileSelector::page_switched)); + sfdb_tree.group_selected.connect (mem_fun(*this, &SoundFileSelector::sfdb_group_selected)); + sfdb_tree.member_selected.connect (bind (mem_fun(*this, &SoundFileSelector::member_selected), true)); + sf_browser.member_selected.connect (bind (mem_fun(*this, &SoundFileSelector::member_selected), false)); + sf_browser.member_deselected.connect (bind (mem_fun(*this, &SoundFileSelector::member_deselected), false)); + sfdb_tree.deselected.connect (mem_fun(*this, &SoundFileSelector::sfdb_deselected)); + sf_browser.group_selected.connect (mem_fun(*this, &SoundFileSelector::browser_group_selected)); + notebook.switch_page.connect (mem_fun(*this, &SoundFileSelector::page_switched)); } SoundFileSelector::~SoundFileSelector() @@ -343,9 +343,9 @@ SoundFileBrowser::SoundFileBrowser() pack_start(*vbox, true, true); - dir_list->select_row.connect(slot (*this, &SoundFileBrowser::dir_list_selected)); - file_list->select_row.connect(slot (*this, &SoundFileBrowser::file_list_selected)); - file_list->unselect_row.connect(slot (*this, &SoundFileBrowser::file_list_deselected)); + dir_list->select_row.connect(mem_fun(*this, &SoundFileBrowser::dir_list_selected)); + file_list->select_row.connect(mem_fun(*this, &SoundFileBrowser::file_list_selected)); + file_list->unselect_row.connect(mem_fun(*this, &SoundFileBrowser::file_list_deselected)); dir_list->set_name("SoundFileBrowserList"); file_list->set_name("SoundFileBrowserList"); @@ -453,23 +453,23 @@ LibraryTree::LibraryTree () remove_btn.set_sensitive (false); - add_btn.signal_clicked().connect (slot (*this, &LibraryTree::add_btn_clicked)); - folder_btn.signal_clicked().connect (slot(*this, &LibraryTree::folder_btn_clicked)); - remove_btn.signal_clicked().connect (slot(*this, &LibraryTree::remove_btn_clicked)); - find_btn.signal_clicked().connect (slot (*this, &LibraryTree::find_btn_clicked)); + add_btn.signal_clicked().connect (mem_fun(*this, &LibraryTree::add_btn_clicked)); + folder_btn.signal_clicked().connect (mem_fun(*this, &LibraryTree::folder_btn_clicked)); + remove_btn.signal_clicked().connect (mem_fun(*this, &LibraryTree::remove_btn_clicked)); + find_btn.signal_clicked().connect (mem_fun(*this, &LibraryTree::find_btn_clicked)); files_select.hide_fileop_buttons(); files_select.set_filename("/"); - files_select.get_ok_button()-.signal_clicked().connect (slot ( *this, + files_select.get_ok_button()-.signal_clicked().connect (mem_fun ( *this, &LibraryTree::file_ok_clicked)); - files_select.get_cancel_button()-.signal_clicked().connect (slot ( *this, + files_select.get_cancel_button()-.signal_clicked().connect (mem_fun ( *this, &LibraryTree::file_cancel_clicked)); - Library->added_group.connect (slot (*this, &LibraryTree::added_group)); - Library->removed_group.connect (slot (*this, &LibraryTree::removed_group)); - Library->added_member.connect (slot (*this, &LibraryTree::added_member)); - Library->removed_member.connect (slot (*this, &LibraryTree::removed_member)); + Library->added_group.connect (mem_fun(*this, &LibraryTree::added_group)); + Library->removed_group.connect (mem_fun(*this, &LibraryTree::removed_group)); + Library->added_member.connect (mem_fun(*this, &LibraryTree::added_member)); + Library->removed_member.connect (mem_fun(*this, &LibraryTree::removed_member)); current_group = ""; current_member = ""; @@ -495,7 +495,7 @@ void LibraryTree::added_group (string group, string parent) { using namespace Gtk; - ENSURE_GUI_THREAD(bind (slot (*this, &LibraryTree::added_group), group, parent)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &LibraryTree::added_group), group, parent)); Tree* parent_tree; if (parent.length()) { @@ -527,7 +527,7 @@ LibraryTree::added_group (string group, string parent) item->set_subtree (*subtree); item->expand(); - item->select.connect (bind(slot(*this,&LibraryTree::cb_group_select), item, group)); + item->select.connect (bind(mem_fun(*this,&LibraryTree::cb_group_select), item, group)); uri_mapping.insert(map::value_type(group, item)); uri_parent.insert(map::value_type(group, parent)); @@ -543,7 +543,7 @@ LibraryTree::added_group (string group, string parent) void LibraryTree::removed_group (string group) { - ENSURE_GUI_THREAD(bind (slot (*this, &LibraryTree::removed_group), group)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &LibraryTree::removed_group), group)); Gtk::TreeItem* group_item = uri_mapping[group]; @@ -568,7 +568,7 @@ LibraryTree::added_member (string member, string parent) { using namespace Gtk; - ENSURE_GUI_THREAD(bind (slot (*this, &LibraryTree::added_member), member, parent)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &LibraryTree::added_member), member, parent)); Tree* parent_tree; if (parent.length()) { @@ -596,9 +596,9 @@ LibraryTree::added_member (string member, string parent) parent_tree->tree().insert (i, *item); item->select.connect - (bind(slot(*this,&LibraryTree::cb_member_select), item, member)); + (bind(mem_fun(*this,&LibraryTree::cb_member_select), item, member)); item->deselect.connect - (bind(slot(*this,&LibraryTree::cb_member_deselect), item, member)); + (bind(mem_fun(*this,&LibraryTree::cb_member_deselect), item, member)); uri_mapping.insert(map::value_type(member, item)); uri_parent.insert(map::value_type(member, parent)); @@ -613,7 +613,7 @@ LibraryTree::added_member (string member, string parent) void LibraryTree::removed_member (string member) { - ENSURE_GUI_THREAD(bind (slot (*this, &LibraryTree::removed_member), member)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &LibraryTree::removed_member), member)); Gtk::TreeItem* member_item = uri_mapping[member]; @@ -660,7 +660,7 @@ LibraryTree::subpopulate (Gtk::Tree* tree, string group) uri_parent.insert(map::value_type(*i, group)); item->select.connect - (bind(slot(*this,&LibraryTree::cb_group_select), item, *i)); + (bind(mem_fun(*this,&LibraryTree::cb_group_select), item, *i)); subpopulate (subtree, *i); subtree->show(); @@ -679,9 +679,9 @@ LibraryTree::subpopulate (Gtk::Tree* tree, string group) uri_parent.insert(map::value_type(*i, group)); item->select.connect - (bind(slot(*this,&LibraryTree::cb_member_select), item, *i)); + (bind(mem_fun(*this,&LibraryTree::cb_member_select), item, *i)); item->deselect.connect - (bind(slot(*this,&LibraryTree::cb_member_deselect), item, *i)); + (bind(mem_fun(*this,&LibraryTree::cb_member_deselect), item, *i)); } } @@ -721,7 +721,7 @@ LibraryTree::file_ok_clicked () main_box->pack_start(*bar); Gtk::Button* cancel_btn = manage(new Gtk::Button(_("Cancel"))); main_box->pack_start(*cancel_btn); - cancel_btn-.signal_clicked().connect (slot (*this, &LibraryTree::cancel_import_clicked)); + cancel_btn-.signal_clicked().connect (mem_fun(*this, &LibraryTree::cancel_import_clicked)); progress_win->show_all(); clone_ftw((void*)file); @@ -817,7 +817,7 @@ LibraryTree::find_btn_clicked () { SearchSounds* search = new SearchSounds (); - search->file_chosen.connect(slot (*this, &LibraryTree::file_found)); + search->file_chosen.connect(mem_fun(*this, &LibraryTree::file_found)); search->show_all(); } @@ -1014,26 +1014,26 @@ SoundFileBox::SoundFileBox (string uri, bool meta) bottom_box.pack_start(play_btn); bottom_box.pack_start(stop_btn); - play_btn.signal_clicked().connect (slot (*this, &SoundFileBox::play_btn_clicked)); - stop_btn.signal_clicked().connect (slot (*this, &SoundFileBox::stop_btn_clicked)); + play_btn.signal_clicked().connect (mem_fun(*this, &SoundFileBox::play_btn_clicked)); + stop_btn.signal_clicked().connect (mem_fun(*this, &SoundFileBox::stop_btn_clicked)); PublicEditor& edit = ARDOUR_UI::instance()->the_editor(); ARDOUR::Session* sess = edit.current_session(); if (!sess) { play_btn.set_sensitive(false); } else { - sess->AuditionActive.connect(slot (*this, &SoundFileBox::audition_status_changed)); + sess->AuditionActive.connect(mem_fun(*this, &SoundFileBox::audition_status_changed)); } add_field_btn.signal_clicked().connect - (slot (*this, &SoundFileBox::add_field_clicked)); + (mem_fun(*this, &SoundFileBox::add_field_clicked)); remove_field_btn.signal_clicked().connect - (slot (*this, &SoundFileBox::remove_field_clicked)); + (mem_fun(*this, &SoundFileBox::remove_field_clicked)); - fields.selection_made.connect (slot (*this, &SoundFileBox::field_selected)); - fields.choice_made.connect (slot (*this, &SoundFileBox::field_chosen)); + fields.selection_made.connect (mem_fun(*this, &SoundFileBox::field_selected)); + fields.choice_made.connect (mem_fun(*this, &SoundFileBox::field_chosen)); - Library->fields_changed.connect (slot (*this, &SoundFileBox::setup_fields)); + Library->fields_changed.connect (mem_fun(*this, &SoundFileBox::setup_fields)); if (setup_labels (uri)) { throw failed_constructor(); @@ -1117,8 +1117,8 @@ SoundFileBox::setup_labels (string uri) path_entry.set_text (file); path_entry.set_position (-1); - path_entry.signal_focus_in_event().connect (slot (ARDOUR_UI::generic_focus_in_event)); - path_entry.signal_focus_out_event().connect (slot (ARDOUR_UI::generic_focus_out_event)); + path_entry.signal_focus_in_event().connect (ptr_fun (ARDOUR_UI::generic_focus_in_event)); + path_entry.signal_focus_out_event().connect (ptr_fun (ARDOUR_UI::generic_focus_out_event)); length.set_alignment (0.0f, 0.0f); length.set_text (compose("Length: %1", length2string(sf_info->frames, sf_info->samplerate))); @@ -1211,7 +1211,7 @@ void SoundFileBox::audition_status_changed (bool active) { if (!active) { - Gtkmm2ext::UI::instance()->call_slot( slot(*this, &SoundFileBox::stop_btn_clicked)); + Gtkmm2ext::UI::instance()->call_slot( mem_fun(*this, &SoundFileBox::stop_btn_clicked)); } } @@ -1248,7 +1248,7 @@ SoundFileBox::remove_field_clicked () void SoundFileBox::setup_fields () { - ENSURE_GUI_THREAD(slot (*this, &SoundFileBox::setup_fields)); + ENSURE_GUI_THREAD(mem_fun(*this, &SoundFileBox::setup_fields)); fields.rescan(); } @@ -1317,10 +1317,10 @@ SearchSounds::SearchSounds () main_box.pack_start(rbtn_box, false, false); main_box.pack_start(bottom_box, false, false); - delete_event.connect (slot (*this, &ArdourDialog::wm_doi_event)); + delete_event.connect (mem_fun(*this, &ArdourDialog::wm_doi_event)); - find_btn.signal_clicked().connect (slot (*this, &SearchSounds::find_btn_clicked)); - fields.selection_made.connect (slot + find_btn.signal_clicked().connect (mem_fun(*this, &SearchSounds::find_btn_clicked)); + fields.selection_made.connect (mem_fun (*this, &SearchSounds::field_selected)); show_all(); @@ -1406,7 +1406,7 @@ SearchSounds::find_btn_clicked () results = new SearchResults(search_info, false); } - results->file_chosen.connect (slot (*this, &SearchSounds::file_found)); + results->file_chosen.connect (mem_fun(*this, &SearchSounds::file_found)); results->show_all(); } @@ -1460,11 +1460,11 @@ SearchResults::SearchResults (map field_values, bool and_search) multichan_check.set_active(true); multichan_check.set_sensitive(false); - delete_event.connect (slot (*this, &ArdourDialog::wm_doi_event)); + delete_event.connect (mem_fun(*this, &ArdourDialog::wm_doi_event)); - import_btn.signal_clicked().connect (slot (*this, &SearchResults::import_clicked)); + import_btn.signal_clicked().connect (mem_fun(*this, &SearchResults::import_clicked)); - results.choice_made.connect (slot (*this, &SearchResults::result_chosen)); + results.choice_made.connect (mem_fun(*this, &SearchResults::result_chosen)); show_all(); } diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index 919eca78e4..f54f6404a7 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -107,20 +107,20 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num) cd_track_details_hbox.pack_start (composer_label, false, false); cd_track_details_hbox.pack_start (composer_entry, true, true); - isrc_entry.changed.connect (slot (*this, &LocationEditRow::isrc_entry_changed)); - isrc_entry.signal_focus_in_event().connect (slot (*this, &LocationEditRow::entry_focus_event)); - isrc_entry.signal_focus_out_event().connect (slot (*this, &LocationEditRow::entry_focus_event)); + isrc_entry.changed.connect (mem_fun(*this, &LocationEditRow::isrc_entry_changed)); + isrc_entry.signal_focus_in_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event)); + isrc_entry.signal_focus_out_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event)); - performer_entry.changed.connect (slot (*this, &LocationEditRow::performer_entry_changed)); - performer_entry.signal_focus_in_event().connect (slot (*this, &LocationEditRow::entry_focus_event)); - performer_entry.signal_focus_out_event().connect (slot (*this, &LocationEditRow::entry_focus_event)); + performer_entry.changed.connect (mem_fun(*this, &LocationEditRow::performer_entry_changed)); + performer_entry.signal_focus_in_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event)); + performer_entry.signal_focus_out_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event)); - composer_entry.changed.connect (slot (*this, &LocationEditRow::composer_entry_changed)); - composer_entry.signal_focus_in_event().connect (slot (*this, &LocationEditRow::entry_focus_event)); - composer_entry.signal_focus_out_event().connect (slot (*this, &LocationEditRow::entry_focus_event)); + composer_entry.changed.connect (mem_fun(*this, &LocationEditRow::composer_entry_changed)); + composer_entry.signal_focus_in_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event)); + composer_entry.signal_focus_out_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event)); - scms_check_button.toggled.connect(slot (*this, &LocationEditRow::scms_toggled)); - preemph_check_button.toggled.connect(slot (*this, &LocationEditRow::preemph_toggled)); + scms_check_button.toggled.connect(mem_fun(*this, &LocationEditRow::scms_toggled)); + preemph_check_button.toggled.connect(mem_fun(*this, &LocationEditRow::preemph_toggled)); set_session (sess); @@ -135,9 +135,9 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num) item_table.attach (start_hbox, 2, 3, 0, 1, 0, 0, 4, 0); - start_set_button.clicked.connect( bind ( slot (*this, &LocationEditRow::set_button_pressed), LocStart)); - start_go_button.clicked.connect( bind ( slot (*this, &LocationEditRow::go_button_pressed), LocStart)); - start_clock.ValueChanged.connect (bind ( slot (*this, &LocationEditRow::clock_changed), LocStart)); + start_set_button.clicked.connect( bind ( mem_fun(*this, &LocationEditRow::set_button_pressed), LocStart)); + start_go_button.clicked.connect( bind ( mem_fun(*this, &LocationEditRow::go_button_pressed), LocStart)); + start_clock.ValueChanged.connect (bind ( mem_fun(*this, &LocationEditRow::clock_changed), LocStart)); end_hbox.pack_start (end_go_button, false, false); @@ -146,21 +146,21 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num) //item_table.attach (end_hbox, 2, 3, 0, 1, 0, 0, 4, 0); - end_set_button.clicked.connect( bind ( slot (*this, &LocationEditRow::set_button_pressed), LocEnd)); - end_go_button.clicked.connect( bind ( slot (*this, &LocationEditRow::go_button_pressed), LocEnd)); - end_clock.ValueChanged.connect (bind ( slot (*this, &LocationEditRow::clock_changed), LocEnd)); + end_set_button.clicked.connect( bind ( mem_fun(*this, &LocationEditRow::set_button_pressed), LocEnd)); + end_go_button.clicked.connect( bind ( mem_fun(*this, &LocationEditRow::go_button_pressed), LocEnd)); + end_clock.ValueChanged.connect (bind ( mem_fun(*this, &LocationEditRow::clock_changed), LocEnd)); // item_table.attach (length_clock, 3, 4, 0, 1, 0, 0, 4, 0); - length_clock.ValueChanged.connect (bind ( slot (*this, &LocationEditRow::clock_changed), LocLength)); + length_clock.ValueChanged.connect (bind ( mem_fun(*this, &LocationEditRow::clock_changed), LocLength)); // item_table.attach (cd_check_button, 4, 5, 0, 1, 0, Gtk::FILL, 4, 0); // item_table.attach (hide_check_button, 5, 6, 0, 1, 0, Gtk::FILL, 4, 0); // item_table.attach (remove_button, 7, 8, 0, 1, 0, Gtk::FILL, 4, 0); - cd_check_button.toggled.connect(slot (*this, &LocationEditRow::cd_toggled)); - hide_check_button.toggled.connect(slot (*this, &LocationEditRow::hide_toggled)); + cd_check_button.toggled.connect(mem_fun(*this, &LocationEditRow::cd_toggled)); + hide_check_button.toggled.connect(mem_fun(*this, &LocationEditRow::hide_toggled)); - remove_button.clicked.connect(slot (*this, &LocationEditRow::remove_button_pressed)); + remove_button.clicked.connect(mem_fun(*this, &LocationEditRow::remove_button_pressed)); pack_start(item_table, true, true); @@ -239,9 +239,9 @@ LocationEditRow::set_location (Location *loc) name_entry.set_text (location->name()); name_entry.set_size_request (100, -1); name_entry.set_editable (true); - name_entry.changed.connect (slot (*this, &LocationEditRow::name_entry_changed)); - name_entry.signal_focus_in_event().connect (slot (*this, &LocationEditRow::entry_focus_event)); - name_entry.signal_focus_out_event().connect (slot (*this, &LocationEditRow::entry_focus_event)); + name_entry.changed.connect (mem_fun(*this, &LocationEditRow::name_entry_changed)); + name_entry.signal_focus_in_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event)); + name_entry.signal_focus_out_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event)); if (!name_entry.get_parent()) { item_table.attach (name_entry, 1, 2, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL, 4, 0); @@ -294,11 +294,11 @@ LocationEditRow::set_location (Location *loc) length_clock.hide(); } - start_changed_connection = location->start_changed.connect (slot (*this, &LocationEditRow::start_changed)); - end_changed_connection = location->end_changed.connect (slot (*this, &LocationEditRow::end_changed)); - name_changed_connection = location->name_changed.connect (slot (*this, &LocationEditRow::name_changed)); - changed_connection = location->changed.connect (slot (*this, &LocationEditRow::location_changed)); - flags_changed_connection = location->FlagsChanged.connect (slot (*this, &LocationEditRow::flags_changed)); + start_changed_connection = location->start_changed.connect (mem_fun(*this, &LocationEditRow::start_changed)); + end_changed_connection = location->end_changed.connect (mem_fun(*this, &LocationEditRow::end_changed)); + name_changed_connection = location->name_changed.connect (mem_fun(*this, &LocationEditRow::name_changed)); + changed_connection = location->changed.connect (mem_fun(*this, &LocationEditRow::location_changed)); + flags_changed_connection = location->FlagsChanged.connect (mem_fun(*this, &LocationEditRow::flags_changed)); } @@ -317,7 +317,7 @@ LocationEditRow::entry_focus_event (GdkEventFocus* ev) void LocationEditRow::name_entry_changed () { - ENSURE_GUI_THREAD(slot (*this, &LocationEditRow::name_entry_changed)); + ENSURE_GUI_THREAD(mem_fun(*this, &LocationEditRow::name_entry_changed)); if (i_am_the_modifier || !location) return; location->set_name (name_entry.get_text()); @@ -327,7 +327,7 @@ LocationEditRow::name_entry_changed () void LocationEditRow::isrc_entry_changed () { - ENSURE_GUI_THREAD(slot (*this, &LocationEditRow::isrc_entry_changed)); + ENSURE_GUI_THREAD(mem_fun(*this, &LocationEditRow::isrc_entry_changed)); if (i_am_the_modifier || !location) return; @@ -343,7 +343,7 @@ LocationEditRow::isrc_entry_changed () void LocationEditRow::performer_entry_changed () { - ENSURE_GUI_THREAD(slot (*this, &LocationEditRow::performer_entry_changed)); + ENSURE_GUI_THREAD(mem_fun(*this, &LocationEditRow::performer_entry_changed)); if (i_am_the_modifier || !location) return; @@ -357,7 +357,7 @@ LocationEditRow::performer_entry_changed () void LocationEditRow::composer_entry_changed () { - ENSURE_GUI_THREAD(slot (*this, &LocationEditRow::composer_entry_changed)); + ENSURE_GUI_THREAD(mem_fun(*this, &LocationEditRow::composer_entry_changed)); if (i_am_the_modifier || !location) return; @@ -510,7 +510,7 @@ LocationEditRow::preemph_toggled () void LocationEditRow::end_changed (ARDOUR::Location *loc) { - ENSURE_GUI_THREAD(bind (slot (*this, &LocationEditRow::end_changed), loc)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationEditRow::end_changed), loc)); if (!location) return; @@ -526,7 +526,7 @@ LocationEditRow::end_changed (ARDOUR::Location *loc) void LocationEditRow::start_changed (ARDOUR::Location *loc) { - ENSURE_GUI_THREAD(bind (slot (*this, &LocationEditRow::start_changed), loc)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationEditRow::start_changed), loc)); if (!location) return; @@ -541,7 +541,7 @@ LocationEditRow::start_changed (ARDOUR::Location *loc) void LocationEditRow::name_changed (ARDOUR::Location *loc) { - ENSURE_GUI_THREAD(bind (slot (*this, &LocationEditRow::name_changed), loc)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationEditRow::name_changed), loc)); if (!location) return; @@ -558,7 +558,7 @@ LocationEditRow::name_changed (ARDOUR::Location *loc) void LocationEditRow::location_changed (ARDOUR::Location *loc) { - ENSURE_GUI_THREAD(bind (slot (*this, &LocationEditRow::location_changed), loc)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationEditRow::location_changed), loc)); if (!location) return; @@ -575,7 +575,7 @@ LocationEditRow::location_changed (ARDOUR::Location *loc) void LocationEditRow::flags_changed (ARDOUR::Location *loc, void *src) { - ENSURE_GUI_THREAD(bind (slot (*this, &LocationEditRow::flags_changed), loc, src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationEditRow::flags_changed), loc, src)); if (!location) return; @@ -598,7 +598,7 @@ LocationUI::LocationUI () set_wmclass(_("ardour_locations"), "Ardour"); set_name ("LocationWindow"); - delete_event.connect (bind (slot (just_hide_it), static_cast(this))); + delete_event.connect (bind (ptr_fun (just_hide_it), static_cast(this))); add (location_hpacker); @@ -653,8 +653,8 @@ LocationUI::LocationUI () location_hpacker.pack_start (location_vpacker, true, true); - add_location_button.signal_clicked().connect (slot (*this, &LocationUI::add_new_location)); - add_range_button.signal_clicked().connect (slot (*this, &LocationUI::add_new_range)); + add_location_button.signal_clicked().connect (mem_fun(*this, &LocationUI::add_new_location)); + add_range_button.signal_clicked().connect (mem_fun(*this, &LocationUI::add_new_range)); //add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::BUTTON_RELEASE_MASK); @@ -692,7 +692,7 @@ void LocationUI::location_remove_requested (ARDOUR::Location *loc) // must do this to prevent problems when destroying // the effective sender of this event - Main::idle.connect (bind (slot (*this, &LocationUI::do_location_remove), loc)); + Main::idle.connect (bind (mem_fun(*this, &LocationUI::do_location_remove), loc)); } @@ -708,7 +708,7 @@ void LocationUI::location_redraw_ranges () void LocationUI::location_added (Location* location) { - ENSURE_GUI_THREAD(bind (slot (*this, &LocationUI::location_added), location)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationUI::location_added), location)); if (location->is_auto_punch()) { punch_edit_row.set_location(location); @@ -724,7 +724,7 @@ LocationUI::location_added (Location* location) void LocationUI::location_removed (Location* location) { - ENSURE_GUI_THREAD(bind (slot (*this, &LocationUI::location_removed), location)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationUI::location_removed), location)); if (location->is_auto_punch()) { punch_edit_row.set_location(0); @@ -767,8 +767,8 @@ LocationUI::map_locations (Locations::LocationList& locations) if (location->is_mark()) { mark_n++; erow = manage (new LocationEditRow(session, location, mark_n)); - erow->remove_requested.connect (slot (*this, &LocationUI::location_remove_requested)); - erow->redraw_ranges.connect (slot (*this, &LocationUI::location_redraw_ranges)); + erow->remove_requested.connect (mem_fun(*this, &LocationUI::location_remove_requested)); + erow->redraw_ranges.connect (mem_fun(*this, &LocationUI::location_redraw_ranges)); loc_children.push_back(Box_Helpers::Element(*erow, false, false, 1)); } else if (location->is_auto_punch()) { @@ -781,7 +781,7 @@ LocationUI::map_locations (Locations::LocationList& locations) } else { erow = manage (new LocationEditRow(session, location)); - erow->remove_requested.connect (slot (*this, &LocationUI::location_remove_requested)); + erow->remove_requested.connect (mem_fun(*this, &LocationUI::location_remove_requested)); range_children.push_back(Box_Helpers::Element(*erow, false, false, 1)); } } @@ -823,7 +823,7 @@ LocationUI::add_new_range() void LocationUI::refresh_location_list_s (Change ignored) { - ENSURE_GUI_THREAD(bind (slot (*this, &LocationUI::refresh_location_list_s), ignored)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationUI::refresh_location_list_s), ignored)); refresh_location_list (); } @@ -831,7 +831,7 @@ LocationUI::refresh_location_list_s (Change ignored) void LocationUI::refresh_location_list () { - ENSURE_GUI_THREAD(slot (*this, &LocationUI::refresh_location_list)); + ENSURE_GUI_THREAD(mem_fun(*this, &LocationUI::refresh_location_list)); using namespace Box_Helpers; BoxList & loc_children = location_rows.children(); @@ -852,11 +852,11 @@ LocationUI::set_session(ARDOUR::Session* sess) ArdourDialog::set_session (sess); if (session) { - session->locations()->changed.connect (slot (*this, &LocationUI::refresh_location_list)); - session->locations()->StateChanged.connect (slot (*this, &LocationUI::refresh_location_list_s)); - session->locations()->added.connect (slot (*this, &LocationUI::location_added)); - session->locations()->removed.connect (slot (*this, &LocationUI::location_removed)); - session->going_away.connect (slot (*this, &LocationUI::session_gone)); + session->locations()->changed.connect (mem_fun(*this, &LocationUI::refresh_location_list)); + session->locations()->StateChanged.connect (mem_fun(*this, &LocationUI::refresh_location_list_s)); + session->locations()->added.connect (mem_fun(*this, &LocationUI::location_added)); + session->locations()->removed.connect (mem_fun(*this, &LocationUI::location_removed)); + session->going_away.connect (mem_fun(*this, &LocationUI::session_gone)); } refresh_location_list (); } @@ -864,7 +864,7 @@ LocationUI::set_session(ARDOUR::Session* sess) void LocationUI::session_gone() { - ENSURE_GUI_THREAD(slot (*this, &LocationUI::session_gone)); + ENSURE_GUI_THREAD(mem_fun(*this, &LocationUI::session_gone)); hide_all(); diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index 40f29823bf..479bb71238 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -445,7 +445,7 @@ main (int argc, char *argv[]) once everything else is OK. */ - Main::idle.connect (bind (slot (*ui, &ARDOUR_UI::cmdline_new_session), path)); + Main::idle.connect (bind (mem_fun (*ui, &ARDOUR_UI::cmdline_new_session), path)); ui->set_will_create_new_session_automatically (true); } else { diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc index 0014476c29..b26220cccb 100644 --- a/gtk2_ardour/marker.cc +++ b/gtk2_ardour/marker.cc @@ -366,7 +366,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st gtk_object_set_data (GTK_OBJECT(group), "marker", this); gtk_signal_connect (GTK_OBJECT(group), "event", (GtkSignalFunc) callback, &editor); - editor.ZoomChanged.connect (slot (*this, &Marker::reposition)); + editor.ZoomChanged.connect (mem_fun(*this, &Marker::reposition)); } Marker::~Marker () diff --git a/gtk2_ardour/marker_time_axis.cc b/gtk2_ardour/marker_time_axis.cc index af2e8143ed..44a169750d 100644 --- a/gtk2_ardour/marker_time_axis.cc +++ b/gtk2_ardour/marker_time_axis.cc @@ -223,14 +223,14 @@ MarkerTimeAxis::build_display_menu() /* now fill it with our stuff */ MenuList& items = display_menu->items(); - items.push_back(MenuElem (_("Rename"), slot (*this, &VisualTimeAxis::start_time_axis_rename))); + items.push_back(MenuElem (_("Rename"), mem_fun(*this, &VisualTimeAxis::start_time_axis_rename))); items.push_back(SeparatorElem()) ; items.push_back(MenuElem (_("Height"), *size_menu)); - items.push_back(MenuElem (_("Color"), slot (*this, &MarkerTimeAxis::select_track_color))); + items.push_back(MenuElem (_("Color"), mem_fun(*this, &MarkerTimeAxis::select_track_color))); items.push_back(SeparatorElem()) ; - items.push_back(MenuElem (_("Remove"), bind(slot(*this, &MarkerTimeAxis::remove_this_time_axis), (void*)this))); + items.push_back(MenuElem (_("Remove"), bind(mem_fun(*this, &MarkerTimeAxis::remove_this_time_axis), (void*)this))); } /** @@ -256,22 +256,22 @@ MarkerTimeAxis::build_marker_menu() if(view) { - duration_items.push_back(MenuElem (_("1 seconds"), bind (slot (view, &MarkerTimeAxisView::set_marker_duration_sec), 1.0))) ; - duration_items.push_back(MenuElem (_("1.5 seconds"), bind (slot (view, &MarkerTimeAxisView::set_marker_duration_sec), 1.5))) ; - duration_items.push_back(MenuElem (_("2 seconds"), bind (slot (view, &MarkerTimeAxisView::set_marker_duration_sec), 2.0))) ; - duration_items.push_back(MenuElem (_("2.5 seconds"), bind (slot (view, &MarkerTimeAxisView::set_marker_duration_sec), 2.5))) ; - duration_items.push_back(MenuElem (_("3 seconds"), bind (slot (view, &MarkerTimeAxisView::set_marker_duration_sec), 3.0))) ; + duration_items.push_back(MenuElem (_("1 seconds"), bind (mem_fun (view, &MarkerTimeAxisView::set_marker_duration_sec), 1.0))) ; + duration_items.push_back(MenuElem (_("1.5 seconds"), bind (mem_fun (view, &MarkerTimeAxisView::set_marker_duration_sec), 1.5))) ; + duration_items.push_back(MenuElem (_("2 seconds"), bind (mem_fun (view, &MarkerTimeAxisView::set_marker_duration_sec), 2.0))) ; + duration_items.push_back(MenuElem (_("2.5 seconds"), bind (mem_fun (view, &MarkerTimeAxisView::set_marker_duration_sec), 2.5))) ; + duration_items.push_back(MenuElem (_("3 seconds"), bind (mem_fun (view, &MarkerTimeAxisView::set_marker_duration_sec), 3.0))) ; } //duration_items.push_back(SeparatorElem()) ; - //duration_items.push_back(MenuElem (_("custom"), slot (*this, &ImageFrameTimeAxis::set_marker_duration_custom))) ; + //duration_items.push_back(MenuElem (_("custom"), mem_fun(*this, &ImageFrameTimeAxis::set_marker_duration_custom))) ; marker_sub_items.push_back(MenuElem(_("Duration (sec)"), *duration_menu)) ; marker_sub_items.push_back(SeparatorElem()) ; - marker_sub_items.push_back(MenuElem (_("Remove Marker"), bind(slot(view, &MarkerTimeAxisView::remove_selected_marker_view),(void*)this))) ; + marker_sub_items.push_back(MenuElem (_("Remove Marker"), bind(mem_fun(view, &MarkerTimeAxisView::remove_selected_marker_view),(void*)this))) ; items.push_back(MenuElem(_("Marker"), *marker_item_menu)) ; - items.push_back(MenuElem (_("Rename Track"), slot (*this,&MarkerTimeAxis::start_time_axis_rename))) ; + items.push_back(MenuElem (_("Rename Track"), mem_fun(*this,&MarkerTimeAxis::start_time_axis_rename))) ; marker_menu->show_all() ; } diff --git a/gtk2_ardour/marker_time_axis_view.cc b/gtk2_ardour/marker_time_axis_view.cc index 8c99212673..22b55d3ead 100644 --- a/gtk2_ardour/marker_time_axis_view.cc +++ b/gtk2_ardour/marker_time_axis_view.cc @@ -68,7 +68,7 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv) _samples_per_unit = _trackview.editor.get_current_zoom() ; - _trackview.editor.ZoomChanged.connect (slot(*this, &MarkerTimeAxisView::reset_samples_per_unit)); + _trackview.editor.ZoomChanged.connect (mem_fun(*this, &MarkerTimeAxisView::reset_samples_per_unit)); } /** @@ -220,7 +220,7 @@ MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, ifv->add_marker_view_item(mv, src) ; marker_view_list.push_front(mv) ; - mv->GoingAway.connect(bind (slot (*this,&MarkerTimeAxisView::remove_marker_view), (void*)this)) ; + mv->GoingAway.connect(bind (mem_fun(*this,&MarkerTimeAxisView::remove_marker_view), (void*)this)) ; MarkerViewAdded(mv,src) ; /* EMIT_SIGNAL */ @@ -322,7 +322,7 @@ MarkerTimeAxisView::remove_named_marker_view(std::string item_id, void* src) void MarkerTimeAxisView::remove_marker_view(MarkerView* mv, void* src) { - ENSURE_GUI_THREAD(bind (slot (*this, &MarkerTimeAxisView::remove_marker_view), mv, src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &MarkerTimeAxisView::remove_marker_view), mv, src)); MarkerViewList::iterator i; diff --git a/gtk2_ardour/meter_bridge.cc b/gtk2_ardour/meter_bridge.cc index 33951d82e7..f5c3854570 100644 --- a/gtk2_ardour/meter_bridge.cc +++ b/gtk2_ardour/meter_bridge.cc @@ -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 (slot (just_hide_it), static_cast(this))); + delete_event.connect (bind (ptr_fun (just_hide_it), static_cast(this))); metering = false; @@ -96,8 +96,8 @@ MeterBridge::set_session (Session *s) // XXX this stuff has to be fixed if we ever use this code again // (refs vs. ptrs) // session->foreach_route (this, &MeterBridge::add_route); - session->RouteAdded.connect (slot (*this, &MeterBridge::add_route)); - session->going_away.connect (slot (*this, &MeterBridge::session_gone)); + session->RouteAdded.connect (mem_fun(*this, &MeterBridge::add_route)); + session->going_away.connect (mem_fun(*this, &MeterBridge::session_gone)); start_metering (); } } @@ -105,7 +105,7 @@ MeterBridge::set_session (Session *s) void MeterBridge::session_gone () { - ENSURE_GUI_THREAD(slot (*this, &MeterBridge::session_gone)); + ENSURE_GUI_THREAD(mem_fun(*this, &MeterBridge::session_gone)); stop_metering (); hide_all (); @@ -129,7 +129,7 @@ MeterBridge::session_gone () void MeterBridge::add_route (ARDOUR::Route* route) { - ENSURE_GUI_THREAD(bind (slot (*this, &MeterBridge::add_route), route)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &MeterBridge::add_route), route)); uint32_t n; char buf[32]; @@ -160,20 +160,20 @@ MeterBridge::add_route (ARDOUR::Route* route) meter->meter_widget().show (); meter->below_box().show_all (); - route->GoingAway.connect (bind (slot (*this, &MeterBridge::remove_route), route)); + route->GoingAway.connect (bind (mem_fun(*this, &MeterBridge::remove_route), route)); meters.insert (meters.begin(), meter); set_default_size (30 + ((n+1) * packing_factor), 315); meter->set_meter_on(true); - session->going_away.connect (slot (*this, &MeterBridge::session_gone)); + session->going_away.connect (mem_fun(*this, &MeterBridge::session_gone)); } void MeterBridge::remove_route (Route* route) { - ENSURE_GUI_THREAD(bind (slot (*this, &MeterBridge::remove_route), route)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &MeterBridge::remove_route), route)); list::iterator i; for (i = meters.begin(); i != meters.end(); ++i) { @@ -214,7 +214,7 @@ MeterBridge::start_metering () (*i)->set_meter_on (true); } metering_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect - (slot (*this, &MeterBridge::update)); + (mem_fun(*this, &MeterBridge::update)); metering = true; } diff --git a/gtk2_ardour/meter_bridge_strip.cc b/gtk2_ardour/meter_bridge_strip.cc index c3c66dff5f..98b30f7aa1 100644 --- a/gtk2_ardour/meter_bridge_strip.cc +++ b/gtk2_ardour/meter_bridge_strip.cc @@ -64,7 +64,7 @@ MeterBridgeStrip::MeterBridgeStrip (AudioEngine &eng, label_ebox.set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK); label_ebox.add (label); - label_ebox.button_release_event.connect (slot (*this, &MeterBridgeStrip::label_button_press_release)); + label_ebox.button_release_event.connect (mem_fun(*this, &MeterBridgeStrip::label_button_press_release)); ARDOUR_UI::instance()->tooltips().set_tip (label_ebox, _route.name()); over_long_label.set_text ("0"); @@ -102,8 +102,8 @@ MeterBridgeStrip::MeterBridgeStrip (AudioEngine &eng, below_meter_vbox.pack_start (label_ebox); - over_short_button.button_release_event.connect (slot (*this,&MeterBridgeStrip::gui_clear_overs)); - over_long_button.button_release_event.connect (slot (*this,&MeterBridgeStrip::gui_clear_overs)); + over_short_button.button_release_event.connect (mem_fun(*this,&MeterBridgeStrip::gui_clear_overs)); + over_long_button.button_release_event.connect (mem_fun(*this,&MeterBridgeStrip::gui_clear_overs)); last_over_short = 0; last_over_long = 0; diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 6a16a5f8ac..41e207f0fe 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -209,25 +209,25 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer) using namespace Menu_Helpers; gain_astate_menu.items().push_back (MenuElem (_("off"), - bind (slot (_route, &IO::set_gain_automation_state), (AutoState) Off))); + bind (mem_fun (_route, &IO::set_gain_automation_state), (AutoState) Off))); gain_astate_menu.items().push_back (MenuElem (_("play"), - bind (slot (_route, &IO::set_gain_automation_state), (AutoState) Play))); + bind (mem_fun (_route, &IO::set_gain_automation_state), (AutoState) Play))); gain_astate_menu.items().push_back (MenuElem (_("write"), - bind (slot (_route, &IO::set_gain_automation_state), (AutoState) Write))); + bind (mem_fun (_route, &IO::set_gain_automation_state), (AutoState) Write))); gain_astate_menu.items().push_back (MenuElem (_("touch"), - bind (slot (_route, &IO::set_gain_automation_state), (AutoState) Touch))); + bind (mem_fun (_route, &IO::set_gain_automation_state), (AutoState) Touch))); gain_astyle_menu.items().push_back (MenuElem (_("trim"))); gain_astyle_menu.items().push_back (MenuElem (_("abs"))); pan_astate_menu.items().push_back (MenuElem (_("off"), - bind (slot (_route.panner(), &Panner::set_automation_state), (AutoState) Off))); + bind (mem_fun (_route.panner(), &Panner::set_automation_state), (AutoState) Off))); pan_astate_menu.items().push_back (MenuElem (_("play"), - bind (slot (_route.panner(), &Panner::set_automation_state), (AutoState) Play))); + bind (mem_fun (_route.panner(), &Panner::set_automation_state), (AutoState) Play))); pan_astate_menu.items().push_back (MenuElem (_("write"), - bind (slot (_route.panner(), &Panner::set_automation_state), (AutoState) Write))); + bind (mem_fun (_route.panner(), &Panner::set_automation_state), (AutoState) Write))); pan_astate_menu.items().push_back (MenuElem (_("touch"), - bind (slot (_route.panner(), &Panner::set_automation_state), (AutoState) Touch))); + bind (mem_fun (_route.panner(), &Panner::set_automation_state), (AutoState) Touch))); pan_astyle_menu.items().push_back (MenuElem (_("trim"))); pan_astyle_menu.items().push_back (MenuElem (_("abs"))); @@ -246,9 +246,9 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer) AudioTrack* at = dynamic_cast(&_route); - at->FreezeChange.connect (slot (*this, &MixerStrip::map_frozen)); + at->FreezeChange.connect (mem_fun(*this, &MixerStrip::map_frozen)); - speed_adjustment.value_changed.connect (slot (*this, &MixerStrip::speed_adjustment_changed)); + speed_adjustment.value_changed.connect (mem_fun(*this, &MixerStrip::speed_adjustment_changed)); speed_frame.set_name ("BaseFrame"); speed_frame.set_shadow_type (Gtk::SHADOW_IN); @@ -280,7 +280,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer) ARDOUR_UI::instance()->tooltips().set_tip (comment_button, _route.comment()=="" ? _("click to add/edit comments"): _route.comment()); - comment_button.signal_clicked().connect (slot (*this, &MixerStrip::comment_button_clicked)); + comment_button.signal_clicked().connect (mem_fun(*this, &MixerStrip::comment_button_clicked)); global_vpacker.set_border_width (4); global_vpacker.set_spacing (4); @@ -290,8 +290,8 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer) width_button.set_name ("MixerWidthButton"); hide_button.set_name ("MixerHideButton"); - width_button.signal_clicked().connect (slot (*this, &MixerStrip::width_clicked)); - hide_button.signal_clicked().connect (slot (*this, &MixerStrip::hide_clicked)); + width_button.signal_clicked().connect (mem_fun(*this, &MixerStrip::width_clicked)); + hide_button.signal_clicked().connect (mem_fun(*this, &MixerStrip::hide_clicked)); width_hide_box.pack_start (width_button, false, true); width_hide_box.pack_end (hide_button, false, true); @@ -345,54 +345,54 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer) _packed = false; _embedded = false; - _route.input_changed.connect (slot (*this, &MixerStrip::input_changed)); - _route.output_changed.connect (slot (*this, &MixerStrip::output_changed)); - _route.mute_changed.connect (slot (*this, &RouteUI::mute_changed)); - _route.solo_changed.connect (slot (*this, &RouteUI::solo_changed)); - _route.solo_safe_changed.connect (slot (*this, &RouteUI::solo_changed)); - _route.mix_group_changed.connect (slot (*this, &MixerStrip::mix_group_changed)); - _route.gain_automation_curve().automation_state_changed.connect (slot (*this, &MixerStrip::gain_automation_state_changed)); - _route.gain_automation_curve().automation_style_changed.connect (slot (*this, &MixerStrip::gain_automation_style_changed)); - _route.panner().Changed.connect (slot (*this, &MixerStrip::connect_to_pan)); + _route.input_changed.connect (mem_fun(*this, &MixerStrip::input_changed)); + _route.output_changed.connect (mem_fun(*this, &MixerStrip::output_changed)); + _route.mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed)); + _route.solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed)); + _route.solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed)); + _route.mix_group_changed.connect (mem_fun(*this, &MixerStrip::mix_group_changed)); + _route.gain_automation_curve().automation_state_changed.connect (mem_fun(*this, &MixerStrip::gain_automation_state_changed)); + _route.gain_automation_curve().automation_style_changed.connect (mem_fun(*this, &MixerStrip::gain_automation_style_changed)); + _route.panner().Changed.connect (mem_fun(*this, &MixerStrip::connect_to_pan)); if (is_audio_track()) { - audio_track()->diskstream_changed.connect (slot (*this, &MixerStrip::diskstream_changed)); - get_diskstream()->speed_changed.connect (slot (*this, &MixerStrip::speed_changed)); + audio_track()->diskstream_changed.connect (mem_fun(*this, &MixerStrip::diskstream_changed)); + get_diskstream()->speed_changed.connect (mem_fun(*this, &MixerStrip::speed_changed)); } - _route.name_changed.connect (slot (*this, &RouteUI::name_changed)); - _route.comment_changed.connect (slot (*this, &MixerStrip::comment_changed)); - _route.gui_changed.connect (slot (*this, &MixerStrip::route_gui_changed)); + _route.name_changed.connect (mem_fun(*this, &RouteUI::name_changed)); + _route.comment_changed.connect (mem_fun(*this, &MixerStrip::comment_changed)); + _route.gui_changed.connect (mem_fun(*this, &MixerStrip::route_gui_changed)); - input_button.button_release_event.connect (slot (*this, &MixerStrip::input_press)); - output_button.button_release_event.connect (slot (*this, &MixerStrip::output_press)); + input_button.button_release_event.connect (mem_fun(*this, &MixerStrip::input_press)); + output_button.button_release_event.connect (mem_fun(*this, &MixerStrip::output_press)); - rec_enable_button->button_press_event.connect (slot (*this, &RouteUI::rec_enable_press)); - solo_button->button_press_event.connect (slot (*this, &RouteUI::solo_press)); - solo_button->button_release_event.connect (slot (*this, &RouteUI::solo_release)); - mute_button->button_press_event.connect (slot (*this, &RouteUI::mute_press)); - mute_button->button_release_event.connect (slot (*this, &RouteUI::mute_release)); + rec_enable_button->button_press_event.connect (mem_fun(*this, &RouteUI::rec_enable_press)); + solo_button->button_press_event.connect (mem_fun(*this, &RouteUI::solo_press)); + solo_button->button_release_event.connect (mem_fun(*this, &RouteUI::solo_release)); + mute_button->button_press_event.connect (mem_fun(*this, &RouteUI::mute_press)); + mute_button->button_release_event.connect (mem_fun(*this, &RouteUI::mute_release)); - gain_automation_style_button.button_press_event.connect_after (slot (do_not_propagate)); - pan_automation_style_button.button_press_event.connect_after (slot (do_not_propagate)); - gain_automation_state_button.button_press_event.connect_after (slot (do_not_propagate)); - pan_automation_state_button.button_press_event.connect_after (slot (do_not_propagate)); + gain_automation_style_button.button_press_event.connect_after (ptr_fun (do_not_propagate)); + pan_automation_style_button.button_press_event.connect_after (ptr_fun (do_not_propagate)); + gain_automation_state_button.button_press_event.connect_after (ptr_fun (do_not_propagate)); + pan_automation_state_button.button_press_event.connect_after (ptr_fun (do_not_propagate)); - gain_automation_style_button.button_press_event.connect (slot (*this, &MixerStrip::gain_automation_style_button_event)); - gain_automation_style_button.button_release_event.connect (slot (*this, &MixerStrip::gain_automation_style_button_event)); - pan_automation_style_button.button_press_event.connect (slot (*this, &MixerStrip::pan_automation_style_button_event)); - pan_automation_style_button.button_release_event.connect (slot (*this, &MixerStrip::pan_automation_style_button_event)); + gain_automation_style_button.button_press_event.connect (mem_fun(*this, &MixerStrip::gain_automation_style_button_event)); + gain_automation_style_button.button_release_event.connect (mem_fun(*this, &MixerStrip::gain_automation_style_button_event)); + pan_automation_style_button.button_press_event.connect (mem_fun(*this, &MixerStrip::pan_automation_style_button_event)); + pan_automation_style_button.button_release_event.connect (mem_fun(*this, &MixerStrip::pan_automation_style_button_event)); - gain_automation_state_button.button_press_event.connect (slot (*this, &MixerStrip::gain_automation_state_button_event)); - gain_automation_state_button.button_release_event.connect (slot (*this, &MixerStrip::gain_automation_state_button_event)); - pan_automation_state_button.button_press_event.connect (slot (*this, &MixerStrip::pan_automation_state_button_event)); - pan_automation_state_button.button_release_event.connect (slot (*this, &MixerStrip::pan_automation_state_button_event)); + gain_automation_state_button.button_press_event.connect (mem_fun(*this, &MixerStrip::gain_automation_state_button_event)); + gain_automation_state_button.button_release_event.connect (mem_fun(*this, &MixerStrip::gain_automation_state_button_event)); + pan_automation_state_button.button_press_event.connect (mem_fun(*this, &MixerStrip::pan_automation_state_button_event)); + pan_automation_state_button.button_release_event.connect (mem_fun(*this, &MixerStrip::pan_automation_state_button_event)); - polarity_button.toggled.connect (slot (*this, &MixerStrip::polarity_toggled)); + polarity_button.toggled.connect (mem_fun(*this, &MixerStrip::polarity_toggled)); - name_button.button_release_event.connect (slot (*this, &MixerStrip::name_button_button_release)); + name_button.button_release_event.connect (mem_fun(*this, &MixerStrip::name_button_button_release)); - group_button.button_press_event.connect (slot (*this, &MixerStrip::select_mix_group)); + group_button.button_press_event.connect (mem_fun(*this, &MixerStrip::select_mix_group)); _width = (Width) -1; set_stuff_from_route (); @@ -567,9 +567,9 @@ MixerStrip::output_press (GdkEventButton *ev) output_menu.set_name ("ArdourContextMenu"); citems.clear(); - citems.push_back (MenuElem (_("Edit"), slot (*this, &MixerStrip::edit_output_configuration))); + citems.push_back (MenuElem (_("Edit"), mem_fun(*this, &MixerStrip::edit_output_configuration))); citems.push_back (SeparatorElem()); - citems.push_back (MenuElem (_("Disconnect"), slot (*(static_cast(this)), &RouteUI::disconnect_output))); + citems.push_back (MenuElem (_("Disconnect"), mem_fun (*(static_cast(this)), &RouteUI::disconnect_output))); citems.push_back (SeparatorElem()); _session.foreach_connection (this, &MixerStrip::add_connection_to_output_menu); @@ -623,12 +623,12 @@ MixerStrip::input_press (GdkEventButton *ev) #if ADVANCED_ROUTE_DISKSTREAM_CONNECTIVITY if (is_audio_track()) { - citems.push_back (MenuElem (_("Track"), slot (*this, &MixerStrip::select_stream_input))); + citems.push_back (MenuElem (_("Track"), mem_fun(*this, &MixerStrip::select_stream_input))); } #endif - citems.push_back (MenuElem (_("Edit"), slot (*this, &MixerStrip::edit_input_configuration))); + citems.push_back (MenuElem (_("Edit"), mem_fun(*this, &MixerStrip::edit_input_configuration))); citems.push_back (SeparatorElem()); - citems.push_back (MenuElem (_("Disconnect"), slot (*(static_cast(this)), &RouteUI::disconnect_input))); + citems.push_back (MenuElem (_("Disconnect"), mem_fun (*(static_cast(this)), &RouteUI::disconnect_input))); citems.push_back (SeparatorElem()); _session.foreach_connection (this, &MixerStrip::add_connection_to_input_menu); @@ -683,7 +683,7 @@ MixerStrip::add_connection_to_input_menu (ARDOUR::Connection* c) if (c->nports() == _route.n_inputs()) { - citems.push_back (CheckMenuElem (c->name(), bind (slot (*this, &MixerStrip::connection_input_chosen), c))); + citems.push_back (CheckMenuElem (c->name(), bind (mem_fun(*this, &MixerStrip::connection_input_chosen), c))); ARDOUR::Connection *current = _route.input_connection(); @@ -707,7 +707,7 @@ MixerStrip::add_connection_to_output_menu (ARDOUR::Connection* c) if (c->nports() == _route.n_outputs()) { MenuList& citems = output_menu.items(); - citems.push_back (CheckMenuElem (c->name(), bind (slot (*this, &MixerStrip::connection_output_chosen), c))); + citems.push_back (CheckMenuElem (c->name(), bind (mem_fun(*this, &MixerStrip::connection_output_chosen), c))); ARDOUR::Connection *current = _route.output_connection(); @@ -734,7 +734,7 @@ MixerStrip::select_stream_input () if (!(*i)->hidden()) { - items.push_back (CheckMenuElem ((*i)->name(), bind (slot (*this, &MixerStrip::stream_input_chosen), *i))); + items.push_back (CheckMenuElem ((*i)->name(), bind (mem_fun(*this, &MixerStrip::stream_input_chosen), *i))); if (get_diskstream() == *i) { ignore_toggle = true; @@ -782,7 +782,7 @@ MixerStrip::update_diskstream_display () void MixerStrip::connect_to_pan () { - ENSURE_GUI_THREAD(slot (*this, &MixerStrip::connect_to_pan)); + ENSURE_GUI_THREAD(mem_fun(*this, &MixerStrip::connect_to_pan)); panstate_connection.disconnect (); panstyle_connection.disconnect (); @@ -790,8 +790,8 @@ MixerStrip::connect_to_pan () if (!_route.panner().empty()) { StreamPanner* sp = _route.panner().front(); - panstate_connection = sp->automation().automation_state_changed.connect (slot (*this, &MixerStrip::pan_automation_state_changed)); - panstyle_connection = sp->automation().automation_style_changed.connect (slot (*this, &MixerStrip::pan_automation_style_changed)); + panstate_connection = sp->automation().automation_state_changed.connect (mem_fun(*this, &MixerStrip::pan_automation_state_changed)); + panstyle_connection = sp->automation().automation_style_changed.connect (mem_fun(*this, &MixerStrip::pan_automation_style_changed)); } panners.pan_changed (this); @@ -987,7 +987,7 @@ MixerStrip::_astyle_string (AutoStyle style, bool shrt) void MixerStrip::diskstream_changed (void *src) { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &MixerStrip::update_diskstream_display)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &MixerStrip::update_diskstream_display)); } void @@ -1006,7 +1006,7 @@ MixerStrip::gain_automation_style_changed () void MixerStrip::gain_automation_state_changed () { - ENSURE_GUI_THREAD(slot (*this, &MixerStrip::gain_automation_state_changed)); + ENSURE_GUI_THREAD(mem_fun(*this, &MixerStrip::gain_automation_state_changed)); bool x; @@ -1034,14 +1034,14 @@ MixerStrip::gain_automation_state_changed () gain_watching.disconnect(); if (x) { - gain_watching = ARDOUR_UI::RapidScreenUpdate.connect (slot (gpm, &GainMeter::effective_gain_display)); + gain_watching = ARDOUR_UI::RapidScreenUpdate.connect (mem_fun (gpm, &GainMeter::effective_gain_display)); } } void MixerStrip::pan_automation_style_changed () { - ENSURE_GUI_THREAD(slot (*this, &MixerStrip::pan_automation_style_changed)); + ENSURE_GUI_THREAD(mem_fun(*this, &MixerStrip::pan_automation_style_changed)); switch (_width) { case Wide: @@ -1056,7 +1056,7 @@ MixerStrip::pan_automation_style_changed () void MixerStrip::pan_automation_state_changed () { - ENSURE_GUI_THREAD(slot (*this, &MixerStrip::pan_automation_state_changed)); + ENSURE_GUI_THREAD(mem_fun(*this, &MixerStrip::pan_automation_state_changed)); bool x; @@ -1093,20 +1093,20 @@ MixerStrip::pan_automation_state_changed () pan_watching.disconnect(); if (x) { - pan_watching = ARDOUR_UI::RapidScreenUpdate.connect (slot (panners, &PannerUI::effective_pan_display)); + pan_watching = ARDOUR_UI::RapidScreenUpdate.connect (mem_fun (panners, &PannerUI::effective_pan_display)); } } void MixerStrip::input_changed (IOChange change, void *src) { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &MixerStrip::update_input_display)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &MixerStrip::update_input_display)); } void MixerStrip::output_changed (IOChange change, void *src) { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &MixerStrip::update_output_display)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &MixerStrip::update_output_display)); } void @@ -1136,20 +1136,20 @@ MixerStrip::setup_comment_editor () comment_area.set_name ("MixerTrackCommentArea"); comment_area.set_editable (true); - comment_area.signal_focus_in_event().connect (slot (ARDOUR_UI::generic_focus_in_event)); - comment_area.signal_focus_out_event().connect (slot (ARDOUR_UI::generic_focus_out_event)); - comment_area.changed.connect (slot (*this, &MixerStrip::comment_edited)); - comment_area.button_release_event.connect_after (slot (do_not_propagate)); + 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.button_release_event.connect_after (ptr_fun (do_not_propagate)); comment_area.show (); comment_window->add (comment_area); - comment_window->delete_event.connect (bind (slot (just_hide_it), comment_window)); + comment_window->delete_event.connect (bind (ptr_fun (just_hide_it), comment_window)); } void MixerStrip::comment_changed (void *src) { - ENSURE_GUI_THREAD(bind (slot (*this, &MixerStrip::comment_changed), src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &MixerStrip::comment_changed), src)); if (src != this) { ignore_comment_edit = true; @@ -1165,7 +1165,7 @@ MixerStrip::comment_changed (void *src) void MixerStrip::comment_edited () { - ENSURE_GUI_THREAD(slot (*this, &MixerStrip::comment_edited)); + ENSURE_GUI_THREAD(mem_fun(*this, &MixerStrip::comment_edited)); if (!ignore_comment_edit) { string str = comment_area.get_chars(0,-1); @@ -1190,7 +1190,7 @@ MixerStrip::add_mix_group_to_menu (RouteGroup *rg) using namespace Menu_Helpers; MenuList& items = group_menu->items(); - items.push_back (MenuElem (rg->name(), bind (slot (*this, &MixerStrip::set_mix_group), rg))); + items.push_back (MenuElem (rg->name(), bind (mem_fun(*this, &MixerStrip::set_mix_group), rg))); } gint @@ -1202,7 +1202,7 @@ MixerStrip::select_mix_group (GdkEventButton *ev) group_menu->set_name ("ArdourContextMenu"); MenuList& items = group_menu->items(); - items.push_back (MenuElem (_("no group"), bind (slot (*this, &MixerStrip::set_mix_group), (RouteGroup *) 0))); + items.push_back (MenuElem (_("no group"), bind (mem_fun(*this, &MixerStrip::set_mix_group), (RouteGroup *) 0))); _session.foreach_mix_group (this, &MixerStrip::add_mix_group_to_menu); group_menu->popup (ev->button, 0); @@ -1212,7 +1212,7 @@ MixerStrip::select_mix_group (GdkEventButton *ev) void MixerStrip::mix_group_changed (void *ignored) { - ENSURE_GUI_THREAD(bind (slot (*this, &MixerStrip::mix_group_changed), ignored)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &MixerStrip::mix_group_changed), ignored)); RouteGroup *rg = _route.mix_group(); @@ -1244,7 +1244,7 @@ MixerStrip::polarity_toggled () void MixerStrip::route_gui_changed (string what_changed, void* ignored) { - ENSURE_GUI_THREAD(bind (slot (*this, &MixerStrip::route_gui_changed), what_changed, ignored)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &MixerStrip::route_gui_changed), what_changed, ignored)); if (what_changed == "color") { if (set_color_from_route () == 0) { @@ -1283,14 +1283,14 @@ MixerStrip::build_route_ops_menu () MenuList& items = route_ops_menu->items(); - items.push_back (MenuElem (_("Rename"), slot (*this, &RouteUI::route_rename))); + items.push_back (MenuElem (_("Rename"), mem_fun(*this, &RouteUI::route_rename))); items.push_back (SeparatorElem()); - items.push_back (CheckMenuElem (_("Active"), slot (*this, &RouteUI::toggle_route_active))); + items.push_back (CheckMenuElem (_("Active"), mem_fun(*this, &RouteUI::toggle_route_active))); route_active_menu_item = dynamic_cast (items.back()); route_active_menu_item->set_active (_route.active()); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Remove"), slot (*this, &RouteUI::remove_this_route))); + items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route))); } gint @@ -1325,7 +1325,7 @@ MixerStrip::speed_adjustment_changed () void MixerStrip::speed_changed () { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &MixerStrip::update_speed_display)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &MixerStrip::update_speed_display)); } void @@ -1408,7 +1408,7 @@ MixerStrip::set_embedded (bool yn) void MixerStrip::map_frozen () { - ENSURE_GUI_THREAD (slot (*this, &MixerStrip::map_frozen)); + ENSURE_GUI_THREAD (mem_fun(*this, &MixerStrip::map_frozen)); AudioTrack* at = dynamic_cast(&_route); diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 9288ed00ed..1d83ca8810 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -93,7 +93,7 @@ Mixer_UI::Mixer_UI (AudioEngine& eng) scroller_base.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); scroller_base.set_name ("MixerWindow"); - scroller_base.button_release_event.connect (slot (*this, &Mixer_UI::strip_scroller_button_release)); + scroller_base.button_release_event.connect (mem_fun(*this, &Mixer_UI::strip_scroller_button_release)); // add as last item of strip packer strip_packer.pack_end (scroller_base, true, true); @@ -168,11 +168,11 @@ Mixer_UI::Mixer_UI (AudioEngine& eng) list_hpane.add1(list_vpacker); list_hpane.add2(global_hpacker); - rhs_pane1.size_allocate.connect_after (bind (slot (*this, &Mixer_UI::pane_allocation_handler), + rhs_pane1.size_allocate.connect_after (bind (mem_fun(*this, &Mixer_UI::pane_allocation_handler), static_cast (&rhs_pane1))); - rhs_pane2.size_allocate.connect_after (bind (slot (*this, &Mixer_UI::pane_allocation_handler), + rhs_pane2.size_allocate.connect_after (bind (mem_fun(*this, &Mixer_UI::pane_allocation_handler), static_cast (&rhs_pane2))); - list_hpane.size_allocate.connect_after (bind (slot (*this, &Mixer_UI::pane_allocation_handler), + list_hpane.size_allocate.connect_after (bind (mem_fun(*this, &Mixer_UI::pane_allocation_handler), static_cast (&list_hpane))); @@ -180,9 +180,9 @@ Mixer_UI::Mixer_UI (AudioEngine& eng) rhs_pane2.set_data ("collapse-direction", (gpointer) 0); list_hpane.set_data ("collapse-direction", (gpointer) 1); - rhs_pane1.button_release_event.connect (bind (slot (pane_handler), static_cast(&rhs_pane1))); - rhs_pane2.button_release_event.connect (bind (slot (pane_handler), static_cast(&rhs_pane2))); - list_hpane.button_release_event.connect (bind (slot (pane_handler), static_cast(&list_hpane))); + rhs_pane1.button_release_event.connect (bind (ptr_fun (pane_handler), static_cast(&rhs_pane1))); + rhs_pane2.button_release_event.connect (bind (ptr_fun (pane_handler), static_cast(&rhs_pane2))); + list_hpane.button_release_event.connect (bind (ptr_fun (pane_handler), static_cast(&list_hpane))); global_vpacker.pack_start (list_hpane, true, true); @@ -191,29 +191,29 @@ Mixer_UI::Mixer_UI (AudioEngine& eng) set_title (_("ardour: mixer")); set_wmclass (_("ardour_mixer"), "Ardour"); - delete_event.connect (bind (slot (just_hide_it), + delete_event.connect (bind (ptr_fun (just_hide_it), static_cast(this))); add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK); - snapshot_display.select_row.connect (slot (*this, &Mixer_UI::snapshot_display_selected)); + snapshot_display.select_row.connect (mem_fun(*this, &Mixer_UI::snapshot_display_selected)); - track_display_list.select_row.connect (slot (*this, &Mixer_UI::track_display_selected)); - track_display_list.unselect_row.connect (slot (*this, &Mixer_UI::track_display_unselected)); - track_display_list.row_move.connect (slot (*this, &Mixer_UI::queue_track_display_reordered)); - track_display_list.click_column.connect (slot (*this, &Mixer_UI::track_column_click)); + track_display_list.select_row.connect (mem_fun(*this, &Mixer_UI::track_display_selected)); + track_display_list.unselect_row.connect (mem_fun(*this, &Mixer_UI::track_display_unselected)); + track_display_list.row_move.connect (mem_fun(*this, &Mixer_UI::queue_track_display_reordered)); + track_display_list.click_column.connect (mem_fun(*this, &Mixer_UI::track_column_click)); - group_list_button.signal_clicked().connect (slot (*this, &Mixer_UI::group_list_button_clicked)); - group_list.button_press_event.connect (slot (*this, &Mixer_UI::group_list_button_press_event)); - group_list.select_row.connect (slot (*this, &Mixer_UI::group_selected)); - group_list.unselect_row.connect (slot (*this, &Mixer_UI::group_unselected)); + group_list_button.signal_clicked().connect (mem_fun(*this, &Mixer_UI::group_list_button_clicked)); + group_list.button_press_event.connect (mem_fun(*this, &Mixer_UI::group_list_button_press_event)); + group_list.select_row.connect (mem_fun(*this, &Mixer_UI::group_selected)); + group_list.unselect_row.connect (mem_fun(*this, &Mixer_UI::group_unselected)); _plugin_selector = new PluginSelector (PluginManager::the_manager()); - _plugin_selector->delete_event.connect (bind (slot (just_hide_it), + _plugin_selector->delete_event.connect (bind (ptr_fun (just_hide_it), static_cast (_plugin_selector))); - configure_event.connect (slot (*ARDOUR_UI::instance(), &ARDOUR_UI::configure_handler)); + configure_event.connect (mem_fun (*ARDOUR_UI::instance(), &ARDOUR_UI::configure_handler)); - _selection.RoutesChanged.connect (slot (*this, &Mixer_UI::follow_strip_selection)); + _selection.RoutesChanged.connect (mem_fun(*this, &Mixer_UI::follow_strip_selection)); } Mixer_UI::~Mixer_UI () @@ -244,7 +244,7 @@ Mixer_UI::show_window () void Mixer_UI::add_strip (Route* route) { - ENSURE_GUI_THREAD(bind (slot (*this, &Mixer_UI::add_strip), route)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::add_strip), route)); MixerStrip* strip; @@ -270,10 +270,10 @@ Mixer_UI::add_strip (Route* route) track_display_list.rows().back().select (); } - route->name_changed.connect (bind (slot (*this, &Mixer_UI::strip_name_changed), strip)); - strip->GoingAway.connect (bind (slot (*this, &Mixer_UI::remove_strip), strip)); + route->name_changed.connect (bind (mem_fun(*this, &Mixer_UI::strip_name_changed), strip)); + strip->GoingAway.connect (bind (mem_fun(*this, &Mixer_UI::remove_strip), strip)); - strip->button_release_event.connect (bind (slot (*this, &Mixer_UI::strip_button_release_event), strip)); + strip->button_release_event.connect (bind (mem_fun(*this, &Mixer_UI::strip_button_release_event), strip)); // if (width() < gdk_screen_width()) { // set_size_request (width() + (_strip_width == Wide ? 75 : 50), height()); @@ -283,7 +283,7 @@ Mixer_UI::add_strip (Route* route) void Mixer_UI::remove_strip (MixerStrip* strip) { - ENSURE_GUI_THREAD(bind (slot (*this, &Mixer_UI::remove_strip), strip)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::remove_strip), strip)); CList_Helpers::RowList::iterator ri; list::iterator i; @@ -350,13 +350,13 @@ Mixer_UI::connect_to_session (Session* sess) track_display_list.thaw (); - session->going_away.connect (slot (*this, &Mixer_UI::disconnect_from_session)); - session->RouteAdded.connect (slot (*this, &Mixer_UI::add_strip)); - session->mix_group_added.connect (slot (*this, &Mixer_UI::add_mix_group)); + session->going_away.connect (mem_fun(*this, &Mixer_UI::disconnect_from_session)); + session->RouteAdded.connect (mem_fun(*this, &Mixer_UI::add_strip)); + session->mix_group_added.connect (mem_fun(*this, &Mixer_UI::add_mix_group)); session->foreach_mix_group(this, &Mixer_UI::add_mix_group); - session->StateSaved.connect (slot (*this, &Mixer_UI::session_state_saved)); + session->StateSaved.connect (mem_fun(*this, &Mixer_UI::session_state_saved)); redisplay_snapshots (); _plugin_selector->set_session (session); @@ -367,7 +367,7 @@ Mixer_UI::connect_to_session (Session* sess) void Mixer_UI::disconnect_from_session () { - ENSURE_GUI_THREAD(slot (*this, &Mixer_UI::disconnect_from_session)); + ENSURE_GUI_THREAD(mem_fun(*this, &Mixer_UI::disconnect_from_session)); group_list.clear (); set_title (_("ardour: mixer")); @@ -520,8 +520,8 @@ Mixer_UI::hide_strip (MixerStrip* ms) gint Mixer_UI::start_updating () { - screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect (slot (*this, &Mixer_UI::update_strips)); - fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (slot (*this, &Mixer_UI::fast_update_strips)); + screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect (mem_fun(*this, &Mixer_UI::update_strips)); + fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun(*this, &Mixer_UI::fast_update_strips)); return 0; } @@ -624,7 +624,7 @@ Mixer_UI::queue_track_display_reordered (gint arg1, gint arg2) is complete. */ - Main::idle.connect (slot (*this, &Mixer_UI::track_display_reordered)); + Main::idle.connect (mem_fun(*this, &Mixer_UI::track_display_reordered)); } int @@ -667,19 +667,19 @@ Mixer_UI::build_track_menu () MenuList& items = track_menu->items(); track_menu->set_name ("ArdourContextMenu"); - items.push_back (MenuElem (_("Show All"), slot (*this, &Mixer_UI::select_all_strips))); - items.push_back (MenuElem (_("Hide All"), slot (*this, &Mixer_UI::unselect_all_strips))); - items.push_back (MenuElem (_("Show All AudioTrack MixerStrips"), slot (*this, &Mixer_UI::select_all_audiotrack_strips))); - items.push_back (MenuElem (_("Hide All AudioTrack MixerStrips"), slot (*this, &Mixer_UI::unselect_all_audiotrack_strips))); - items.push_back (MenuElem (_("Show All AudioBus MixerStrips"), slot (*this, &Mixer_UI::select_all_audiobus_strips))); - items.push_back (MenuElem (_("Hide All AudioBus MixerStrips"), slot (*this, &Mixer_UI::unselect_all_audiobus_strips))); + items.push_back (MenuElem (_("Show All"), mem_fun(*this, &Mixer_UI::select_all_strips))); + items.push_back (MenuElem (_("Hide All"), mem_fun(*this, &Mixer_UI::unselect_all_strips))); + items.push_back (MenuElem (_("Show All AudioTrack MixerStrips"), mem_fun(*this, &Mixer_UI::select_all_audiotrack_strips))); + items.push_back (MenuElem (_("Hide All AudioTrack MixerStrips"), mem_fun(*this, &Mixer_UI::unselect_all_audiotrack_strips))); + items.push_back (MenuElem (_("Show All AudioBus MixerStrips"), mem_fun(*this, &Mixer_UI::select_all_audiobus_strips))); + items.push_back (MenuElem (_("Hide All AudioBus MixerStrips"), mem_fun(*this, &Mixer_UI::unselect_all_audiobus_strips))); } void Mixer_UI::strip_name_changed (void* src, MixerStrip* mx) { - ENSURE_GUI_THREAD(bind (slot (*this, &Mixer_UI::strip_name_changed), src, mx)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::strip_name_changed), src, mx)); CList_Helpers::RowList::iterator i; @@ -796,7 +796,7 @@ Mixer_UI::group_unselected (gint row, gint col, GdkEvent* ev) void Mixer_UI::group_flags_changed (void* src, RouteGroup* group) { - ENSURE_GUI_THREAD(bind (slot (*this, &Mixer_UI::group_flags_changed), src, group)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::group_flags_changed), src, group)); if (src != this) { // select row @@ -826,7 +826,7 @@ void Mixer_UI::add_mix_group (RouteGroup* group) { - ENSURE_GUI_THREAD(bind (slot (*this, &Mixer_UI::add_mix_group), group)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::add_mix_group), group)); list names; @@ -840,7 +840,7 @@ Mixer_UI::add_mix_group (RouteGroup* group) group_flags_changed (0, group); - group->FlagsChanged.connect (bind (slot (*this, &Mixer_UI::group_flags_changed), group)); + group->FlagsChanged.connect (bind (mem_fun(*this, &Mixer_UI::group_flags_changed), group)); } void @@ -877,7 +877,7 @@ Mixer_UI::redisplay_snapshots () void Mixer_UI::session_state_saved (string snap_name) { - ENSURE_GUI_THREAD (bind (slot (*this, &Mixer_UI::session_state_saved), snap_name)); + ENSURE_GUI_THREAD (bind (mem_fun(*this, &Mixer_UI::session_state_saved), snap_name)); redisplay_snapshots (); } diff --git a/gtk2_ardour/new_session_dialog.cc b/gtk2_ardour/new_session_dialog.cc index 61b6343bf6..71bde7fb86 100644 --- a/gtk2_ardour/new_session_dialog.cc +++ b/gtk2_ardour/new_session_dialog.cc @@ -179,7 +179,7 @@ NewSessionDialog::NewSessionDialog (ARDOUR::AudioEngine& engine, bool startup, s if (startup) { show_again.set_active(true); - show_again.toggled.connect (slot (*this, &NewSessionDialog::show_again_toggled)); + show_again.toggled.connect (mem_fun(*this, &NewSessionDialog::show_again_toggled)); file_selector.button_box.pack_end(show_again, false, false); } @@ -193,16 +193,16 @@ NewSessionDialog::NewSessionDialog (ARDOUR::AudioEngine& engine, bool startup, s add (main_vbox); // template_selector.shift_made.connect ( -// slot (*this, &NewSessionDialog::mix_template_shift)); +// mem_fun(*this, &NewSessionDialog::mix_template_shift)); // template_selector.control_made.connect ( -// slot (*this, &NewSessionDialog::mix_template_control)); +// mem_fun(*this, &NewSessionDialog::mix_template_control)); - file_selector.cancel_button.signal_clicked().connect (bind (slot (*this, &ArdourDialog::stop), -1)); - file_selector.op_button.signal_clicked().connect (bind (slot (*this, &ArdourDialog::stop), 0)); - file_selector.Expanded.connect (slot (*this, &NewSessionDialog::file_selector_expansion)); + file_selector.cancel_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), -1)); + file_selector.op_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), 0)); + file_selector.Expanded.connect (mem_fun(*this, &NewSessionDialog::file_selector_expansion)); - delete_event.connect (slot (*this, &ArdourDialog::wm_close_event)); - show.connect (slot (*this, &NewSessionDialog::fixup_at_show)); + delete_event.connect (mem_fun(*this, &ArdourDialog::wm_close_event)); + show.connect (mem_fun(*this, &NewSessionDialog::fixup_at_show)); file_selector.entry_label.set_name ("NewSessionMainLabel"); file_selector.where_label.set_name ("NewSessionMainLabel"); @@ -219,7 +219,7 @@ NewSessionDialog::NewSessionDialog (ARDOUR::AudioEngine& engine, bool startup, s } else { file_selector.set_path (given_path, true); notebook.set_page (-1); - notebook.show.connect (bind (slot (notebook, &Notebook::set_page), -1)); + notebook.show.connect (bind (mem_fun (notebook, &Notebook::set_page), -1)); } set_default_size(531, 358); diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index d13c219c5d..f2a4453719 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -165,7 +165,7 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui) vbox->set_spacing (4); vbox->pack_start(notebook); - delete_event.connect (slot (*this, &OptionEditor::wm_close)); + delete_event.connect (mem_fun(*this, &OptionEditor::wm_close)); notebook.set_show_tabs (true); notebook.set_show_border (true); @@ -385,7 +385,7 @@ OptionEditor::set_session (Session *s) session_control_changed (Session::SlaveType); session_control_changed (Session::AlignChoice); - session->ControlChanged.connect (slot (*this, &OptionEditor::queue_session_control_changed)); + session->ControlChanged.connect (mem_fun(*this, &OptionEditor::queue_session_control_changed)); } OptionEditor::~OptionEditor () @@ -409,10 +409,10 @@ OptionEditor::setup_path_options() session_raid_entry.set_name ("OptionsEntry"); - session_raid_entry.activate.connect (slot (*this, &OptionEditor::raid_path_changed)); + session_raid_entry.activate.connect (mem_fun(*this, &OptionEditor::raid_path_changed)); - session_raid_entry.signal_focus_in_event().connect (slot (Keyboard::the_keyboard(), &Keyboard::focus_in_handler)); - session_raid_entry.signal_focus_out_event().connect (bind (slot (*this, &OptionEditor::focus_out_event_handler), &OptionEditor::raid_path_changed)); + session_raid_entry.signal_focus_in_event().connect (mem_fun (Keyboard::the_keyboard(), &Keyboard::focus_in_handler)); + session_raid_entry.signal_focus_out_event().connect (bind (mem_fun(*this, &OptionEditor::focus_out_event_handler), &OptionEditor::raid_path_changed)); label = manage(new Label(_("session RAID path"))); label->set_name ("OptionsLabel"); @@ -430,7 +430,7 @@ OptionEditor::setup_path_options() native_format_combo.get_entry()->set_editable (false); native_format_combo.get_entry()->set_name ("OptionsEntry"); native_format_combo.set_use_arrows_always (true); - native_format_combo.get_popwin()->unmap_event.connect (slot (*this, &OptionEditor::native_format_chosen)); + native_format_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &OptionEditor::native_format_chosen)); fixup_combo_size (native_format_combo, nfstrings); @@ -495,7 +495,7 @@ OptionEditor::setup_fade_options () layer_mode_combo.set_value_in_list (true, false); layer_mode_combo.get_entry()->set_editable (false); layer_mode_combo.get_entry()->set_name ("OptionsEntry"); - layer_mode_combo.get_popwin()->unmap_event.connect (slot (*this, &OptionEditor::layer_mode_chosen)); + layer_mode_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &OptionEditor::layer_mode_chosen)); fixup_combo_size (layer_mode_combo, layer_mode_strings); @@ -517,7 +517,7 @@ OptionEditor::setup_fade_options () xfade_model_combo.set_value_in_list (true, false); xfade_model_combo.get_entry()->set_editable (false); xfade_model_combo.get_entry()->set_name ("OptionsEntry"); - xfade_model_combo.get_popwin()->unmap_event.connect (slot (*this, &OptionEditor::xfade_model_chosen)); + xfade_model_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &OptionEditor::xfade_model_chosen)); fixup_combo_size (xfade_model_combo, xfade_model_strings); @@ -531,8 +531,8 @@ OptionEditor::setup_fade_options () auto_xfade_button.set_active (Config->get_auto_xfade()); /* xfade and layer mode active requires session */ - auto_xfade_button.signal_clicked().connect (slot (*this, &OptionEditor::auto_xfade_clicked)); - xfade_active_button.signal_clicked().connect (slot (*this, &OptionEditor::xfade_active_clicked)); + auto_xfade_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_xfade_clicked)); + xfade_active_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::xfade_active_clicked)); Label* short_xfade_label = manage (new Label (_("Short crossfade length (msecs)"))); short_xfade_label->set_name ("OptionsLabel"); @@ -544,7 +544,7 @@ OptionEditor::setup_fade_options () hbox->pack_start (short_xfade_slider, true, true); fade_packer.pack_start (*hbox, false, false); - short_xfade_adjustment.value_changed.connect (slot (*this, &OptionEditor::short_xfade_adjustment_changed)); + short_xfade_adjustment.value_changed.connect (mem_fun(*this, &OptionEditor::short_xfade_adjustment_changed)); fade_packer.show_all (); } @@ -630,9 +630,9 @@ OptionEditor::setup_solo_options () solo_packer.pack_start (*hbox, false, false); solo_via_bus_button.signal_clicked().connect - (slot (*this, &OptionEditor::solo_via_bus_clicked)); + (mem_fun(*this, &OptionEditor::solo_via_bus_clicked)); solo_latched_button.signal_clicked().connect - (slot (*this, &OptionEditor::solo_latched_clicked)); + (mem_fun(*this, &OptionEditor::solo_latched_clicked)); solo_packer.show_all (); } @@ -719,7 +719,7 @@ OptionEditor::setup_display_options () meter_hold_combo.set_value_in_list (true, false); meter_hold_combo.get_entry()->set_editable (false); meter_hold_combo.get_entry()->set_name ("OptionsEntry"); - meter_hold_combo.get_popwin()->unmap_event.connect (slot (*this, &OptionEditor::meter_hold_chosen)); + meter_hold_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &OptionEditor::meter_hold_chosen)); hbox = manage (new HBox); hbox->set_border_width (8); hbox->set_spacing (8); @@ -742,7 +742,7 @@ OptionEditor::setup_display_options () meter_falloff_combo.set_value_in_list (true, false); meter_falloff_combo.get_entry()->set_editable (false); meter_falloff_combo.get_entry()->set_name ("OptionsEntry"); - meter_falloff_combo.get_popwin()->unmap_event.connect (slot (*this, &OptionEditor::meter_falloff_chosen)); + meter_falloff_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &OptionEditor::meter_falloff_chosen)); hbox = manage (new HBox); hbox->set_border_width (8); hbox->set_spacing (8); @@ -751,13 +751,13 @@ OptionEditor::setup_display_options () display_packer.pack_start (*hbox, false, false); - show_waveforms_button.signal_clicked().connect (slot (*this, &OptionEditor::show_waveforms_clicked)); - show_waveforms_recording_button.signal_clicked().connect (slot (*this, &OptionEditor::show_waveforms_recording_clicked)); - show_measures_button.signal_clicked().connect (slot (*this, &OptionEditor::show_measures_clicked)); - mixer_strip_width_button.signal_clicked().connect (slot (*this, &OptionEditor::strip_width_clicked)); - follow_playhead_button.signal_clicked().connect (slot (*this, &OptionEditor::follow_playhead_clicked)); + show_waveforms_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::show_waveforms_clicked)); + show_waveforms_recording_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::show_waveforms_recording_clicked)); + show_measures_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::show_measures_clicked)); + mixer_strip_width_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::strip_width_clicked)); + follow_playhead_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::follow_playhead_clicked)); - editor.DisplayControlChanged.connect (slot (*this, &OptionEditor::display_control_changed)); + editor.DisplayControlChanged.connect (mem_fun(*this, &OptionEditor::display_control_changed)); show_measures_button.set_active (editor.show_measures()); show_waveforms_button.set_active (editor.show_waveforms()); @@ -855,7 +855,7 @@ OptionEditor::setup_sync_options () slave_type_combo.set_value_in_list (true, false); slave_type_combo.get_entry()->set_editable (false); slave_type_combo.get_entry()->set_name ("OptionsEntry"); - slave_type_combo.get_popwin()->unmap_event.connect (slot (*this, &OptionEditor::slave_type_chosen)); + slave_type_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &OptionEditor::slave_type_chosen)); dumb.clear (); dumb.push_back (X_("24 FPS")); @@ -868,10 +868,10 @@ OptionEditor::setup_sync_options () smpte_fps_combo.set_value_in_list (true, false); smpte_fps_combo.get_entry()->set_editable (false); smpte_fps_combo.get_entry()->set_name ("OptionsEntry"); - smpte_fps_combo.get_popwin()->unmap_event.connect (slot (*this, &OptionEditor::smpte_fps_chosen)); + smpte_fps_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &OptionEditor::smpte_fps_chosen)); smpte_offset_clock.set_mode (AudioClock::SMPTE); - smpte_offset_clock.ValueChanged.connect (slot (*this, &OptionEditor::smpte_offset_chosen)); + smpte_offset_clock.ValueChanged.connect (mem_fun(*this, &OptionEditor::smpte_offset_chosen)); send_mtc_button.set_name ("OptionEditorToggleButton"); jack_time_master_button.set_name ("OptionEditorToggleButton"); @@ -923,9 +923,9 @@ OptionEditor::setup_sync_options () jack_time_master_button.set_active (Config->get_jack_time_master()); - send_mtc_button.button_press_event.connect (bind (slot (*this, &OptionEditor::send_mtc_toggled), &send_mtc_button)); - jack_time_master_button.signal_clicked().connect (slot (*this, &OptionEditor::jack_time_master_clicked)); - smpte_offset_negative_button.signal_clicked().connect (slot (*this, &OptionEditor::smpte_offset_negative_clicked)); + send_mtc_button.button_press_event.connect (bind (mem_fun(*this, &OptionEditor::send_mtc_toggled), &send_mtc_button)); + jack_time_master_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::jack_time_master_clicked)); + smpte_offset_negative_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::smpte_offset_negative_clicked)); } void @@ -1017,19 +1017,19 @@ OptionEditor::setup_midi_options () } tb->set_active (!(*i).second->input()->offline()); - tb->button_press_event.connect (bind (slot (*this, &OptionEditor::port_online_toggled), (*i).second, tb)); - (*i).second->input()->OfflineStatusChanged.connect (bind (slot (*this, &OptionEditor::map_port_online), (*i).second, tb)); + tb->button_press_event.connect (bind (mem_fun(*this, &OptionEditor::port_online_toggled), (*i).second, tb)); + (*i).second->input()->OfflineStatusChanged.connect (bind (mem_fun(*this, &OptionEditor::map_port_online), (*i).second, tb)); table->attach (*tb, 1, 2, n+2, n+3, 0, 0); tb = manage (new ToggleButton ()); tb->set_name ("OptionEditorToggleButton"); - tb->button_press_event.connect (bind (slot (*this, &OptionEditor::port_trace_in_toggled), (*i).second, tb)); + tb->button_press_event.connect (bind (mem_fun(*this, &OptionEditor::port_trace_in_toggled), (*i).second, tb)); tb->set_size_request (10, 10); table->attach (*tb, 2, 3, n+2, n+3, 0, 0); tb = manage (new ToggleButton ()); tb->set_name ("OptionEditorToggleButton"); - tb->button_press_event.connect (bind (slot (*this, &OptionEditor::port_trace_out_toggled), (*i).second, tb)); + tb->button_press_event.connect (bind (mem_fun(*this, &OptionEditor::port_trace_out_toggled), (*i).second, tb)); tb->set_size_request (10, 10); table->attach (*tb, 3, 4, n+2, n+3, 0, 0); @@ -1042,7 +1042,7 @@ OptionEditor::setup_midi_options () rb->set_group (first_mtc_button->group()); } table->attach (*rb, 4, 5, n+2, n+3, 0, 0); - rb->button_press_event.connect (bind (slot (*this, &OptionEditor::mtc_port_chosen), (*i).second, rb)); + rb->button_press_event.connect (bind (mem_fun(*this, &OptionEditor::mtc_port_chosen), (*i).second, rb)); if (Config->get_mtc_port_name() == i->first) { rb->set_active (true); @@ -1057,7 +1057,7 @@ OptionEditor::setup_midi_options () rb->set_group (first_mmc_button->group()); } table->attach (*rb, 6, 7, n+2, n+3, 0, 0); - rb->button_press_event.connect (bind (slot (*this, &OptionEditor::mmc_port_chosen), (*i).second, rb)); + rb->button_press_event.connect (bind (mem_fun(*this, &OptionEditor::mmc_port_chosen), (*i).second, rb)); if (Config->get_mmc_port_name() == i->first) { rb->set_active (true); @@ -1072,7 +1072,7 @@ OptionEditor::setup_midi_options () rb->set_group (first_midi_button->group()); } table->attach (*rb, 8, 9, n+2, n+3, 0, 0); - rb->button_press_event.connect (bind (slot (*this, &OptionEditor::midi_port_chosen), (*i).second, rb)); + rb->button_press_event.connect (bind (mem_fun(*this, &OptionEditor::midi_port_chosen), (*i).second, rb)); if (Config->get_midi_port_name() == i->first) { rb->set_active (true); @@ -1120,10 +1120,10 @@ OptionEditor::setup_midi_options () midi_packer.pack_start (*mmcbuttonbox, false, false); - mmc_control_button.toggled.connect (bind (slot (*this, &OptionEditor::mmc_control_toggled), &mmc_control_button)); - midi_control_button.toggled.connect (bind (slot (*this, &OptionEditor::midi_control_toggled), &midi_control_button)); - send_mmc_button.toggled.connect (bind (slot (*this, &OptionEditor::send_mmc_toggled), &send_mmc_button)); - midi_feedback_button.toggled.connect (bind (slot (*this, &OptionEditor::midi_feedback_toggled), &midi_feedback_button)); + 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)); } gint @@ -1314,7 +1314,7 @@ void OptionEditor::click_browse_clicked () { SoundFileSelector& sfdb (ARDOUR_UI::instance()->get_sfdb_window()); - sigc::connection c = sfdb.Action.connect (slot (*this, &OptionEditor::click_chosen)); + sigc::connection c = sfdb.Action.connect (mem_fun(*this, &OptionEditor::click_chosen)); sfdb.run (_("Use as click"), false, true); c.disconnect (); @@ -1339,7 +1339,7 @@ void OptionEditor::click_emphasis_browse_clicked () { SoundFileSelector& sfdb (ARDOUR_UI::instance()->get_sfdb_window()); - sigc::connection c = sfdb.Action.connect (slot (*this, &OptionEditor::click_emphasis_chosen)); + sigc::connection c = sfdb.Action.connect (mem_fun(*this, &OptionEditor::click_emphasis_chosen)); sfdb.run (_("Use as click emphasis"), false, true); c.disconnect (); @@ -1456,7 +1456,7 @@ OptionEditor::just_close_win() void OptionEditor::queue_session_control_changed (Session::ControlType t) { - ui.call_slot (bind (slot (*this, &OptionEditor::session_control_changed), t)); + ui.call_slot (bind (mem_fun(*this, &OptionEditor::session_control_changed), t)); } void @@ -1571,18 +1571,18 @@ OptionEditor::setup_click_editor () click_path_entry.set_name ("OptionsEntry"); click_emphasis_path_entry.set_name ("OptionsEntry"); - click_path_entry.activate.connect (slot (*this, &OptionEditor::click_sound_changed)); - click_emphasis_path_entry.activate.connect (slot (*this, &OptionEditor::click_emphasis_sound_changed)); + click_path_entry.activate.connect (mem_fun(*this, &OptionEditor::click_sound_changed)); + click_emphasis_path_entry.activate.connect (mem_fun(*this, &OptionEditor::click_emphasis_sound_changed)); - click_path_entry.signal_focus_in_event().connect (slot (Keyboard::the_keyboard(), &Keyboard::focus_in_handler)); - click_path_entry.signal_focus_out_event().connect (bind (slot (*this, &OptionEditor::focus_out_event_handler), &OptionEditor::click_sound_changed)); - click_emphasis_path_entry.signal_focus_in_event().connect (slot (Keyboard::the_keyboard(), &Keyboard::focus_in_handler)); - click_emphasis_path_entry.signal_focus_out_event().connect (bind (slot (*this, &OptionEditor::focus_out_event_handler), &OptionEditor::click_emphasis_sound_changed)); + click_path_entry.signal_focus_in_event().connect (mem_fun (Keyboard::the_keyboard(), &Keyboard::focus_in_handler)); + click_path_entry.signal_focus_out_event().connect (bind (mem_fun(*this, &OptionEditor::focus_out_event_handler), &OptionEditor::click_sound_changed)); + click_emphasis_path_entry.signal_focus_in_event().connect (mem_fun (Keyboard::the_keyboard(), &Keyboard::focus_in_handler)); + click_emphasis_path_entry.signal_focus_out_event().connect (bind (mem_fun(*this, &OptionEditor::focus_out_event_handler), &OptionEditor::click_emphasis_sound_changed)); click_browse_button.set_name ("EditorGTKButton"); click_emphasis_browse_button.set_name ("EditorGTKButton"); - click_browse_button.signal_clicked().connect (slot (*this, &OptionEditor::click_browse_clicked)); - click_emphasis_browse_button.signal_clicked().connect (slot (*this, &OptionEditor::click_emphasis_browse_clicked)); + click_browse_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::click_browse_clicked)); + click_emphasis_browse_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::click_emphasis_browse_clicked)); click_packer.set_border_width (12); click_packer.set_spacing (5); @@ -1723,19 +1723,19 @@ OptionEditor::setup_misc_options() debug_keyboard_button.set_active (false); speed_quieten_button.set_active (Config->get_quieten_at_speed() != 1.0f); - hw_monitor_button.signal_clicked().connect (slot (*this, &OptionEditor::hw_monitor_clicked)); - sw_monitor_button.signal_clicked().connect (slot (*this, &OptionEditor::sw_monitor_clicked)); - plugins_stop_button.signal_clicked().connect (slot (*this, &OptionEditor::plugins_stop_with_transport_clicked)); - plugins_on_rec_button.signal_clicked().connect (slot (*this, &OptionEditor::plugins_on_while_recording_clicked)); - verify_remove_last_capture_button.signal_clicked().connect (slot (*this, &OptionEditor::verify_remove_last_capture_clicked)); - auto_connect_inputs_button.signal_clicked().connect (slot (*this, &OptionEditor::auto_connect_inputs_clicked)); - auto_connect_output_physical_button.signal_clicked().connect (slot (*this, &OptionEditor::auto_connect_output_physical_clicked)); - auto_connect_output_master_button.signal_clicked().connect (slot (*this, &OptionEditor::auto_connect_output_master_clicked)); - auto_connect_output_manual_button.signal_clicked().connect (slot (*this, &OptionEditor::auto_connect_output_manual_clicked)); - stop_rec_on_xrun_button.signal_clicked().connect (slot (*this, &OptionEditor::stop_rec_on_xrun_clicked)); - stop_at_end_button.signal_clicked().connect (slot (*this, &OptionEditor::stop_at_end_clicked)); - debug_keyboard_button.signal_clicked().connect (slot (*this, &OptionEditor::debug_keyboard_clicked)); - speed_quieten_button.signal_clicked().connect (slot (*this, &OptionEditor::speed_quieten_clicked)); + hw_monitor_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::hw_monitor_clicked)); + sw_monitor_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::sw_monitor_clicked)); + plugins_stop_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::plugins_stop_with_transport_clicked)); + plugins_on_rec_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::plugins_on_while_recording_clicked)); + verify_remove_last_capture_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::verify_remove_last_capture_clicked)); + auto_connect_inputs_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_connect_inputs_clicked)); + auto_connect_output_physical_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_connect_output_physical_clicked)); + auto_connect_output_master_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_connect_output_master_clicked)); + auto_connect_output_manual_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_connect_output_manual_clicked)); + stop_rec_on_xrun_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::stop_rec_on_xrun_clicked)); + stop_at_end_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::stop_at_end_clicked)); + debug_keyboard_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::debug_keyboard_clicked)); + speed_quieten_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::speed_quieten_clicked)); } void @@ -1875,7 +1875,7 @@ OptionEditor::setup_keyboard_options () edit_modifier_combo.get_entry()->set_editable (false); edit_modifier_combo.get_entry()->set_name ("OptionsEntry"); edit_modifier_combo.set_use_arrows_always (true); - edit_modifier_combo.get_popwin()->unmap_event.connect (slot (*this, &OptionEditor::edit_modifier_chosen)); + edit_modifier_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &OptionEditor::edit_modifier_chosen)); for (int x = 0; modifiers[x].name; ++x) { if (modifiers[x].modifier == Keyboard::edit_modifier ()) { @@ -1899,13 +1899,13 @@ OptionEditor::setup_keyboard_options () edit_button_spin.set_name ("OptionsEntry"); edit_button_adjustment.set_value (Keyboard::edit_button()); - edit_button_adjustment.value_changed.connect (slot (*this, &OptionEditor::edit_button_changed)); + edit_button_adjustment.value_changed.connect (mem_fun(*this, &OptionEditor::edit_button_changed)); delete_modifier_combo.set_popdown_strings (dumb); delete_modifier_combo.get_entry()->set_editable (false); delete_modifier_combo.get_entry()->set_name ("OptionsEntry"); delete_modifier_combo.set_use_arrows_always (true); - delete_modifier_combo.get_popwin()->unmap_event.connect (slot (*this, &OptionEditor::delete_modifier_chosen)); + delete_modifier_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &OptionEditor::delete_modifier_chosen)); for (int x = 0; modifiers[x].name; ++x) { if (modifiers[x].modifier == Keyboard::delete_modifier ()) { @@ -1929,13 +1929,13 @@ OptionEditor::setup_keyboard_options () delete_button_spin.set_name ("OptionsEntry"); delete_button_adjustment.set_value (Keyboard::delete_button()); - delete_button_adjustment.value_changed.connect (slot (*this, &OptionEditor::delete_button_changed)); + delete_button_adjustment.value_changed.connect (mem_fun(*this, &OptionEditor::delete_button_changed)); snap_modifier_combo.set_popdown_strings (dumb); snap_modifier_combo.get_entry()->set_editable (false); snap_modifier_combo.get_entry()->set_name ("OptionsEntry"); snap_modifier_combo.set_use_arrows_always (true); - snap_modifier_combo.get_popwin()->unmap_event.connect (slot (*this, &OptionEditor::snap_modifier_chosen)); + snap_modifier_combo.get_popwin()->unmap_event.connect (mem_fun(*this, &OptionEditor::snap_modifier_chosen)); for (int x = 0; modifiers[x].name; ++x) { if (modifiers[x].modifier == (guint) Keyboard::snap_modifier ()) { diff --git a/gtk2_ardour/panner2d.cc b/gtk2_ardour/panner2d.cc index 2b5724dec5..0c04337b87 100644 --- a/gtk2_ardour/panner2d.cc +++ b/gtk2_ardour/panner2d.cc @@ -64,7 +64,7 @@ Panner2d::Panner2d (Panner& p, int32_t w, int32_t h) allow_y = false; allow_target = false; - panner.StateChanged.connect (slot (*this, &Panner2d::handle_state_change)); + panner.StateChanged.connect (mem_fun(*this, &Panner2d::handle_state_change)); drag_target = 0; set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK); @@ -216,7 +216,7 @@ Panner2d::remove_target (int which) void Panner2d::handle_state_change () { - ENSURE_GUI_THREAD(slot (*this, &Panner2d::handle_state_change)); + ENSURE_GUI_THREAD(mem_fun(*this, &Panner2d::handle_state_change)); queue_draw (); } @@ -580,7 +580,7 @@ Panner2d::show_context_menu () items.push_back (CheckMenuElem (_("Bypass"))); bypass_menu_item = static_cast (items.back()); - bypass_menu_item->toggled.connect (slot (*this, &Panner2d::toggle_bypass)); + bypass_menu_item->toggled.connect (mem_fun(*this, &Panner2d::toggle_bypass)); } diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index ea82ed2f3d..5eeead8a17 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -117,12 +117,12 @@ PannerUI::PannerUI (IO& io, Session& s) panning_link_direction_button.add (*(manage (new Pixmap (forwdblarrow_xpm)))); panning_link_direction_button.clicked.connect - (slot (*this, &PannerUI::panning_link_direction_clicked)); + (mem_fun(*this, &PannerUI::panning_link_direction_clicked)); panning_link_button.button_press_event.connect - (slot (*this, &PannerUI::panning_link_button_press)); + (mem_fun(*this, &PannerUI::panning_link_button_press)); panning_link_button.button_release_event.connect - (slot (*this, &PannerUI::panning_link_button_release)); + (mem_fun(*this, &PannerUI::panning_link_button_release)); panning_up.set_border_width (3); panning_down.set_border_width (3); @@ -143,9 +143,9 @@ PannerUI::PannerUI (IO& io, Session& s) panner = 0; - _io.panner().Changed.connect (slot (*this, &PannerUI::panner_changed)); - _io.panner().LinkStateChanged.connect (slot (*this, &PannerUI::update_pan_linkage)); - _io.panner().StateChanged.connect (slot (*this, &PannerUI::update_pan_state)); + _io.panner().Changed.connect (mem_fun(*this, &PannerUI::panner_changed)); + _io.panner().LinkStateChanged.connect (mem_fun(*this, &PannerUI::update_pan_linkage)); + _io.panner().StateChanged.connect (mem_fun(*this, &PannerUI::update_pan_state)); pan_changed (0); update_pan_sensitive (); @@ -183,7 +183,7 @@ PannerUI::panning_link_direction_clicked() void PannerUI::update_pan_linkage () { - ENSURE_GUI_THREAD(slot (*this, &PannerUI::update_pan_linkage)); + ENSURE_GUI_THREAD(mem_fun(*this, &PannerUI::update_pan_linkage)); bool x = _io.panner().linked(); bool bx = panning_link_button.get_active(); @@ -272,7 +272,7 @@ PannerUI::entry_focus_event (GdkEventFocus* ev) void PannerUI::panner_changed () { - ENSURE_GUI_THREAD (slot (*this, &PannerUI::panner_changed)); + ENSURE_GUI_THREAD (mem_fun(*this, &PannerUI::panner_changed)); setup_pan (); } @@ -280,7 +280,7 @@ void PannerUI::update_pan_state () { /* currently nothing to do */ - // ENSURE_GUI_THREAD (slot (*this, &PannerUI::update_panner_state)); + // ENSURE_GUI_THREAD (mem_fun(*this, &PannerUI::update_panner_state)); } void @@ -319,13 +319,13 @@ 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 (slot (*this, &PannerUI::pan_adjustment_changed), (uint32_t) asz)); + pan_adjustments.back()->value_changed.connect (bind (mem_fun(*this, &PannerUI::pan_adjustment_changed), (uint32_t) asz)); - _io.panner()[asz]->Changed.connect (bind (slot (*this, &PannerUI::pan_value_changed), (uint32_t) asz)); + _io.panner()[asz]->Changed.connect (bind (mem_fun(*this, &PannerUI::pan_value_changed), (uint32_t) asz)); bc = new BarController (*pan_adjustments[asz], &_io.panner()[asz]->midi_control(), - bind (slot (*this, &PannerUI::pan_printer), pan_adjustments[asz])); + bind (mem_fun(*this, &PannerUI::pan_printer), pan_adjustments[asz])); if (_session.midi_port()) { _io.panner()[asz]->reset_midi_control (_session.midi_port(), true); @@ -334,18 +334,18 @@ PannerUI::setup_pan () bc->set_name ("PanSlider"); bc->set_shadow_type (GTK_SHADOW_NONE); bc->set_style (BarController::Line); - bc->get_spin_button().signal_focus_in_event().connect (slot (*this, &PannerUI::entry_focus_event)); - bc->get_spin_button().signal_focus_out_event().connect (slot (*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 (slot (_io, &IO::start_pan_touch), (uint32_t) asz)); - bc->StopGesture.connect (bind (slot (_io, &IO::end_pan_touch), (uint32_t) asz)); + 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)); char buf[64]; snprintf (buf, sizeof (buf), _("panner for channel %u"), asz + 1); ARDOUR_UI::instance()->tooltips().set_tip (bc->event_widget(), buf); bc->event_widget().button_release_event.connect - (bind (slot (*this, &PannerUI::pan_button_event), (uint32_t) asz)); + (bind (mem_fun(*this, &PannerUI::pan_button_event), (uint32_t) asz)); pan_bars.push_back (bc); switch (_width) { @@ -436,17 +436,17 @@ PannerUI::build_pan_menu (uint32_t which) (dynamic_cast (items.back()))->set_active (_io.panner()[which]->muted()); (dynamic_cast (items.back()))->toggled.connect - (bind (slot (*this, &PannerUI::pan_mute), which)); + (bind (mem_fun(*this, &PannerUI::pan_mute), which)); - items.push_back (CheckMenuElem (_("Bypass"), slot (*this, &PannerUI::pan_bypass_toggle))); + items.push_back (CheckMenuElem (_("Bypass"), mem_fun(*this, &PannerUI::pan_bypass_toggle))); bypass_menu_item = static_cast (items.back()); /* set state first, connect second */ bypass_menu_item->set_active (_io.panner().bypassed()); - bypass_menu_item->toggled.connect (slot (*this, &PannerUI::pan_bypass_toggle)); + bypass_menu_item->toggled.connect (mem_fun(*this, &PannerUI::pan_bypass_toggle)); - items.push_back (MenuElem (_("Reset"), slot (*this, &PannerUI::pan_reset))); + items.push_back (MenuElem (_("Reset"), mem_fun(*this, &PannerUI::pan_reset))); items.push_back (SeparatorElem()); items.push_back (MenuElem (_("Reset all"))); } @@ -567,7 +567,7 @@ PannerUI::pan_adjustment_changed (uint32_t which) void PannerUI::pan_value_changed (uint32_t which) { - ENSURE_GUI_THREAD (bind (slot (*this, &PannerUI::pan_value_changed), which)); + ENSURE_GUI_THREAD (bind (mem_fun(*this, &PannerUI::pan_value_changed), which)); if (which < _io.panner().size()) { float xpos; diff --git a/gtk2_ardour/playlist_selector.cc b/gtk2_ardour/playlist_selector.cc index e4ae6e260e..d2bd765cce 100644 --- a/gtk2_ardour/playlist_selector.cc +++ b/gtk2_ardour/playlist_selector.cc @@ -64,7 +64,7 @@ PlaylistSelector::PlaylistSelector () scroller.add_with_viewport (tree); scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - close_button.signal_clicked().connect (slot (*this, &PlaylistSelector::close_button_click)); + close_button.signal_clicked().connect (mem_fun(*this, &PlaylistSelector::close_button_click)); vpacker.set_border_width (6); vpacker.set_spacing (12); @@ -173,7 +173,7 @@ PlaylistSelector::show_for (RouteUI* ruix) } show_all (); - select_connection = tree.tree_select_row.connect (slot (*this, &PlaylistSelector::row_selected)); + select_connection = tree.tree_select_row.connect (mem_fun(*this, &PlaylistSelector::row_selected)); } void @@ -204,12 +204,12 @@ PlaylistSelector::add_playlist_to_map (Playlist *pl) void PlaylistSelector::set_session (Session* s) { - ENSURE_GUI_THREAD(bind (slot (*this, &PlaylistSelector::set_session), s)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &PlaylistSelector::set_session), s)); session = s; if (session) { - session->going_away.connect (bind (slot (*this, &PlaylistSelector::set_session), static_cast (0))); + session->going_away.connect (bind (mem_fun(*this, &PlaylistSelector::set_session), static_cast (0))); } } diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index 8f91d956ea..dee19256a7 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -126,36 +126,36 @@ PluginSelector::PluginSelector (PluginManager *mgr) ladspa_display.clist().column(1).set_auto_resize (true); o_selector.clist().column(0).set_auto_resize (true); - ladspa_display.selection_made.connect (slot(*this, &PluginSelector::i_plugin_selected)); - ladspa_display.choice_made.connect(slot(*this, &PluginSelector::i_plugin_chosen)); - ladspa_display.clist().click_column.connect(bind (slot(*this, &PluginSelector::column_clicked), ladspa_display.clist().gobj())); + ladspa_display.selection_made.connect (mem_fun(*this, &PluginSelector::i_plugin_selected)); + ladspa_display.choice_made.connect(mem_fun(*this, &PluginSelector::i_plugin_chosen)); + ladspa_display.clist().click_column.connect(bind (mem_fun(*this, &PluginSelector::column_clicked), ladspa_display.clist().gobj())); #ifdef VST_SUPPORT if (Config->get_use_vst()) { - vst_display.selection_made.connect (slot(*this, &PluginSelector::i_plugin_selected)); - vst_display.choice_made.connect(slot(*this, &PluginSelector::i_plugin_chosen)); - vst_display.clist().click_column.connect(bind (slot(*this, &PluginSelector::column_clicked), vst_display.clist().gobj())); + vst_display.selection_made.connect (mem_fun(*this, &PluginSelector::i_plugin_selected)); + vst_display.choice_made.connect(mem_fun(*this, &PluginSelector::i_plugin_chosen)); + vst_display.clist().click_column.connect(bind (mem_fun(*this, &PluginSelector::column_clicked), vst_display.clist().gobj())); } #endif - o_selector.selection_made.connect(slot(*this, &PluginSelector::o_plugin_selected)); - o_selector.choice_made.connect(slot(*this,&PluginSelector::o_plugin_chosen)); - btn_update-.signal_clicked().connect (slot(*this, &PluginSelector::btn_update_clicked)); - btn_add->clicked.connect(slot(*this, &PluginSelector::btn_add_clicked)); - btn_remove->clicked.connect(slot(*this, &PluginSelector::btn_remove_clicked)); - btn_ok->clicked.connect(slot(*this, &PluginSelector::btn_ok_clicked)); - btn_cancel->clicked.connect(slot(*this,&PluginSelector::btn_cancel_clicked)); - delete_event.connect (slot (*this, &PluginSelector::wm_close)); + 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_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)); } void PluginSelector::set_session (Session* s) { - ENSURE_GUI_THREAD(bind (slot (*this, &PluginSelector::set_session), s)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &PluginSelector::set_session), s)); session = s; if (session) { - session->going_away.connect (bind (slot (*this, &PluginSelector::set_session), static_cast (0))); + session->going_away.connect (bind (mem_fun(*this, &PluginSelector::set_session), static_cast (0))); } } diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index b1fd13b32b..aa966ae453 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -94,16 +94,16 @@ PluginUIWindow::PluginUIWindow (AudioEngine &engine, PluginInsert& insert, bool _pluginui = pu; add (*pu); - map_event.connect (slot (*pu, &PluginUI::start_updating)); - unmap_event.connect (slot (*pu, &PluginUI::stop_updating)); + map_event.connect (mem_fun (*pu, &PluginUI::start_updating)); + unmap_event.connect (mem_fun (*pu, &PluginUI::stop_updating)); } set_position (Gtk::WIN_POS_MOUSE); set_name ("PluginEditor"); add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK); - delete_event.connect (bind (slot (just_hide_it), reinterpret_cast (this))); - insert.GoingAway.connect (slot (*this, &PluginUIWindow::plugin_going_away)); + delete_event.connect (bind (ptr_fun (just_hide_it), reinterpret_cast (this))); + insert.GoingAway.connect (mem_fun(*this, &PluginUIWindow::plugin_going_away)); if (scrollable) { gint h = _pluginui->get_preferred_height (); @@ -167,7 +167,7 @@ PluginUI::PluginUI (AudioEngine &engine, PluginInsert& pi, bool scrollable) name_ebox.set_name ("PluginNameBox"); } - insert.active_changed.connect (slot (*this, &PluginUI::redirect_active_changed)); + insert.active_changed.connect (mem_fun(*this, &PluginUI::redirect_active_changed)); bypass_button.set_active (!insert.active()); build (engine); @@ -476,8 +476,8 @@ 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); control_ui->combo->set_popdown_strings(setup_scale_values(port_index, control_ui)); - control_ui->combo->get_popwin()->unmap_event.connect(bind (slot (*this, &PluginUI::control_combo_changed), control_ui)); - plugin.ParameterChanged.connect (bind (slot (*this, &PluginUI::parameter_changed), control_ui)); + control_ui->combo->get_popwin()->unmap_event.connect(bind (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 (slot (*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); @@ -542,7 +542,7 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, MIDI::Contr // control_ui->adjustment, // mcontrol); - sigc::slot pslot = sigc::bind (slot (*this, &PluginUI::print_parameter), (uint32_t) port_index); + sigc::slot pslot = sigc::bind (mem_fun(*this, &PluginUI::print_parameter), (uint32_t) port_index); control_ui->control = new BarController (*control_ui->adjustment, mcontrol, pslot); control_ui->control->set_size_request (200, 15); @@ -550,11 +550,11 @@ 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 (slot (*this, &PluginUI::entry_focus_event)); - control_ui->control->get_spin_button().signal_focus_out_event().connect (slot (*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 (slot (*this, &PluginUI::start_touch), control_ui)); - control_ui->control->StopGesture.connect (bind (slot (*this, &PluginUI::stop_touch), control_ui)); + 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,14 +577,14 @@ 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 (slot (*this, &PluginUI::control_adjustment_changed), control_ui)); - control_ui->automate_button.signal_clicked().connect (bind (slot (*this, &PluginUI::astate_clicked), control_ui, (uint32_t) port_index)); + control_ui->adjustment->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); - plugin.ParameterChanged.connect (bind (slot (*this, &PluginUI::parameter_changed), control_ui)); + plugin.ParameterChanged.connect (bind (mem_fun(*this, &PluginUI::parameter_changed), control_ui)); insert.automation_list (port_index).automation_state_changed.connect - (bind (slot (*this, &PluginUI::automation_state_changed), control_ui)); + (bind (mem_fun(*this, &PluginUI::automation_state_changed), control_ui)); } else if (plugin.parameter_is_output (port_index)) { @@ -627,7 +627,7 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, MIDI::Contr output_controls.push_back (control_ui); } - plugin.ParameterChanged.connect (bind (slot (*this, &PluginUI::parameter_changed), control_ui)); + plugin.ParameterChanged.connect (bind (mem_fun(*this, &PluginUI::parameter_changed), control_ui)); return control_ui; } @@ -657,13 +657,13 @@ PluginUI::astate_clicked (ControlUI* cui, uint32_t port) items.clear (); items.push_back (MenuElem (_("off"), - bind (slot (*this, &PluginUI::set_automation_state), (AutoState) Off, cui))); + bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Off, cui))); items.push_back (MenuElem (_("play"), - bind (slot (*this, &PluginUI::set_automation_state), (AutoState) Play, cui))); + bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Play, cui))); items.push_back (MenuElem (_("write"), - bind (slot (*this, &PluginUI::set_automation_state), (AutoState) Write, cui))); + bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Write, cui))); items.push_back (MenuElem (_("touch"), - bind (slot (*this, &PluginUI::set_automation_state), (AutoState) Touch, cui))); + bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Touch, cui))); automation_menu->popup (1, 0); } @@ -696,7 +696,7 @@ PluginUI::parameter_changed (uint32_t abs_port_id, float val, ControlUI* cui) if (cui->port_index == abs_port_id) { if (!cui->update_pending) { cui->update_pending = true; - Gtkmm2ext::UI::instance()->call_slot (bind (slot (*this, &PluginUI::update_control_display), cui)); + Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &PluginUI::update_control_display), cui)); } } } @@ -761,7 +761,7 @@ PluginUI::control_combo_changed (GdkEventAny* ignored, ControlUI* cui) void PluginUIWindow::plugin_going_away (ARDOUR::Redirect* ignored) { - ENSURE_GUI_THREAD(bind (slot (*this, &PluginUIWindow::plugin_going_away), ignored)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &PluginUIWindow::plugin_going_away), ignored)); _pluginui->stop_updating(0); delete_when_idle (this); @@ -781,7 +781,7 @@ PluginUI::entry_focus_event (GdkEventFocus* ev) void PluginUI::redirect_active_changed (Redirect* r, void* src) { - ENSURE_GUI_THREAD(bind (slot (*this, &PluginUI::redirect_active_changed), r, src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &PluginUI::redirect_active_changed), r, src)); bypass_button.set_active (!r->active()); } @@ -792,7 +792,7 @@ PluginUI::start_updating (GdkEventAny *ev) if (output_controls.size() > 0 ) { screen_update_connection.disconnect(); screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect - (slot (*this, &PluginUI::output_update)); + (mem_fun(*this, &PluginUI::output_update)); } return FALSE; } @@ -874,13 +874,13 @@ PlugUIBase::PlugUIBase (PluginInsert& pi) combo.set_use_arrows_always(true); combo.set_popdown_strings(plugin.get_presets()); combo.get_entry()->set_text(""); - combo.get_popwin()->unmap_event.connect(slot (*this, &PlugUIBase::setting_selected)); + combo.get_popwin()->unmap_event.connect(mem_fun(*this, &PlugUIBase::setting_selected)); save_button.set_name ("PluginSaveButton"); - save_button.clicked.connect(slot (*this, &PlugUIBase::save_plugin_setting)); + save_button.clicked.connect(mem_fun(*this, &PlugUIBase::save_plugin_setting)); bypass_button.set_name ("PluginBypassButton"); - bypass_button.toggled.connect (slot (*this, &PlugUIBase::bypass_toggled)); + bypass_button.toggled.connect (mem_fun(*this, &PlugUIBase::bypass_toggled)); } gint diff --git a/gtk2_ardour/prompter.cc b/gtk2_ardour/prompter.cc index 9236d2a510..0839a5c8a7 100644 --- a/gtk2_ardour/prompter.cc +++ b/gtk2_ardour/prompter.cc @@ -26,7 +26,7 @@ using namespace sigc; ArdourPrompter::ArdourPrompter (bool modal) : Gtkmm2ext::Prompter (modal) { - the_entry().signal_focus_in_event().connect (slot (ARDOUR_UI::generic_focus_in_event)); - the_entry().signal_focus_out_event().connect (slot (ARDOUR_UI::generic_focus_out_event)); + the_entry().signal_focus_in_event().connect (ptr_fun (ARDOUR_UI::generic_focus_in_event)); + the_entry().signal_focus_out_event().connect (ptr_fun (ARDOUR_UI::generic_focus_out_event)); } diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc index f2c332f97c..bbd43b731c 100644 --- a/gtk2_ardour/redirect_box.cc +++ b/gtk2_ardour/redirect_box.cc @@ -88,12 +88,12 @@ RedirectBox::RedirectBox (Placement pcmnt, Session& sess, Route& rt, PluginSelec redirect_display.set_button_actions (1, 0); redirect_display.set_button_actions (2, 0); redirect_display.set_button_actions (3, 0); - redirect_display.drag_begin.connect (slot (*this, &RedirectBox::redirect_drag_begin)); - redirect_display.drag_end.connect (slot (*this, &RedirectBox::redirect_drag_end)); + 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_shadow_type (Gtk::SHADOW_IN); - redirect_display.row_move.connect (slot (*this, &RedirectBox::redirects_reordered)); + redirect_display.row_move.connect (mem_fun(*this, &RedirectBox::redirects_reordered)); redirect_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); @@ -106,15 +106,15 @@ RedirectBox::RedirectBox (Placement pcmnt, Session& sess, Route& rt, PluginSelec redirect_eventbox.show (); show_all (); - _route.redirects_changed.connect (slot (*this, &RedirectBox::redirects_changed)); + _route.redirects_changed.connect (mem_fun(*this, &RedirectBox::redirects_changed)); - redirect_display.button_press_event.connect (slot (*this, &RedirectBox::redirect_button)); - redirect_display.button_release_event.connect (slot (*this, &RedirectBox::redirect_button)); + redirect_display.button_press_event.connect (mem_fun(*this, &RedirectBox::redirect_button)); + redirect_display.button_release_event.connect (mem_fun(*this, &RedirectBox::redirect_button)); - redirect_display.button_release_event.connect_after (slot (do_not_propagate)); - _plugin_selector.hide.connect(slot(*this,&RedirectBox::disconnect_newplug)); + redirect_display.button_release_event.connect_after (ptr_fun (do_not_propagate)); + _plugin_selector.hide.connect(mem_fun(*this,&RedirectBox::disconnect_newplug)); - redirect_display.click_column.connect (slot (*this, &RedirectBox::show_redirect_menu)); + redirect_display.click_column.connect (mem_fun(*this, &RedirectBox::show_redirect_menu)); set_stuff_from_route (); @@ -210,8 +210,8 @@ RedirectBox::build_send_action_menu () send_action_menu->set_name ("ArdourContextMenu"); MenuList& items = send_action_menu->items(); - items.push_back (MenuElem (_("New send"), slot (*this, &RedirectBox::new_send))); - items.push_back (MenuElem (_("Show send controls"), slot (*this, &RedirectBox::show_send_controls))); + items.push_back (MenuElem (_("New send"), mem_fun(*this, &RedirectBox::new_send))); + items.push_back (MenuElem (_("Show send controls"), mem_fun(*this, &RedirectBox::show_send_controls))); } void @@ -287,7 +287,7 @@ RedirectBox::redirect_button (GdkEventButton *ev) if (redirect && Keyboard::is_delete_event (ev)) { - Gtk::Main::idle.connect (bind (slot (*this, &RedirectBox::idle_delete_redirect), redirect)); + Gtk::Main::idle.connect (bind (mem_fun(*this, &RedirectBox::idle_delete_redirect), redirect)); return TRUE; } else if (redirect && (Keyboard::is_edit_event (ev) || ev->type == GDK_2BUTTON_PRESS)) { @@ -357,28 +357,28 @@ RedirectBox::build_redirect_menu (CList& clist) /* new stuff */ - items.push_back (MenuElem (_("New Plugin ..."), slot (*this, &RedirectBox::choose_plugin))); - items.push_back (MenuElem (_("New Insert"), slot (*this, &RedirectBox::choose_insert))); - items.push_back (MenuElem (_("New Send ..."), slot (*this, &RedirectBox::choose_send))); + items.push_back (MenuElem (_("New Plugin ..."), mem_fun(*this, &RedirectBox::choose_plugin))); + items.push_back (MenuElem (_("New Insert"), mem_fun(*this, &RedirectBox::choose_insert))); + items.push_back (MenuElem (_("New Send ..."), mem_fun(*this, &RedirectBox::choose_send))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Clear"), slot (*this, &RedirectBox::clear_redirects))); + items.push_back (MenuElem (_("Clear"), mem_fun(*this, &RedirectBox::clear_redirects))); items.push_back (SeparatorElem()); /* standard editing stuff */ - items.push_back (MenuElem (_("Cut"), slot (*this, &RedirectBox::cut_redirects))); + items.push_back (MenuElem (_("Cut"), mem_fun(*this, &RedirectBox::cut_redirects))); selection_dependent_items.push_back (items.back()); - items.push_back (MenuElem (_("Copy"), slot (*this, &RedirectBox::copy_redirects))); + items.push_back (MenuElem (_("Copy"), mem_fun(*this, &RedirectBox::copy_redirects))); selection_dependent_items.push_back (items.back()); - items.push_back (MenuElem (_("Paste"), slot (*this, &RedirectBox::paste_redirects))); + items.push_back (MenuElem (_("Paste"), mem_fun(*this, &RedirectBox::paste_redirects))); redirect_paste_item = items.back(); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Rename"), slot (*this, &RedirectBox::rename_redirects))); + items.push_back (MenuElem (_("Rename"), mem_fun(*this, &RedirectBox::rename_redirects))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Select all"), slot (*this, &RedirectBox::select_all_redirects))); - items.push_back (MenuElem (_("Deselect all"), slot (*this, &RedirectBox::deselect_all_redirects))); + items.push_back (MenuElem (_("Select all"), mem_fun(*this, &RedirectBox::select_all_redirects))); + items.push_back (MenuElem (_("Deselect all"), mem_fun(*this, &RedirectBox::deselect_all_redirects))); #if LATER Menu *select_sub_menu = manage (new Menu); @@ -395,25 +395,25 @@ RedirectBox::build_redirect_menu (CList& clist) /* activation */ items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Activate"), bind (slot (*this, &RedirectBox::for_selected_redirects), + items.push_back (MenuElem (_("Activate"), bind (mem_fun(*this, &RedirectBox::for_selected_redirects), &RedirectBox::activate_redirect))); selection_dependent_items.push_back (items.back()); - items.push_back (MenuElem (_("Deactivate"), bind (slot (*this, &RedirectBox::for_selected_redirects), + items.push_back (MenuElem (_("Deactivate"), bind (mem_fun(*this, &RedirectBox::for_selected_redirects), &RedirectBox::deactivate_redirect))); selection_dependent_items.push_back (items.back()); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Activate All"), bind (slot (*this, &RedirectBox::all_redirects_active), true))); - items.push_back (MenuElem (_("Deactivate All"), bind (slot (*this, &RedirectBox::all_redirects_active), false))); + items.push_back (MenuElem (_("Activate All"), bind (mem_fun(*this, &RedirectBox::all_redirects_active), true))); + items.push_back (MenuElem (_("Deactivate All"), bind (mem_fun(*this, &RedirectBox::all_redirects_active), false))); /* show editors */ items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Edit"), bind (slot (*this, &RedirectBox::for_selected_redirects), + items.push_back (MenuElem (_("Edit"), bind (mem_fun(*this, &RedirectBox::for_selected_redirects), &RedirectBox::edit_redirect))); selection_dependent_items.push_back (items.back()); - menu->map_event.connect (slot (*this, &RedirectBox::redirect_menu_map_handler)); + menu->map_event.connect (mem_fun(*this, &RedirectBox::redirect_menu_map_handler)); return menu; } @@ -461,7 +461,7 @@ RedirectBox::insert_plugin_chosen (Plugin *plugin) Redirect *redirect = new PluginInsert (_session, *plugin, _placement); - redirect->active_changed.connect (slot (*this, &RedirectBox::show_redirect_active)); + redirect->active_changed.connect (mem_fun(*this, &RedirectBox::show_redirect_active)); uint32_t err_streams; @@ -534,7 +534,7 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, IO& io) vpacker.pack_start (label); vpacker.pack_start (button_box); - button.signal_clicked().connect (bind (slot (dialog, &ArdourDialog::stop), 0)); + button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 0)); dialog.add (vpacker); dialog.set_name (X_("PluginIODialog")); @@ -552,7 +552,7 @@ void RedirectBox::choose_insert () { Redirect *redirect = new PortInsert (_session, _placement); - redirect->active_changed.connect (slot (*this, &RedirectBox::show_redirect_active)); + redirect->active_changed.connect (mem_fun(*this, &RedirectBox::show_redirect_active)); _route.add_redirect (redirect, this); } @@ -568,7 +568,7 @@ RedirectBox::choose_send () IOSelectorWindow *ios = new IOSelectorWindow (_session, *send, false, true); ios->show_all (); - ios->selector().Finished.connect (bind (slot (*this, &RedirectBox::send_io_finished), static_cast(send), ios)); + ios->selector().Finished.connect (bind (mem_fun(*this, &RedirectBox::send_io_finished), static_cast(send), ios)); } void @@ -595,14 +595,14 @@ RedirectBox::disconnect_newplug () void RedirectBox::show_plugin_selector () { - newplug_connection = _plugin_selector.PluginCreated.connect (slot (*this,&RedirectBox::insert_plugin_chosen)); + newplug_connection = _plugin_selector.PluginCreated.connect (mem_fun(*this,&RedirectBox::insert_plugin_chosen)); _plugin_selector.show_all (); } void RedirectBox::redirects_changed (void *src) { - ENSURE_GUI_THREAD(bind (slot (*this, &RedirectBox::redirects_changed), src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &RedirectBox::redirects_changed), src)); redirect_display.freeze (); redirect_display.clear (); @@ -644,9 +644,9 @@ RedirectBox::add_redirect_to_display (Redirect *redirect) show_redirect_active (redirect, this); redirect_active_connections.push_back - (redirect->active_changed.connect (slot (*this, &RedirectBox::show_redirect_active))); + (redirect->active_changed.connect (mem_fun(*this, &RedirectBox::show_redirect_active))); redirect_name_connections.push_back - (redirect->name_changed.connect (bind (slot (*this, &RedirectBox::show_redirect_name), redirect))); + (redirect->name_changed.connect (bind (mem_fun(*this, &RedirectBox::show_redirect_name), redirect))); } string @@ -714,7 +714,7 @@ RedirectBox::build_redirect_tooltip (CList& clist, EventBox& box, string start) void RedirectBox::show_redirect_name (void* src, Redirect *redirect) { - ENSURE_GUI_THREAD(bind (slot (*this, &RedirectBox::show_redirect_name), src, redirect)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &RedirectBox::show_redirect_name), src, redirect)); show_redirect_active (redirect, src); } @@ -722,7 +722,7 @@ RedirectBox::show_redirect_name (void* src, Redirect *redirect) void RedirectBox::show_redirect_active (Redirect *redirect, void *src) { - ENSURE_GUI_THREAD(bind (slot (*this, &RedirectBox::show_redirect_active), redirect, src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &RedirectBox::show_redirect_active), redirect, src)); CList_Helpers::RowIterator ri; CList *clist; @@ -749,7 +749,7 @@ RedirectBox::redirects_reordered (gint src, gint dst) something for idle time. */ - Gtk::Main::idle.connect (slot (*this, &RedirectBox::compute_redirect_sort_keys)); + Gtk::Main::idle.connect (mem_fun(*this, &RedirectBox::compute_redirect_sort_keys)); } gint @@ -790,7 +790,7 @@ outputs do not work correctly.")); vpacker.pack_start (label); vpacker.pack_start (button_box); - button.signal_clicked().connect (bind (slot (dialog, &ArdourDialog::stop), 0)); + button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 0)); dialog.add (vpacker); dialog.set_name (X_("PluginIODialog")); @@ -923,9 +923,9 @@ RedirectBox::rename_redirect (Redirect* redirect) ok_button.set_name ("EditorGTKButton"); cancel_button.set_name ("EditorGTKButton"); - entry.activate.connect (bind (slot (dialog, &ArdourDialog::stop), 1)); - cancel_button.signal_clicked().connect (bind (slot (dialog, &ArdourDialog::stop), -1)); - ok_button.signal_clicked().connect (bind (slot (dialog, &ArdourDialog::stop), 1)); + entry.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)); /* recurse */ diff --git a/gtk2_ardour/region_editor.cc b/gtk2_ardour/region_editor.cc index 5e1572617c..d3fb96ee63 100644 --- a/gtk2_ardour/region_editor.cc +++ b/gtk2_ardour/region_editor.cc @@ -70,8 +70,8 @@ AudioRegionEditor::AudioRegionEditor (Session&s, AudioRegion& r, AudioRegionView name_entry.set_name ("AudioRegionEditorEntry"); name_label.set_name ("AudioRegionEditorLabel"); - name_entry.signal_focus_in_event().connect (slot (*this, &AudioRegionEditor::focus_change)); - name_entry.signal_focus_out_event().connect (slot (*this, &AudioRegionEditor::focus_change)); + name_entry.signal_focus_in_event().connect (mem_fun(*this, &AudioRegionEditor::focus_change)); + name_entry.signal_focus_out_event().connect (mem_fun(*this, &AudioRegionEditor::focus_change)); name_hbox.set_spacing (5); name_hbox.pack_start (name_label, false, false); @@ -204,9 +204,9 @@ AudioRegionEditor::AudioRegionEditor (Session&s, AudioRegion& r, AudioRegionView fade_in_length_spinner.set_digits (3); - fade_in_length_spinner.signal_focus_in_event().connect (slot (*this, &AudioRegionEditor::focus_change)); - fade_in_length_spinner.signal_focus_out_event().connect (slot (*this, &AudioRegionEditor::focus_change)); - fade_in_length_spinner.activate.connect (slot (*this, &AudioRegionEditor::activation)); + fade_in_length_spinner.signal_focus_in_event().connect (mem_fun(*this, &AudioRegionEditor::focus_change)); + fade_in_length_spinner.signal_focus_out_event().connect (mem_fun(*this, &AudioRegionEditor::focus_change)); + fade_in_length_spinner.activate.connect (mem_fun(*this, &AudioRegionEditor::activation)); Gtkmm2ext::set_size_request_to_display_given_text (fade_in_length_spinner, "500g", 20, -1); @@ -240,9 +240,9 @@ AudioRegionEditor::AudioRegionEditor (Session&s, AudioRegion& r, AudioRegionView fade_out_length_spinner.set_digits (3); - fade_out_length_spinner.signal_focus_in_event().connect (slot (*this, &AudioRegionEditor::focus_change)); - fade_out_length_spinner.signal_focus_out_event().connect (slot (*this, &AudioRegionEditor::focus_change)); - fade_out_length_spinner.activate.connect (slot (*this, &AudioRegionEditor::activation)); + fade_out_length_spinner.signal_focus_in_event().connect (mem_fun(*this, &AudioRegionEditor::focus_change)); + fade_out_length_spinner.signal_focus_out_event().connect (mem_fun(*this, &AudioRegionEditor::focus_change)); + fade_out_length_spinner.activate.connect (mem_fun(*this, &AudioRegionEditor::activation)); Gtkmm2ext::set_size_request_to_display_given_text (fade_out_length_spinner, "500g", 20, -1); @@ -271,7 +271,7 @@ AudioRegionEditor::AudioRegionEditor (Session&s, AudioRegion& r, AudioRegionView set_name ("AudioRegionEditorWindow"); add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK); - delete_event.connect (bind (slot (just_hide_it), static_cast (this))); + delete_event.connect (bind (ptr_fun (just_hide_it), static_cast (this))); string title = _("ardour: region "); title += _region.name(); @@ -303,7 +303,7 @@ AudioRegionEditor::AudioRegionEditor (Session&s, AudioRegion& r, AudioRegionView envelope_view_button.set_active (false); } - _region.StateChanged.connect (slot (*this, &AudioRegionEditor::region_changed)); + _region.StateChanged.connect (mem_fun(*this, &AudioRegionEditor::region_changed)); spin_arrow_grab = false; @@ -425,37 +425,37 @@ AudioRegionEditor::stop_editing_fade_out () void AudioRegionEditor::connect_editor_events () { - name_entry.changed.connect (slot (*this, &AudioRegionEditor::name_entry_changed)); + name_entry.changed.connect (mem_fun(*this, &AudioRegionEditor::name_entry_changed)); - start_clock.ValueChanged.connect (slot (*this, &AudioRegionEditor::start_clock_changed)); - end_clock.ValueChanged.connect (slot (*this, &AudioRegionEditor::end_clock_changed)); - length_clock.ValueChanged.connect (slot (*this, &AudioRegionEditor::length_clock_changed)); + start_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::start_clock_changed)); + end_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::end_clock_changed)); + length_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::length_clock_changed)); - fade_in_length_spinner.button_press_event.connect (bind (slot (*this, &AudioRegionEditor::bpressed), &fade_in_length_spinner, + fade_in_length_spinner.button_press_event.connect (bind (mem_fun(*this, &AudioRegionEditor::bpressed), &fade_in_length_spinner, &AudioRegionEditor::start_editing_fade_in)); - fade_in_length_spinner.button_release_event.connect (bind (slot (this, &AudioRegionEditor::breleased), &fade_in_length_spinner, + fade_in_length_spinner.button_release_event.connect (bind (mem_fun (*this, &AudioRegionEditor::breleased), &fade_in_length_spinner, &AudioRegionEditor::stop_editing_fade_in)); - fade_out_length_spinner.button_press_event.connect (bind (slot (*this, &AudioRegionEditor::bpressed), &fade_out_length_spinner, + fade_out_length_spinner.button_press_event.connect (bind (mem_fun(*this, &AudioRegionEditor::bpressed), &fade_out_length_spinner, &AudioRegionEditor::start_editing_fade_out)); - fade_out_length_spinner.button_release_event.connect (bind (slot (this, &AudioRegionEditor::breleased), &fade_out_length_spinner, + fade_out_length_spinner.button_release_event.connect (bind (mem_fun (*this, &AudioRegionEditor::breleased), &fade_out_length_spinner, &AudioRegionEditor::stop_editing_fade_out)); - fade_in_length_adjustment.value_changed.connect (slot (*this, &AudioRegionEditor::fade_in_length_adjustment_changed)); - fade_out_length_adjustment.value_changed.connect (slot (*this, &AudioRegionEditor::fade_out_length_adjustment_changed)); - - fade_in_active_button.toggled.connect (slot (*this, &AudioRegionEditor::fade_in_active_toggled)); - fade_out_active_button.toggled.connect (slot (*this, &AudioRegionEditor::fade_out_active_toggled)); - - envelope_active_button.button_press_event.connect (slot (*this, &AudioRegionEditor::envelope_active_button_press)); - envelope_active_button.button_release_event.connect (slot (*this, &AudioRegionEditor::envelope_active_button_release)); - audition_button.toggled.connect (slot (*this, &AudioRegionEditor::audition_button_toggled)); - envelope_view_button.toggled.connect (slot (*this, &AudioRegionEditor::envelope_view_button_toggled)); - lock_button.signal_clicked().connect (slot (*this, &AudioRegionEditor::lock_button_clicked)); - mute_button.signal_clicked().connect (slot (*this, &AudioRegionEditor::mute_button_clicked)); - opaque_button.signal_clicked().connect (slot (*this, &AudioRegionEditor::opaque_button_clicked)); - raise_button.signal_clicked().connect (slot (*this, &AudioRegionEditor::raise_button_clicked)); - lower_button.signal_clicked().connect (slot (*this, &AudioRegionEditor::lower_button_clicked)); + fade_in_length_adjustment.value_changed.connect (mem_fun(*this, &AudioRegionEditor::fade_in_length_adjustment_changed)); + fade_out_length_adjustment.value_changed.connect (mem_fun(*this, &AudioRegionEditor::fade_out_length_adjustment_changed)); + + fade_in_active_button.toggled.connect (mem_fun(*this, &AudioRegionEditor::fade_in_active_toggled)); + fade_out_active_button.toggled.connect (mem_fun(*this, &AudioRegionEditor::fade_out_active_toggled)); + + envelope_active_button.button_press_event.connect (mem_fun(*this, &AudioRegionEditor::envelope_active_button_press)); + envelope_active_button.button_release_event.connect (mem_fun(*this, &AudioRegionEditor::envelope_active_button_release)); + audition_button.toggled.connect (mem_fun(*this, &AudioRegionEditor::audition_button_toggled)); + envelope_view_button.toggled.connect (mem_fun(*this, &AudioRegionEditor::envelope_view_button_toggled)); + lock_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::lock_button_clicked)); + mute_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::mute_button_clicked)); + opaque_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::opaque_button_clicked)); + raise_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::raise_button_clicked)); + lower_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::lower_button_clicked)); } void diff --git a/gtk2_ardour/region_gain_line.cc b/gtk2_ardour/region_gain_line.cc index c3d81bbf8a..40ed9a63b9 100644 --- a/gtk2_ardour/region_gain_line.cc +++ b/gtk2_ardour/region_gain_line.cc @@ -49,7 +49,7 @@ AudioRegionGainLine::start_drag (ControlPoint* cp, float fraction) { AutomationLine::start_drag(cp,fraction); if (!rv.region.envelope_active()) { - trackview.session().add_undo( bind( slot(rv.region, &AudioRegion::set_envelope_active), false) ); + trackview.session().add_undo( bind( mem_fun(rv.region, &AudioRegion::set_envelope_active), false) ); } } @@ -65,8 +65,8 @@ AudioRegionGainLine::remove_point (ControlPoint& cp) trackview.editor.current_session()->add_undo (get_memento()); if (!rv.region.envelope_active()) { - trackview.session().add_undo( bind( slot(rv.region, &AudioRegion::set_envelope_active), false) ); - trackview.session().add_redo( bind( slot(rv.region, &AudioRegion::set_envelope_active), true) ); + trackview.session().add_undo( bind( mem_fun(rv.region, &AudioRegion::set_envelope_active), false) ); + trackview.session().add_redo( bind( mem_fun(rv.region, &AudioRegion::set_envelope_active), true) ); rv.region.set_envelope_active(true); } @@ -81,7 +81,7 @@ void AudioRegionGainLine::end_drag (ControlPoint* cp) { if (!rv.region.envelope_active()) { - trackview.session().add_redo( bind( slot(rv.region, &AudioRegion::set_envelope_active), true) ); + trackview.session().add_redo( bind( mem_fun(rv.region, &AudioRegion::set_envelope_active), true) ); rv.region.set_envelope_active(true); } AutomationLine::end_drag(cp); diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc index 2483961b88..b3ceb8516f 100644 --- a/gtk2_ardour/region_selection.cc +++ b/gtk2_ardour/region_selection.cc @@ -81,7 +81,7 @@ AudioRegionSelection::add (AudioRegionView* rv, bool dosort) return; } - rv->AudioRegionViewGoingAway.connect (slot (*this, &AudioRegionSelection::remove_it)); + rv->AudioRegionViewGoingAway.connect (mem_fun(*this, &AudioRegionSelection::remove_it)); if (rv->region.first_frame() < _current_start || empty()) { _current_start = rv->region.first_frame(); diff --git a/gtk2_ardour/regionview.cc b/gtk2_ardour/regionview.cc index da61b629be..9ec42bd62b 100644 --- a/gtk2_ardour/regionview.cc +++ b/gtk2_ardour/regionview.cc @@ -193,7 +193,7 @@ AudioRegionView::AudioRegionView (GtkCanvasGroup *parent, AudioTimeAxisView &tv, fade_in_active_changed (); fade_out_active_changed (); - region.StateChanged.connect (slot (*this, &AudioRegionView::region_changed)); + region.StateChanged.connect (mem_fun(*this, &AudioRegionView::region_changed)); gtk_signal_connect (GTK_OBJECT(group), "event", (GtkSignalFunc) PublicEditor::canvas_region_view_event, @@ -274,7 +274,7 @@ AudioRegionView::lock_toggle () void AudioRegionView::region_changed (Change what_changed) { - ENSURE_GUI_THREAD (bind (slot (*this, &AudioRegionView::region_changed), what_changed)); + ENSURE_GUI_THREAD (bind (mem_fun(*this, &AudioRegionView::region_changed), what_changed)); if (what_changed & BoundsChanged) { region_resized (what_changed); @@ -394,7 +394,7 @@ AudioRegionView::fade_out_active_changed () void AudioRegionView::region_scale_amplitude_changed () { - ENSURE_GUI_THREAD (slot (*this, &AudioRegionView::region_scale_amplitude_changed)); + ENSURE_GUI_THREAD (mem_fun(*this, &AudioRegionView::region_scale_amplitude_changed)); for (uint32_t n = 0; n < waves.size(); ++n) { // force a reload of the cache @@ -1036,7 +1036,7 @@ AudioRegionView::create_waves () wave_caches.push_back (gtk_canvas_waveview_cache_new ()); if (wait_for_waves) { - if (region.source(n).peaks_ready (bind (slot (*this, &AudioRegionView::peaks_ready_handler), n))) { + if (region.source(n).peaks_ready (bind (mem_fun(*this, &AudioRegionView::peaks_ready_handler), n))) { create_one_wave (n, true); } else { create_zero_line = false; @@ -1136,7 +1136,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct) void AudioRegionView::peaks_ready_handler (uint32_t which) { - Gtkmm2ext::UI::instance()->call_slot (bind (slot (*this, &AudioRegionView::create_one_wave), which, false)); + Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &AudioRegionView::create_one_wave), which, false)); } void @@ -1172,9 +1172,9 @@ AudioRegionView::add_gain_point_event (GtkCanvasItem *item, GdkEvent *ev) if (!region.envelope_active()) { - trackview.session().add_undo( bind( slot(region, &AudioRegion::set_envelope_active), false) ); + trackview.session().add_undo( bind( mem_fun(region, &AudioRegion::set_envelope_active), false) ); region.set_envelope_active(true); - trackview.session().add_redo( bind( slot(region, &AudioRegion::set_envelope_active), true) ); + trackview.session().add_redo( bind( mem_fun(region, &AudioRegion::set_envelope_active), true) ); } region.envelope().add (fx, y); @@ -1321,7 +1321,7 @@ AudioRegionView::add_ghost (AutomationTimeAxisView& atv) ghost->set_duration (region.length() / samples_per_unit); ghosts.push_back (ghost); - ghost->GoingAway.connect (slot (*this, &AudioRegionView::remove_ghost)); + ghost->GoingAway.connect (mem_fun(*this, &AudioRegionView::remove_ghost)); return ghost; } diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc index ed744c0887..ef24cb9fa6 100644 --- a/gtk2_ardour/route_params_ui.cc +++ b/gtk2_ardour/route_params_ui.cc @@ -139,19 +139,19 @@ RouteParams_UI::RouteParams_UI (AudioEngine& eng) set_wmclass (_("ardour_route_parameters"), "Ardour"); // events - route_select_list.select_row.connect (slot (*this, &RouteParams_UI::route_selected)); - route_select_list.unselect_row.connect (slot (*this, &RouteParams_UI::route_unselected)); - route_select_list.click_column.connect (slot (*this, &RouteParams_UI::show_track_menu)); + route_select_list.select_row.connect (mem_fun(*this, &RouteParams_UI::route_selected)); + route_select_list.unselect_row.connect (mem_fun(*this, &RouteParams_UI::route_unselected)); + route_select_list.click_column.connect (mem_fun(*this, &RouteParams_UI::show_track_menu)); add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::BUTTON_RELEASE_MASK); _plugin_selector = new PluginSelector (PluginManager::the_manager()); - _plugin_selector->delete_event.connect (bind (slot (just_hide_it), + _plugin_selector->delete_event.connect (bind (ptr_fun (just_hide_it), static_cast (_plugin_selector))); - delete_event.connect (bind (slot (just_hide_it), static_cast (this))); + delete_event.connect (bind (ptr_fun (just_hide_it), static_cast (this))); } RouteParams_UI::~RouteParams_UI () @@ -161,7 +161,7 @@ RouteParams_UI::~RouteParams_UI () void RouteParams_UI::add_route (Route* route) { - ENSURE_GUI_THREAD(bind (slot (*this, &RouteParams_UI::add_route), route)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::add_route), route)); if (route->hidden()) { return; @@ -173,15 +173,15 @@ RouteParams_UI::add_route (Route* route) route_select_list.rows().back().set_data (route); //route_select_list.rows().back().select (); - route->name_changed.connect (bind (slot (*this, &RouteParams_UI::route_name_changed), route)); - route->GoingAway.connect (bind (slot (*this, &RouteParams_UI::route_removed), route)); + route->name_changed.connect (bind (mem_fun(*this, &RouteParams_UI::route_name_changed), route)); + route->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::route_removed), route)); } void RouteParams_UI::route_name_changed (void *src, Route *route) { - ENSURE_GUI_THREAD(bind (slot (*this, &RouteParams_UI::route_name_changed), src, route)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::route_name_changed), src, route)); CList_Helpers::RowList::iterator i; @@ -218,10 +218,10 @@ RouteParams_UI::setup_redirect_boxes() pre_redir_hpane.add1 (*pre_redirect_box); post_redir_hpane.add1 (*post_redirect_box); - pre_redirect_box->RedirectSelected.connect (bind (slot (*this, &RouteParams_UI::redirect_selected), PreFader)); - pre_redirect_box->RedirectUnselected.connect (bind (slot (*this, &RouteParams_UI::redirect_selected), PreFader)); - post_redirect_box->RedirectSelected.connect (bind (slot (*this, &RouteParams_UI::redirect_selected), PostFader)); - post_redirect_box->RedirectUnselected.connect (bind (slot (*this, &RouteParams_UI::redirect_selected), PostFader)); + pre_redirect_box->RedirectSelected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PreFader)); + pre_redirect_box->RedirectUnselected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PreFader)); + post_redirect_box->RedirectSelected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PostFader)); + post_redirect_box->RedirectUnselected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PostFader)); } @@ -317,7 +317,7 @@ RouteParams_UI::cleanup_post_view (bool stopupdate) void RouteParams_UI::route_removed (Route *route) { - ENSURE_GUI_THREAD(bind (slot (*this, &RouteParams_UI::route_removed), route)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::route_removed), route)); /* route_select_list.freeze (); route_select_list.clear (); @@ -359,8 +359,8 @@ RouteParams_UI::set_session (Session *sess) if (session) { session->foreach_route (this, &RouteParams_UI::add_route); - session->going_away.connect (slot (*this, &ArdourDialog::session_gone)); - session->RouteAdded.connect (slot (*this, &RouteParams_UI::add_route)); + session->going_away.connect (mem_fun(*this, &ArdourDialog::session_gone)); + session->RouteAdded.connect (mem_fun(*this, &RouteParams_UI::add_route)); start_updating (); } else { stop_updating (); @@ -422,7 +422,7 @@ RouteParams_UI::route_selected (gint row, gint col, GdkEvent *ev) setup_redirect_boxes(); // bind to redirects changed event for this route - _route_conn = route->redirects_changed.connect (slot (*this, &RouteParams_UI::redirects_changed)); + _route_conn = route->redirects_changed.connect (mem_fun(*this, &RouteParams_UI::redirects_changed)); track_input_label.set_text (_route->name()); @@ -454,7 +454,7 @@ void RouteParams_UI::redirects_changed (void *src) { - ENSURE_GUI_THREAD(bind (slot (*this, &RouteParams_UI::redirects_changed), src)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::redirects_changed), src)); // pre_redirect_list.freeze (); // pre_redirect_list.clear (); @@ -486,7 +486,7 @@ RouteParams_UI::show_track_menu (gint arg) track_menu->set_name ("ArdourContextMenu"); track_menu->items().push_back (MenuElem (_("Add Track/Bus"), - slot (*(ARDOUR_UI::instance()), &ARDOUR_UI::add_route))); + mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::add_route))); } track_menu->popup (1, 0); } @@ -515,7 +515,7 @@ RouteParams_UI::redirect_selected (ARDOUR::Redirect *redirect, ARDOUR::Placement if (place == PreFader) { cleanup_pre_view(); - _pre_plugin_conn = send->GoingAway.connect (slot (*this, &RouteParams_UI::redirect_going_away)); + _pre_plugin_conn = send->GoingAway.connect (mem_fun(*this, &RouteParams_UI::redirect_going_away)); _active_pre_view = send_ui; pre_redir_hpane.add2 (*_active_pre_view); @@ -523,7 +523,7 @@ RouteParams_UI::redirect_selected (ARDOUR::Redirect *redirect, ARDOUR::Placement } else { cleanup_post_view(); - _post_plugin_conn = send->GoingAway.connect (slot (*this, &RouteParams_UI::redirect_going_away)); + _post_plugin_conn = send->GoingAway.connect (mem_fun(*this, &RouteParams_UI::redirect_going_away)); _active_post_view = send_ui; post_redir_hpane.add2 (*_active_post_view); @@ -543,7 +543,7 @@ RouteParams_UI::redirect_selected (ARDOUR::Redirect *redirect, ARDOUR::Placement if (place == PreFader) { cleanup_pre_view(); - _pre_plugin_conn = plugin_insert->plugin().GoingAway.connect (bind (slot (*this, &RouteParams_UI::plugin_going_away), PreFader)); + _pre_plugin_conn = plugin_insert->plugin().GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::plugin_going_away), PreFader)); plugin_ui->start_updating (0); _active_pre_view = plugin_ui; pre_redir_hpane.add2 (*_active_pre_view); @@ -551,7 +551,7 @@ RouteParams_UI::redirect_selected (ARDOUR::Redirect *redirect, ARDOUR::Placement } else { cleanup_post_view(); - _post_plugin_conn = plugin_insert->plugin().GoingAway.connect (bind (slot (*this, &RouteParams_UI::plugin_going_away), PostFader)); + _post_plugin_conn = plugin_insert->plugin().GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::plugin_going_away), PostFader)); plugin_ui->start_updating (0); _active_post_view = plugin_ui; post_redir_hpane.add2 (*_active_post_view); @@ -564,7 +564,7 @@ RouteParams_UI::redirect_selected (ARDOUR::Redirect *redirect, ARDOUR::Placement if (place == PreFader) { cleanup_pre_view(); - _pre_plugin_conn = port_insert->GoingAway.connect (slot (*this, &RouteParams_UI::redirect_going_away)); + _pre_plugin_conn = port_insert->GoingAway.connect (mem_fun(*this, &RouteParams_UI::redirect_going_away)); _active_pre_view = portinsert_ui; pre_redir_hpane.add2 (*_active_pre_view); portinsert_ui->redisplay(); @@ -572,7 +572,7 @@ RouteParams_UI::redirect_selected (ARDOUR::Redirect *redirect, ARDOUR::Placement } else { cleanup_post_view(); - _post_plugin_conn = port_insert->GoingAway.connect (slot (*this, &RouteParams_UI::redirect_going_away)); + _post_plugin_conn = port_insert->GoingAway.connect (mem_fun(*this, &RouteParams_UI::redirect_going_away)); _active_post_view = portinsert_ui; post_redir_hpane.add2 (*_active_post_view); portinsert_ui->redisplay(); @@ -613,7 +613,7 @@ RouteParams_UI::redirect_unselected (ARDOUR::Redirect *redirect) void RouteParams_UI::plugin_going_away (Plugin *plugin, Placement place) { - ENSURE_GUI_THREAD(bind (slot (*this, &RouteParams_UI::plugin_going_away), plugin, place)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::plugin_going_away), plugin, place)); // delete the current view without calling finish @@ -631,7 +631,7 @@ void RouteParams_UI::redirect_going_away (ARDOUR::Redirect *plugin) { - ENSURE_GUI_THREAD(bind (slot (*this, &RouteParams_UI::redirect_going_away), plugin)); + ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::redirect_going_away), plugin)); printf ("redirect going away\n"); // delete the current view without calling finish @@ -680,7 +680,7 @@ void RouteParams_UI::start_updating () { update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect - (slot (*this, &RouteParams_UI::update_views)); + (mem_fun(*this, &RouteParams_UI::update_views)); } void diff --git a/gtk2_ardour/route_redirect_selection.cc b/gtk2_ardour/route_redirect_selection.cc index 8032ddbbb4..cefe7985cb 100644 --- a/gtk2_ardour/route_redirect_selection.cc +++ b/gtk2_ardour/route_redirect_selection.cc @@ -89,7 +89,7 @@ RouteRedirectSelection::add (Redirect* r) redirects.push_back (r); void (RouteRedirectSelection::*pmf)(Redirect*) = &RouteRedirectSelection::remove; - r->GoingAway.connect (slot (*this, pmf)); + r->GoingAway.connect (mem_fun(*this, pmf)); RedirectsChanged(); } @@ -105,7 +105,7 @@ RouteRedirectSelection::add (const vector& rlist) redirects.push_back (*i); void (RouteRedirectSelection::*pmf)(Redirect*) = &RouteRedirectSelection::remove; - (*i)->GoingAway.connect (slot (*this, pmf)); + (*i)->GoingAway.connect (mem_fun(*this, pmf)); changed = true; } } @@ -146,7 +146,7 @@ RouteRedirectSelection::add (Route* r) routes.push_back (r); void (RouteRedirectSelection::*pmf)(Route*) = &RouteRedirectSelection::remove; - r->GoingAway.connect (bind (slot (*this, pmf), r)); + r->GoingAway.connect (bind (mem_fun(*this, pmf), r)); RoutesChanged(); } diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 46b3e08cab..102b706d1a 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -63,8 +63,8 @@ RouteUI::RouteUI (ARDOUR::Route& rt, ARDOUR::Session& sess, const char* m_name, set_color (unique_random_color()); } - _route.GoingAway.connect (slot (*this, &RouteUI::route_removed)); - _route.active_changed.connect (slot (*this, &RouteUI::route_active_changed)); + _route.GoingAway.connect (mem_fun (*this, &RouteUI::route_removed)); + _route.active_changed.connect (mem_fun (*this, &RouteUI::route_active_changed)); mute_button = manage (new BindableToggleButton (& _route.midi_mute_control(), m_name )); mute_button->set_bind_button_state (2, GDK_CONTROL_MASK); @@ -74,10 +74,10 @@ RouteUI::RouteUI (ARDOUR::Route& rt, ARDOUR::Session& sess, const char* m_name, if (is_audio_track()) { AudioTrack* at = dynamic_cast(&_route); - get_diskstream()->record_enable_changed.connect (slot (*this, &RouteUI::route_rec_enable_changed)); + get_diskstream()->record_enable_changed.connect (mem_fun (*this, &RouteUI::route_rec_enable_changed)); - _session.RecordEnabled.connect (slot (*this, &RouteUI::session_rec_enable_changed)); - _session.RecordDisabled.connect (slot (*this, &RouteUI::session_rec_enable_changed)); + _session.RecordEnabled.connect (mem_fun (*this, &RouteUI::session_rec_enable_changed)); + _session.RecordDisabled.connect (mem_fun (*this, &RouteUI::session_rec_enable_changed)); rec_enable_button = manage (new BindableToggleButton (& at->midi_rec_enable_control(), r_name )); rec_enable_button->set_bind_button_state (2, GDK_CONTROL_MASK); @@ -315,7 +315,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev) void RouteUI::solo_changed(void* src) { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &RouteUI::update_solo_display)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &RouteUI::update_solo_display)); } void @@ -341,7 +341,7 @@ RouteUI::update_solo_display () void RouteUI::mute_changed(void* src) { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &RouteUI::update_mute_display)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &RouteUI::update_mute_display)); } void @@ -359,13 +359,13 @@ RouteUI::update_mute_display () void RouteUI::route_rec_enable_changed (void *src) { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &RouteUI::update_rec_display)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &RouteUI::update_rec_display)); } void RouteUI::session_rec_enable_changed () { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &RouteUI::update_rec_display)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &RouteUI::update_rec_display)); } void @@ -422,13 +422,13 @@ RouteUI::build_solo_menu (void) check = new CheckMenuItem(_("Solo-safe")); check->set_active (_route.solo_safe()); - check->toggled.connect (bind (slot (*this, &RouteUI::toggle_solo_safe), check)); - _route.solo_safe_changed.connect(bind (slot (*this, &RouteUI::solo_safe_toggle), check)); + check->toggled.connect (bind (mem_fun (*this, &RouteUI::toggle_solo_safe), check)); + _route.solo_safe_changed.connect(bind (mem_fun (*this, &RouteUI::solo_safe_toggle), check)); items.push_back (CheckMenuElem(*check)); check->show_all(); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("MIDI Bind"), slot (*mute_button, &BindableToggleButton::midi_learn))); + items.push_back (MenuElem (_("MIDI Bind"), mem_fun (*mute_button, &BindableToggleButton::midi_learn))); } @@ -444,34 +444,34 @@ RouteUI::build_mute_menu(void) check = new CheckMenuItem(_("Pre Fader")); init_mute_menu(PRE_FADER, check); - check->toggled.connect(bind (slot (*this, &RouteUI::toggle_mute_menu), PRE_FADER, check)); - _route.pre_fader_changed.connect(bind (slot (*this, &RouteUI::pre_fader_toggle), check)); + check->toggled.connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), PRE_FADER, check)); + _route.pre_fader_changed.connect(bind (mem_fun (*this, &RouteUI::pre_fader_toggle), check)); items.push_back (CheckMenuElem(*check)); check->show_all(); check = new CheckMenuItem(_("Post Fader")); init_mute_menu(POST_FADER, check); - check->toggled.connect(bind (slot (*this, &RouteUI::toggle_mute_menu), POST_FADER, check)); - _route.post_fader_changed.connect(bind (slot (*this, &RouteUI::post_fader_toggle), check)); + check->toggled.connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), POST_FADER, check)); + _route.post_fader_changed.connect(bind (mem_fun (*this, &RouteUI::post_fader_toggle), check)); items.push_back (CheckMenuElem(*check)); check->show_all(); check = new CheckMenuItem(_("Control Outs")); init_mute_menu(CONTROL_OUTS, check); - check->toggled.connect(bind (slot (*this, &RouteUI::toggle_mute_menu), CONTROL_OUTS, check)); - _route.control_outs_changed.connect(bind (slot (*this, &RouteUI::control_outs_toggle), check)); + check->toggled.connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), CONTROL_OUTS, check)); + _route.control_outs_changed.connect(bind (mem_fun (*this, &RouteUI::control_outs_toggle), check)); items.push_back (CheckMenuElem(*check)); check->show_all(); check = new CheckMenuItem(_("Main Outs")); init_mute_menu(MAIN_OUTS, check); - check->toggled.connect(bind (slot (*this, &RouteUI::toggle_mute_menu), MAIN_OUTS, check)); - _route.main_outs_changed.connect(bind (slot (*this, &RouteUI::main_outs_toggle), check)); + check->toggled.connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), MAIN_OUTS, check)); + _route.main_outs_changed.connect(bind (mem_fun (*this, &RouteUI::main_outs_toggle), check)); items.push_back (CheckMenuElem(*check)); check->show_all(); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("MIDI Bind"), slot (*mute_button, &BindableToggleButton::midi_learn))); + items.push_back (MenuElem (_("MIDI Bind"), mem_fun (*mute_button, &BindableToggleButton::midi_learn))); } void @@ -514,8 +514,8 @@ void RouteUI::reversibly_apply_route_boolean (string name, void (Route::*func)(bool, void *), bool yn, void *arg) { _session.begin_reversible_command (name); - _session.add_undo (bind (slot (_route, func), !yn, (void *) arg)); - _session.add_redo (bind (slot (_route, func), yn, (void *) arg)); + _session.add_undo (bind (mem_fun (_route, func), !yn, (void *) arg)); + _session.add_redo (bind (mem_fun (_route, func), yn, (void *) arg)); _session.commit_reversible_command (); } @@ -523,8 +523,8 @@ void RouteUI::reversibly_apply_audio_track_boolean (string name, void (AudioTrack::*func)(bool, void *), bool yn, void *arg) { _session.begin_reversible_command (name); - _session.add_undo (bind (slot (*audio_track(), func), !yn, (void *) arg)); - _session.add_redo (bind (slot (*audio_track(), func), yn, (void *) arg)); + _session.add_undo (bind (mem_fun (*audio_track(), func), !yn, (void *) arg)); + _session.add_redo (bind (mem_fun (*audio_track(), func), yn, (void *) arg)); _session.commit_reversible_command (); } @@ -665,7 +665,7 @@ RouteUI::remove_this_route () Gtk::Main::run (); if (prompter.get_choice() == 0) { - Main::idle.connect (bind (slot (&RouteUI::idle_remove_this_route), this)); + Main::idle.connect (bind (mem_fun (&RouteUI::idle_remove_this_route), this)); } } @@ -679,7 +679,7 @@ RouteUI::idle_remove_this_route (RouteUI *rui) void RouteUI::route_removed () { - ENSURE_GUI_THREAD(slot (*this, &RouteUI::route_removed)); + ENSURE_GUI_THREAD(mem_fun (*this, &RouteUI::route_removed)); delete this; } @@ -713,7 +713,7 @@ RouteUI::route_rename () void RouteUI::name_changed (void *src) { - ENSURE_GUI_THREAD(bind (slot (*this, &RouteUI::name_changed), src)); + ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::name_changed), src)); name_label.set_text (_route.name()); } @@ -734,7 +734,7 @@ void RouteUI::route_active_changed () { if (route_active_menu_item) { - Gtkmm2ext::UI::instance()->call_slot (bind (slot (*route_active_menu_item, &CheckMenuItem::set_active), _route.active())); + Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun (*route_active_menu_item, &CheckMenuItem::set_active), _route.active())); } } @@ -750,7 +750,7 @@ RouteUI::solo_safe_toggle(void* src, Gtk::CheckMenuItem* check) void RouteUI::pre_fader_toggle(void* src, Gtk::CheckMenuItem* check) { - ENSURE_GUI_THREAD(bind (slot (*this, &RouteUI::pre_fader_toggle), src, check)); + ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::pre_fader_toggle), src, check)); bool yn = _route.get_mute_config(PRE_FADER); if (check->get_active() != yn) { @@ -761,7 +761,7 @@ RouteUI::pre_fader_toggle(void* src, Gtk::CheckMenuItem* check) void RouteUI::post_fader_toggle(void* src, Gtk::CheckMenuItem* check) { - ENSURE_GUI_THREAD(bind (slot (*this, &RouteUI::post_fader_toggle), src, check)); + ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::post_fader_toggle), src, check)); bool yn = _route.get_mute_config(POST_FADER); if (check->get_active() != yn) { @@ -772,7 +772,7 @@ RouteUI::post_fader_toggle(void* src, Gtk::CheckMenuItem* check) void RouteUI::control_outs_toggle(void* src, Gtk::CheckMenuItem* check) { - ENSURE_GUI_THREAD(bind (slot (*this, &RouteUI::control_outs_toggle), src, check)); + ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::control_outs_toggle), src, check)); bool yn = _route.get_mute_config(CONTROL_OUTS); if (check->get_active() != yn) { @@ -783,7 +783,7 @@ RouteUI::control_outs_toggle(void* src, Gtk::CheckMenuItem* check) void RouteUI::main_outs_toggle(void* src, Gtk::CheckMenuItem* check) { - ENSURE_GUI_THREAD(bind (slot (*this, &RouteUI::main_outs_toggle), src, check)); + ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::main_outs_toggle), src, check)); bool yn = _route.get_mute_config(MAIN_OUTS); if (check->get_active() != yn) { @@ -835,7 +835,7 @@ RouteUI::name() const void RouteUI::map_frozen () { - ENSURE_GUI_THREAD (slot (*this, &RouteUI::map_frozen)); + ENSURE_GUI_THREAD (mem_fun (*this, &RouteUI::map_frozen)); AudioTrack* at = dynamic_cast(&_route); diff --git a/gtk2_ardour/send_ui.cc b/gtk2_ardour/send_ui.cc index 109dcecd30..ed5a6c9e11 100644 --- a/gtk2_ardour/send_ui.cc +++ b/gtk2_ardour/send_ui.cc @@ -54,8 +54,8 @@ SendUI::SendUI (Send& s, Session& se) _send.set_metering (true); - _send.output_changed.connect (slot (*this, &SendUI::ins_changed)); - _send.output_changed.connect (slot (*this, &SendUI::outs_changed)); + _send.output_changed.connect (mem_fun (*this, &SendUI::ins_changed)); + _send.output_changed.connect (mem_fun (*this, &SendUI::outs_changed)); panners.set_width (Wide); panners.setup_pan (); @@ -63,8 +63,8 @@ SendUI::SendUI (Send& s, Session& se) gpm.setup_meters (); gpm.set_fader_name ("SendUIFrame"); - screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect (slot (*this, &SendUI::update)); - fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (slot (*this, &SendUI::fast_update)); + screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect (mem_fun (*this, &SendUI::update)); + fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &SendUI::fast_update)); } SendUI::~SendUI () @@ -80,7 +80,7 @@ SendUI::~SendUI () void SendUI::ins_changed (IOChange change, void* ignored) { - ENSURE_GUI_THREAD(bind (slot (*this, &SendUI::ins_changed), change, ignored)); + ENSURE_GUI_THREAD(bind (mem_fun (*this, &SendUI::ins_changed), change, ignored)); if (change & ConfigurationChanged) { panners.setup_pan (); } @@ -89,7 +89,7 @@ SendUI::ins_changed (IOChange change, void* ignored) void SendUI::outs_changed (IOChange change, void* ignored) { - ENSURE_GUI_THREAD(bind (slot (*this, &SendUI::outs_changed), change, ignored)); + ENSURE_GUI_THREAD(bind (mem_fun (*this, &SendUI::outs_changed), change, ignored)); if (change & ConfigurationChanged) { panners.setup_pan (); gpm.setup_meters (); @@ -99,7 +99,7 @@ SendUI::outs_changed (IOChange change, void* ignored) void SendUI::send_going_away (Redirect *ignored) { - ENSURE_GUI_THREAD (bind (slot (*this, &SendUI::send_going_away), ignored)); + ENSURE_GUI_THREAD (bind (mem_fun (*this, &SendUI::send_going_away), ignored)); delete this; } @@ -131,9 +131,9 @@ SendUIWindow::SendUIWindow (Send& s, Session& ss) add (vpacker); set_name ("SendUIWindow"); - s.GoingAway.connect (slot (*this, &SendUIWindow::send_going_away)); + s.GoingAway.connect (mem_fun (*this, &SendUIWindow::send_going_away)); - delete_event.connect (bind (slot (just_hide_it), reinterpret_cast (this))); + delete_event.connect (bind (ptr_fun (just_hide_it), reinterpret_cast (this))); } @@ -145,7 +145,7 @@ SendUIWindow::~SendUIWindow () void SendUIWindow::send_going_away (Redirect *ignored) { - ENSURE_GUI_THREAD(bind (slot (*this, &SendUIWindow::send_going_away), ignored)); + ENSURE_GUI_THREAD(bind (mem_fun (*this, &SendUIWindow::send_going_away), ignored)); delete this; } diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 3222a3b6c3..765772b34a 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -69,11 +69,11 @@ StreamView::StreamView (AudioTimeAxisView& tv) _amplitude_above_axis = 1.0; if (_trackview.is_audio_track()) { - _trackview.audio_track()->diskstream_changed.connect (slot (*this, &StreamView::diskstream_changed)); - _trackview.session().TransportStateChange.connect (slot (*this, &StreamView::transport_changed)); - _trackview.get_diskstream()->record_enable_changed.connect (slot (*this, &StreamView::rec_enable_changed)); - _trackview.session().RecordEnabled.connect (slot (*this, &StreamView::sess_rec_enable_changed)); - _trackview.session().RecordDisabled.connect (slot (*this, &StreamView::sess_rec_enable_changed)); + _trackview.audio_track()->diskstream_changed.connect (mem_fun (*this, &StreamView::diskstream_changed)); + _trackview.session().TransportStateChange.connect (mem_fun (*this, &StreamView::transport_changed)); + _trackview.get_diskstream()->record_enable_changed.connect (mem_fun (*this, &StreamView::rec_enable_changed)); + _trackview.session().RecordEnabled.connect (mem_fun (*this, &StreamView::sess_rec_enable_changed)); + _trackview.session().RecordDisabled.connect (mem_fun (*this, &StreamView::sess_rec_enable_changed)); } rec_updating = false; @@ -191,7 +191,7 @@ StreamView::add_region_view (Region *r) void StreamView::add_region_view_internal (Region *r, bool wait_for_waves) { - ENSURE_GUI_THREAD (bind (slot (*this, &StreamView::add_region_view), r)); + ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_region_view), r)); AudioRegion* region = dynamic_cast (r); @@ -229,7 +229,7 @@ StreamView::add_region_view_internal (Region *r, bool wait_for_waves) /* catch regionview going away */ - region->GoingAway.connect (slot (*this, &StreamView::remove_region_view)); + region->GoingAway.connect (mem_fun (*this, &StreamView::remove_region_view)); AudioRegionViewAdded (region_view); } @@ -237,7 +237,7 @@ StreamView::add_region_view_internal (Region *r, bool wait_for_waves) void StreamView::remove_region_view (Region *r) { - ENSURE_GUI_THREAD (bind (slot (*this, &StreamView::remove_region_view), r)); + ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_region_view), r)); AudioRegion* ar = dynamic_cast (r); @@ -271,7 +271,7 @@ StreamView::remove_region_view (Region *r) void StreamView::remove_rec_region (Region *r) { - ENSURE_GUI_THREAD(bind (slot (*this, &StreamView::remove_rec_region), r)); + ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::remove_rec_region), r)); if (!Gtkmm2ext::UI::instance()->caller_is_gui_thread()) { fatal << "region deleted from non-GUI thread!" << endmsg; @@ -312,13 +312,13 @@ StreamView::display_diskstream (DiskStream *ds) { playlist_change_connection.disconnect(); playlist_changed (ds); - playlist_change_connection = ds->PlaylistChanged.connect (bind (slot (*this, &StreamView::playlist_changed), ds)); + playlist_change_connection = ds->PlaylistChanged.connect (bind (mem_fun (*this, &StreamView::playlist_changed), ds)); } void StreamView::playlist_modified () { - ENSURE_GUI_THREAD (slot (*this, &StreamView::playlist_modified)); + ENSURE_GUI_THREAD (mem_fun (*this, &StreamView::playlist_modified)); /* if the playlist is modified, make sure xfades are on top and all the regionviews are stacked correctly. @@ -336,7 +336,7 @@ StreamView::playlist_modified () void StreamView::playlist_changed (DiskStream *ds) { - ENSURE_GUI_THREAD (bind (slot (*this, &StreamView::playlist_changed), ds)); + ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_changed), ds)); /* disconnect from old playlist */ @@ -353,11 +353,11 @@ StreamView::playlist_changed (DiskStream *ds) /* catch changes */ - playlist_connections.push_back (ds->playlist()->RegionAdded.connect (slot (*this, &StreamView::add_region_view))); - playlist_connections.push_back (ds->playlist()->RegionRemoved.connect (slot (*this, &StreamView::remove_region_view))); - playlist_connections.push_back (ds->playlist()->StateChanged.connect (slot (*this, &StreamView::playlist_state_changed))); - playlist_connections.push_back (ds->playlist()->Modified.connect (slot (*this, &StreamView::playlist_modified))); - playlist_connections.push_back (ds->playlist()->NewCrossfade.connect (slot (*this, &StreamView::add_crossfade))); + playlist_connections.push_back (ds->playlist()->RegionAdded.connect (mem_fun (*this, &StreamView::add_region_view))); + playlist_connections.push_back (ds->playlist()->RegionRemoved.connect (mem_fun (*this, &StreamView::remove_region_view))); + playlist_connections.push_back (ds->playlist()->StateChanged.connect (mem_fun (*this, &StreamView::playlist_state_changed))); + playlist_connections.push_back (ds->playlist()->Modified.connect (mem_fun (*this, &StreamView::playlist_modified))); + playlist_connections.push_back (ds->playlist()->NewCrossfade.connect (mem_fun (*this, &StreamView::add_crossfade))); } void @@ -366,7 +366,7 @@ StreamView::add_crossfade (Crossfade *crossfade) AudioRegionView* lview = 0; AudioRegionView* rview = 0; - ENSURE_GUI_THREAD (bind (slot (*this, &StreamView::add_crossfade), crossfade)); + ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_crossfade), crossfade)); /* first see if we already have a CrossfadeView for this Crossfade */ @@ -400,7 +400,7 @@ StreamView::add_crossfade (Crossfade *crossfade) region_color, *lview, *rview); - crossfade->Invalidated.connect (slot (*this, &StreamView::remove_crossfade)); + crossfade->Invalidated.connect (mem_fun (*this, &StreamView::remove_crossfade)); crossfade_views.push_back (cv); if (!crossfades_visible) { @@ -411,7 +411,7 @@ StreamView::add_crossfade (Crossfade *crossfade) void StreamView::remove_crossfade (Crossfade *xfade) { - ENSURE_GUI_THREAD (bind (slot (*this, &StreamView::remove_crossfade), xfade)); + ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_crossfade), xfade)); for (list::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) { if (&(*i)->crossfade == xfade) { @@ -425,7 +425,7 @@ StreamView::remove_crossfade (Crossfade *xfade) void StreamView::playlist_state_changed (Change ignored) { - ENSURE_GUI_THREAD (bind (slot (*this, &StreamView::playlist_state_changed), ignored)); + ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_state_changed), ignored)); redisplay_diskstream (); } @@ -489,9 +489,9 @@ StreamView::diskstream_changed (void *src_ignored) if ((at = _trackview.audio_track()) != 0) { DiskStream& ds = at->disk_stream(); /* XXX grrr: when will SigC++ allow me to bind references? */ - Gtkmm2ext::UI::instance()->call_slot (bind (slot (*this, &StreamView::display_diskstream), &ds)); + Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun (*this, &StreamView::display_diskstream), &ds)); } else { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &StreamView::undisplay_diskstream)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::undisplay_diskstream)); } } @@ -588,19 +588,19 @@ StreamView::region_layered (AudioRegionView* rv) void StreamView::rec_enable_changed (void *src) { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &StreamView::setup_rec_box)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box)); } void StreamView::sess_rec_enable_changed () { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &StreamView::setup_rec_box)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box)); } void StreamView::transport_changed() { - Gtkmm2ext::UI::instance()->call_slot (slot (*this, &StreamView::setup_rec_box)); + Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box)); } void @@ -630,7 +630,7 @@ StreamView::setup_rec_box () Source *src = (Source *) _trackview.get_diskstream()->write_source (n); if (src) { sources.push_back (src); - peak_ready_connections.push_back (src->PeakRangeReady.connect (bind (slot (*this, &StreamView::rec_peak_range_ready), src))); + peak_ready_connections.push_back (src->PeakRangeReady.connect (bind (mem_fun (*this, &StreamView::rec_peak_range_ready), src))); } } @@ -645,7 +645,7 @@ StreamView::setup_rec_box () region->set_position (_trackview.session().transport_frame(), this); rec_regions.push_back (region); /* catch it if it goes away */ - region->GoingAway.connect (slot (*this, &StreamView::remove_rec_region)); + region->GoingAway.connect (mem_fun (*this, &StreamView::remove_rec_region)); /* we add the region later */ } @@ -678,7 +678,7 @@ StreamView::setup_rec_box () rec_rects.push_back (recbox); screen_update_connection.disconnect(); - screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (slot (*this, &StreamView::update_rec_box)); + screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &StreamView::update_rec_box)); rec_updating = true; rec_active = true; @@ -793,7 +793,7 @@ StreamView::rec_peak_range_ready (jack_nframes_t start, jack_nframes_t cnt, Sour { // this is called from the peak building thread - ENSURE_GUI_THREAD(bind (slot (*this, &StreamView::rec_peak_range_ready), start, cnt, src)); + ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::rec_peak_range_ready), start, cnt, src)); if (rec_peak_ready_map.size() == 0 || start+cnt > last_rec_peak_frame) { last_rec_peak_frame = start + cnt; diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 1f872961b0..a43eb6d3b6 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -86,11 +86,11 @@ TimeAxisView::TimeAxisView(ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView */ name_entry.set_name ("EditorTrackNameDisplay"); - name_entry.button_release_event.connect (slot (*this, &TimeAxisView::name_entry_button_release)); - name_entry.button_press_event.connect (slot (*this, &TimeAxisView::name_entry_button_press)); + name_entry.button_release_event.connect (mem_fun (*this, &TimeAxisView::name_entry_button_release)); + name_entry.button_press_event.connect (mem_fun (*this, &TimeAxisView::name_entry_button_press)); - name_entry.signal_focus_in_event().connect (slot (ARDOUR_UI::generic_focus_in_event)); - name_entry.signal_focus_out_event().connect (slot (ARDOUR_UI::generic_focus_out_event)); + name_entry.signal_focus_in_event().connect (ptr_fun (ARDOUR_UI::generic_focus_in_event)); + name_entry.signal_focus_out_event().connect (ptr_fun (ARDOUR_UI::generic_focus_out_event)); Gtkmm2ext::set_size_request_to_display_given_text (name_entry, N_("gTortnam"), 10, 10); // just represents a short name @@ -127,7 +127,7 @@ TimeAxisView::TimeAxisView(ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView controls_ebox.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); controls_ebox.set_flags (Gtk::CAN_FOCUS); - controls_ebox.button_release_event.connect (slot (*this, &TimeAxisView::controls_ebox_button_release)); + controls_ebox.button_release_event.connect (mem_fun (*this, &TimeAxisView::controls_ebox_button_release)); controls_lhs_pad.set_name ("TimeAxisViewControlsPadding"); controls_hbox.pack_start (controls_lhs_pad,false,false); @@ -443,12 +443,12 @@ TimeAxisView::build_size_menu () size_menu->set_name ("ArdourContextMenu"); MenuList& items = size_menu->items(); - items.push_back (MenuElem (_("Largest"), bind (slot (*this, &TimeAxisView::set_height), Largest))); - items.push_back (MenuElem (_("Large"), bind (slot (*this, &TimeAxisView::set_height), Large))); - items.push_back (MenuElem (_("Larger"), bind (slot (*this, &TimeAxisView::set_height), Larger))); - items.push_back (MenuElem (_("Normal"), bind (slot (*this, &TimeAxisView::set_height), Normal))); - items.push_back (MenuElem (_("Smaller"), bind (slot (*this, &TimeAxisView::set_height), Smaller))); - items.push_back (MenuElem (_("Small"), bind (slot (*this, &TimeAxisView::set_height), Small))); + items.push_back (MenuElem (_("Largest"), bind (mem_fun (*this, &TimeAxisView::set_height), Largest))); + items.push_back (MenuElem (_("Large"), bind (mem_fun (*this, &TimeAxisView::set_height), Large))); + items.push_back (MenuElem (_("Larger"), bind (mem_fun (*this, &TimeAxisView::set_height), Larger))); + items.push_back (MenuElem (_("Normal"), bind (mem_fun (*this, &TimeAxisView::set_height), Normal))); + items.push_back (MenuElem (_("Smaller"), bind (mem_fun (*this, &TimeAxisView::set_height), Smaller))); + items.push_back (MenuElem (_("Small"), bind (mem_fun (*this, &TimeAxisView::set_height), Small))); } void diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index 9dffe8fcf6..99d5cec4d9 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -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(slot(&TimeAxisViewItem::idle_remove_this_item), this, src)); + Gtk::Main::idle.connect(bind(mem_fun(&TimeAxisViewItem::idle_remove_this_item), this, src)); } /** diff --git a/gtk2_ardour/visual_time_axis.cc b/gtk2_ardour/visual_time_axis.cc index 71c0da3ebe..2d899541c8 100644 --- a/gtk2_ardour/visual_time_axis.cc +++ b/gtk2_ardour/visual_time_axis.cc @@ -94,19 +94,19 @@ VisualTimeAxis::VisualTimeAxis(std::string name, PublicEditor& ed, ARDOUR::Sessi _color = unique_random_color() ; _marked_for_display = true; - name_entry.activate.connect(slot(*this, &VisualTimeAxis::name_entry_changed)) ; - name_entry.focus_out_event.connect(slot(*this, &VisualTimeAxis::name_entry_focus_out_handler)) ; - name_entry.button_press_event.connect(slot(*this, &VisualTimeAxis::name_entry_button_press_handler)) ; - name_entry.button_release_event.connect(slot(*this, &VisualTimeAxis::name_entry_button_release_handler)) ; - name_entry.key_release_event.connect(slot(*this, &VisualTimeAxis::name_entry_key_release_handler)) ; + name_entry.activate.connect(mem_fun(*this, &VisualTimeAxis::name_entry_changed)) ; + name_entry.focus_out_event.connect(mem_fun(*this, &VisualTimeAxis::name_entry_focus_out_handler)) ; + name_entry.button_press_event.connect(mem_fun(*this, &VisualTimeAxis::name_entry_button_press_handler)) ; + name_entry.button_release_event.connect(mem_fun(*this, &VisualTimeAxis::name_entry_button_release_handler)) ; + name_entry.key_release_event.connect(mem_fun(*this, &VisualTimeAxis::name_entry_key_release_handler)) ; 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)))) ; - size_button.button_release_event.connect (slot (*this, &VisualTimeAxis::size_click)) ; - visual_button.signal_clicked().connect (slot (*this, &VisualTimeAxis::visual_click)) ; - hide_button.signal_clicked().connect (slot (*this, &VisualTimeAxis::hide_click)) ; + size_button.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)) ; ARDOUR_UI::instance()->tooltips().set_tip(size_button,_("Display Height")) ; ARDOUR_UI::instance()->tooltips().set_tip(visual_button, _("Visual options")) ; ARDOUR_UI::instance()->tooltips().set_tip(hide_button, _("Hide this track")) ; @@ -312,7 +312,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(slot(&VisualTimeAxis::idle_remove_this_time_axis), this, src)); + Gtk::Main::idle.connect(bind(mem_fun(&VisualTimeAxis::idle_remove_this_time_axis), this, src)); } } @@ -357,7 +357,7 @@ VisualTimeAxis::start_time_axis_rename() name_prompter->set_prompt (_("new name: ")) ; ARDOUR_UI::instance()->allow_focus(true) ; - name_prompter->done.connect (slot(*this, &VisualTimeAxis::finish_time_axis_rename)) ; + name_prompter->done.connect (mem_fun(*this, &VisualTimeAxis::finish_time_axis_rename)) ; name_prompter->show_all() ; } diff --git a/gtk2_ardour/vst_pluginui.cc b/gtk2_ardour/vst_pluginui.cc index 1dcd2940f0..496ff8eeac 100644 --- a/gtk2_ardour/vst_pluginui.cc +++ b/gtk2_ardour/vst_pluginui.cc @@ -69,7 +69,7 @@ VSTPluginUI::package (Gtk::Window& win) /* forward configure events to plugin window */ - win.configure_event.connect (bind (slot (*this, &VSTPluginUI::configure_handler), socket.gobj())); + win.configure_event.connect (bind (mem_fun (*this, &VSTPluginUI::configure_handler), socket.gobj())); /* XXX in GTK2, use add_id() instead of steal, although add_id() assumes that the window's owner understands the XEmbed protocol. -- cgit v1.2.3