From 24bc99a9d8ce57761aecca98135d55db6b1dbc22 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Fri, 27 Feb 2015 22:33:32 +1000 Subject: [PATCH] Use non-deprecated Gtk::Widget::set_can_focus API in gtk2_ardour --- gtk2_ardour/ardour_ui.cc | 2 +- gtk2_ardour/ardour_ui_dialogs.cc | 2 +- gtk2_ardour/audio_clock.cc | 2 +- gtk2_ardour/automation_time_axis.cc | 4 ++-- gtk2_ardour/editor_canvas.cc | 2 +- gtk2_ardour/editor_summary.cc | 2 +- gtk2_ardour/engine_dialog.cc | 10 +++++----- gtk2_ardour/gain_meter.cc | 10 +++++----- gtk2_ardour/meter_strip.cc | 2 +- gtk2_ardour/mixer_strip.cc | 4 ++-- gtk2_ardour/mixer_ui.cc | 2 +- gtk2_ardour/monitor_section.cc | 10 +++++----- gtk2_ardour/note_select_dialog.cc | 2 +- gtk2_ardour/panner_interface.cc | 2 +- gtk2_ardour/panner_ui.cc | 4 ++-- gtk2_ardour/processor_box.cc | 2 +- gtk2_ardour/region_editor.cc | 2 +- gtk2_ardour/route_ui.cc | 4 ++-- gtk2_ardour/session_dialog.cc | 22 +++++++++++----------- gtk2_ardour/shuttle_control.cc | 2 +- gtk2_ardour/step_entry.cc | 2 +- gtk2_ardour/time_axis_view.cc | 2 +- gtk2_ardour/vca_time_axis.cc | 4 ++-- 23 files changed, 50 insertions(+), 50 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 47cd9c2e9b..bd88c928c6 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -5512,7 +5512,7 @@ ARDOUR_UI::setup_toplevel_window (Gtk::Window& window, const string& name, void* window.set_title (title.get_string()); window.set_wmclass (string_compose (X_("%1_%1"), downcase (PROGRAM_NAME), downcase (name)), PROGRAM_NAME); - window.set_flags (CAN_FOCUS); + window.set_can_focus (true); window.add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK); /* This is a hack to ensure that GTK-accelerators continue to diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index a68ff2d6ad..b0a6fbbedd 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -233,7 +233,7 @@ ARDOUR_UI::set_session (Session *s) ArdourMeter::ResetGroupPeakDisplays.connect (sigc::mem_fun(*this, &ARDOUR_UI::reset_group_peak_display)); editor_meter_peak_display.set_name ("meterbridge peakindicator"); - editor_meter_peak_display.unset_flags (Gtk::CAN_FOCUS); + editor_meter_peak_display.set_can_focus (false); editor_meter_peak_display.set_size_request (std::max(9.f, rintf(8.f * UIConfiguration::instance().get_ui_scale())), -1); editor_meter_peak_display.set_corner_radius (3.0); diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 65c6773b53..8e24f12a3c 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -102,7 +102,7 @@ AudioClock::AudioClock (const string& clock_name, bool transient, const string& , xscale (1.0) , yscale (1.0) { - set_flags (CAN_FOCUS); + set_can_focus (true); _layout = Pango::Layout::create (get_pango_context()); _layout->set_attributes (normal_attributes); diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 5d97355f9e..4df317f0e2 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -171,8 +171,8 @@ AutomationTimeAxisView::AutomationTimeAxisView ( auto_dropdown.set_name ("route button"); hide_button.set_name ("route button"); - auto_dropdown.unset_flags (Gtk::CAN_FOCUS); - hide_button.unset_flags (Gtk::CAN_FOCUS); + auto_dropdown.set_can_focus (false); + hide_button.set_can_focus (false); controls_table.set_no_show_all(); diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index aa5425340f..d6bb075ac2 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -238,7 +238,7 @@ Editor::initialize_canvas () _track_canvas->add_events (Gdk::POINTER_MOTION_HINT_MASK | Gdk::SCROLL_MASK | Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK); _track_canvas->signal_leave_notify_event().connect (sigc::mem_fun(*this, &Editor::left_track_canvas), false); _track_canvas->signal_enter_notify_event().connect (sigc::mem_fun(*this, &Editor::entered_track_canvas), false); - _track_canvas->set_flags (CAN_FOCUS); + _track_canvas->set_can_focus (true); /* set up drag-n-drop */ diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc index a2882a201a..ffda8fddb8 100644 --- a/gtk2_ardour/editor_summary.cc +++ b/gtk2_ardour/editor_summary.cc @@ -60,7 +60,7 @@ EditorSummary::EditorSummary (Editor* e) _background_dirty (true) { add_events (Gdk::POINTER_MOTION_MASK|Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK); - set_flags (get_flags() | Gtk::CAN_FOCUS); + set_can_focus (true); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &EditorSummary::parameter_changed)); } diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index f23d6278fd..94c4682d78 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -589,7 +589,7 @@ EngineControl::build_full_control_notebook () row++; input_channels.set_name ("InputChannels"); - input_channels.set_flags (Gtk::CAN_FOCUS); + input_channels.set_can_focus (true); input_channels.set_digits (0); input_channels.set_wrap (false); output_channels.set_editable (true); @@ -602,7 +602,7 @@ EngineControl::build_full_control_notebook () } output_channels.set_name ("OutputChannels"); - output_channels.set_flags (Gtk::CAN_FOCUS); + output_channels.set_can_focus (true); output_channels.set_digits (0); output_channels.set_wrap (false); output_channels.set_editable (true); @@ -615,7 +615,7 @@ EngineControl::build_full_control_notebook () } input_latency.set_name ("InputLatency"); - input_latency.set_flags (Gtk::CAN_FOCUS); + input_latency.set_can_focus (true); input_latency.set_digits (0); input_latency.set_wrap (false); input_latency.set_editable (true); @@ -628,7 +628,7 @@ EngineControl::build_full_control_notebook () ++row; output_latency.set_name ("OutputLatency"); - output_latency.set_flags (Gtk::CAN_FOCUS); + output_latency.set_can_focus (true); output_latency.set_digits (0); output_latency.set_wrap (false); output_latency.set_editable (true); @@ -961,7 +961,7 @@ EngineControl::refresh_midi_display (std::string focus) m = manage (new ArdourButton ((*p)->name, ArdourButton::led_default_elements)); m->set_name ("midi device"); - m->set_can_focus (Gtk::CAN_FOCUS); + m->set_can_focus (true); m->add_events (Gdk::BUTTON_RELEASE_MASK); m->set_active (enabled); m->signal_clicked.connect (sigc::bind (sigc::mem_fun (*this, &EngineControl::midi_device_enabled_toggled), m, *p)); diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 5f0a854e69..81df411589 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -143,7 +143,7 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int peak_display.set_events (peak_display.get_events() & ~(Gdk::EventMask (Gdk::LEAVE_NOTIFY_MASK|Gdk::ENTER_NOTIFY_MASK|Gdk::POINTER_MOTION_MASK))); peak_display.signal_map().connect (sigc::bind (sigc::ptr_fun (reset_cursor_to_default), &peak_display)); peak_display.signal_state_changed().connect (sigc::bind (sigc::ptr_fun (reset_cursor_to_default_state), &peak_display)); - peak_display.unset_flags (Gtk::CAN_FOCUS); + peak_display.set_can_focus (false); peak_display.set_editable (false); gain_automation_style_button.set_name ("mixer strip button"); @@ -152,8 +152,8 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int set_tooltip (gain_automation_state_button, _("Fader automation mode")); set_tooltip (gain_automation_style_button, _("Fader automation type")); - gain_automation_style_button.unset_flags (Gtk::CAN_FOCUS); - gain_automation_state_button.unset_flags (Gtk::CAN_FOCUS); + gain_automation_style_button.set_can_focus (false); + gain_automation_state_button.set_can_focus (false); gain_automation_state_button.set_size_request(15, 15); gain_automation_style_button.set_size_request(15, 15); @@ -980,8 +980,8 @@ GainMeter::GainMeter (Session* s, int fader_length) set_tooltip (gain_automation_state_button, _("Fader automation mode")); set_tooltip (gain_automation_style_button, _("Fader automation type")); - gain_automation_style_button.unset_flags (Gtk::CAN_FOCUS); - gain_automation_state_button.unset_flags (Gtk::CAN_FOCUS); + gain_automation_style_button.set_can_focus (false); + gain_automation_state_button.set_can_focus (false); gain_automation_state_button.set_size_request (PX_SCALE(12, 15), PX_SCALE(12, 15)); gain_automation_style_button.set_size_request (PX_SCALE(12, 15), PX_SCALE(12, 15)); diff --git a/gtk2_ardour/meter_strip.cc b/gtk2_ardour/meter_strip.cc index a497851fb0..b252708813 100644 --- a/gtk2_ardour/meter_strip.cc +++ b/gtk2_ardour/meter_strip.cc @@ -159,7 +159,7 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr rt) peak_display.set_elements((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body)); set_tooltip (peak_display, _("Reset Peak")); max_peak = minus_infinity(); - peak_display.unset_flags (Gtk::CAN_FOCUS); + peak_display.set_can_focus (false); peak_display.set_size_request(PX_SCALE(12, 12), PX_SCALE(8, 8)); peak_display.set_corner_radius(2); // ardour-button scales this diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index ca1b104e0f..c44013b680 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -378,7 +378,7 @@ MixerStrip::init () Gdk::KEY_PRESS_MASK| Gdk::KEY_RELEASE_MASK); - set_flags (get_flags() | Gtk::CAN_FOCUS); + set_can_focus (true); AudioEngine::instance()->PortConnectedOrDisconnected.connect ( *this, invalidator (*this), boost::bind (&MixerStrip::port_connected_or_disconnected, this, _1, _3), gui_context () @@ -544,7 +544,7 @@ MixerStrip::set_route (boost::shared_ptr rt) set_tooltip (monitor_section_button, _("Show/Hide Monitoring Section")); mute_solo_table.attach (*monitor_section_button, 1, 2, 0, 1); monitor_section_button->show(); - monitor_section_button->unset_flags (Gtk::CAN_FOCUS); + monitor_section_button->set_can_focus (false); } parameter_changed ("use-monitor-bus"); } else { diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 252efdc1c2..062453a92b 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -121,7 +121,7 @@ Mixer_UI::Mixer_UI () scroller.set_can_default (true); // set_default (scroller); - scroller_base.set_flags (Gtk::CAN_FOCUS); + scroller_base.set_can_focus (true); scroller_base.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); scroller_base.set_name ("MixerWindow"); scroller_base.signal_button_release_event().connect (sigc::mem_fun(*this, &Mixer_UI::strip_scroller_button_release)); diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc index 3464ebf722..1390d26e78 100644 --- a/gtk2_ardour/monitor_section.cc +++ b/gtk2_ardour/monitor_section.cc @@ -466,7 +466,7 @@ MonitorSection::MonitorSection (Session* s) signal_enter_notify_event().connect (sigc::mem_fun (*this, &MonitorSection::enter_handler)); signal_leave_notify_event().connect (sigc::mem_fun (*this, &MonitorSection::leave_handler)); - set_flags (CAN_FOCUS); + set_can_focus (true); _tearoff = new TearOff (*this); @@ -663,10 +663,10 @@ MonitorSection::ChannelButtonSet::ChannelButtonSet () solo.set_name (X_("solo button")); invert.set_name (X_("invert button")); - cut.unset_flags (Gtk::CAN_FOCUS); - dim.unset_flags (Gtk::CAN_FOCUS); - solo.unset_flags (Gtk::CAN_FOCUS); - invert.unset_flags (Gtk::CAN_FOCUS); + cut.set_can_focus (false); + dim.set_can_focus (false); + solo.set_can_focus (false); + invert.set_can_focus (false); } void diff --git a/gtk2_ardour/note_select_dialog.cc b/gtk2_ardour/note_select_dialog.cc index 203213eced..4842b00676 100644 --- a/gtk2_ardour/note_select_dialog.cc +++ b/gtk2_ardour/note_select_dialog.cc @@ -35,7 +35,7 @@ NoteSelectDialog::NoteSelectDialog() , _pianomm(Glib::wrap((GtkWidget*)_piano)) , _note_number(60) { - _pianomm->set_flags(Gtk::CAN_FOCUS); + _pianomm->set_can_focus (true); _pianomm->show(); g_signal_connect(G_OBJECT(_piano), "note-on", G_CALLBACK(_note_on_event_handler), this); piano_keyboard_set_monophonic(_piano, TRUE); diff --git a/gtk2_ardour/panner_interface.cc b/gtk2_ardour/panner_interface.cc index dcbb36487b..ca715ef87c 100644 --- a/gtk2_ardour/panner_interface.cc +++ b/gtk2_ardour/panner_interface.cc @@ -36,7 +36,7 @@ PannerInterface::PannerInterface (boost::shared_ptr p) , _send_mode (false) , _editor (0) { - set_flags (Gtk::CAN_FOCUS); + set_can_focus (true); add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK| Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK| diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index 0818833767..41289e2e08 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -75,8 +75,8 @@ PannerUI::PannerUI (Session* s) //set_size_request_to_display_given_text (pan_automation_state_button, X_("O"), 2, 2); //set_size_request_to_display_given_text (pan_automation_style_button, X_("0"), 2, 2); - pan_automation_style_button.unset_flags (Gtk::CAN_FOCUS); - pan_automation_state_button.unset_flags (Gtk::CAN_FOCUS); + pan_automation_style_button.set_can_focus (false); + pan_automation_state_button.set_can_focus (false); pan_automation_style_button.signal_button_press_event().connect (sigc::mem_fun(*this, &PannerUI::pan_automation_style_button_event), false); pan_automation_state_button.signal_button_press_event().connect (sigc::mem_fun(*this, &PannerUI::pan_automation_state_button_event), false); diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index ac1b31e1bd..9fe972358e 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -1832,7 +1832,7 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function r) set_tooltip (audition_button, _("audition this region")); - audition_button.unset_flags (Gtk::CAN_FOCUS); + audition_button.set_can_focus (false); audition_button.set_events (audition_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK)); diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 90a9c22971..95184b8188 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -325,8 +325,8 @@ RouteUI::set_route (boost::shared_ptr rp) update_monitoring_display (); } - mute_button->unset_flags (Gtk::CAN_FOCUS); - solo_button->unset_flags (Gtk::CAN_FOCUS); + mute_button->set_can_focus (false); + solo_button->set_can_focus (false); mute_button->show(); diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc index 279ff52dee..8a33067ead 100644 --- a/gtk2_ardour/session_dialog.cc +++ b/gtk2_ardour/session_dialog.cc @@ -425,7 +425,7 @@ SessionDialog::setup_initial_choice_box () /* --disable plugins UI */ _disable_plugins.set_label (_("Safe Mode: Disable all Plugins")); - _disable_plugins.set_flags (Gtk::CAN_FOCUS); + _disable_plugins.set_can_focus (true); _disable_plugins.set_relief (Gtk::RELIEF_NORMAL); _disable_plugins.set_mode (true); _disable_plugins.set_active (ARDOUR::Session::get_disable_all_loaded_plugins()); @@ -911,14 +911,14 @@ SessionDialog::setup_more_options_box () input_label.set_markup (_("Inputs")); output_label.set_markup (_("Outputs")); - _master_bus_channel_count.set_flags(Gtk::CAN_FOCUS); + _master_bus_channel_count.set_can_focus (true); _master_bus_channel_count.set_update_policy(Gtk::UPDATE_ALWAYS); _master_bus_channel_count.set_numeric(true); _master_bus_channel_count.set_digits(0); _master_bus_channel_count.set_wrap(false); _create_master_bus.set_label (_("Create master bus")); - _create_master_bus.set_flags(Gtk::CAN_FOCUS); + _create_master_bus.set_can_focus (true); _create_master_bus.set_relief(Gtk::RELIEF_NORMAL); _create_master_bus.set_mode(true); _create_master_bus.set_active(true); @@ -928,20 +928,20 @@ SessionDialog::setup_more_options_box () advanced_table.set_col_spacings(0); _connect_inputs.set_label (_("Automatically connect to physical inputs")); - _connect_inputs.set_flags(Gtk::CAN_FOCUS); + _connect_inputs.set_can_focus (true); _connect_inputs.set_relief(Gtk::RELIEF_NORMAL); _connect_inputs.set_mode(true); _connect_inputs.set_active(Config->get_input_auto_connect() != ManualConnect); _connect_inputs.set_border_width(0); _limit_input_ports.set_label (_("Use only")); - _limit_input_ports.set_flags(Gtk::CAN_FOCUS); + _limit_input_ports.set_can_focus (true); _limit_input_ports.set_relief(Gtk::RELIEF_NORMAL); _limit_input_ports.set_mode(true); _limit_input_ports.set_sensitive(true); _limit_input_ports.set_border_width(0); - _input_limit_count.set_flags(Gtk::CAN_FOCUS); + _input_limit_count.set_can_focus (true); _input_limit_count.set_update_policy(Gtk::UPDATE_ALWAYS); _input_limit_count.set_numeric(true); _input_limit_count.set_digits(0); @@ -988,18 +988,18 @@ SessionDialog::setup_more_options_box () input_frame.set_label_widget(input_label); _connect_outputs.set_label (_("Automatically connect outputs")); - _connect_outputs.set_flags(Gtk::CAN_FOCUS); + _connect_outputs.set_can_focus (true); _connect_outputs.set_relief(Gtk::RELIEF_NORMAL); _connect_outputs.set_mode(true); _connect_outputs.set_active(Config->get_output_auto_connect() != ManualConnect); _connect_outputs.set_border_width(0); _limit_output_ports.set_label (_("Use only")); - _limit_output_ports.set_flags(Gtk::CAN_FOCUS); + _limit_output_ports.set_can_focus (true); _limit_output_ports.set_relief(Gtk::RELIEF_NORMAL); _limit_output_ports.set_mode(true); _limit_output_ports.set_sensitive(true); _limit_output_ports.set_border_width(0); - _output_limit_count.set_flags(Gtk::CAN_FOCUS); + _output_limit_count.set_can_focus (true); _output_limit_count.set_update_policy(Gtk::UPDATE_ALWAYS); _output_limit_count.set_numeric(false); _output_limit_count.set_digits(0); @@ -1010,7 +1010,7 @@ SessionDialog::setup_more_options_box () output_port_limit_hbox.pack_start(chan_count_label_4, Gtk::PACK_SHRINK, 6); _connect_outputs_to_master.set_label (_("... to master bus")); - _connect_outputs_to_master.set_flags(Gtk::CAN_FOCUS); + _connect_outputs_to_master.set_can_focus (true); _connect_outputs_to_master.set_relief(Gtk::RELIEF_NORMAL); _connect_outputs_to_master.set_mode(true); _connect_outputs_to_master.set_active(Config->get_output_auto_connect() == AutoConnectMaster); @@ -1020,7 +1020,7 @@ SessionDialog::setup_more_options_box () _connect_outputs_to_physical.set_group (connect_outputs_group); _connect_outputs_to_physical.set_label (_("... to physical outputs")); - _connect_outputs_to_physical.set_flags(Gtk::CAN_FOCUS); + _connect_outputs_to_physical.set_can_focus (true); _connect_outputs_to_physical.set_relief(Gtk::RELIEF_NORMAL); _connect_outputs_to_physical.set_mode(true); _connect_outputs_to_physical.set_active(Config->get_output_auto_connect() == AutoConnectPhysical); diff --git a/gtk2_ardour/shuttle_control.cc b/gtk2_ardour/shuttle_control.cc index fec3547e1e..5d6772f880 100644 --- a/gtk2_ardour/shuttle_control.cc +++ b/gtk2_ardour/shuttle_control.cc @@ -76,7 +76,7 @@ ShuttleControl::ShuttleControl () shuttle_context_menu = 0; _hovering = false; - set_flags (CAN_FOCUS); + set_can_focus (true); add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::POINTER_MOTION_MASK|Gdk::SCROLL_MASK); set_size_request (85, 20); set_name (X_("ShuttleControl")); diff --git a/gtk2_ardour/step_entry.cc b/gtk2_ardour/step_entry.cc index 855766b1c8..25c7ed49f2 100644 --- a/gtk2_ardour/step_entry.cc +++ b/gtk2_ardour/step_entry.cc @@ -441,7 +441,7 @@ StepEntry::StepEntry (StepEditor& seditor) _piano = (PianoKeyboard*) piano_keyboard_new (); piano = wrap ((GtkWidget*) _piano); - piano->set_flags (Gtk::CAN_FOCUS); + piano->set_can_focus (true); g_signal_connect(G_OBJECT(_piano), "note-off", G_CALLBACK(_note_off_event_handler), this); g_signal_connect(G_OBJECT(_piano), "rest", G_CALLBACK(_rest_event_handler), this); diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 84eab4a6ef..14f1b24a68 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -188,7 +188,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie Gdk::ENTER_NOTIFY_MASK| Gdk::LEAVE_NOTIFY_MASK| Gdk::SCROLL_MASK); - controls_ebox.set_flags (CAN_FOCUS); + controls_ebox.set_can_focus (true); /* note that this handler connects *before* the default handler */ controls_ebox.signal_scroll_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_scroll), true); diff --git a/gtk2_ardour/vca_time_axis.cc b/gtk2_ardour/vca_time_axis.cc index f98cda008c..bf7626c627 100644 --- a/gtk2_ardour/vca_time_axis.cc +++ b/gtk2_ardour/vca_time_axis.cc @@ -48,13 +48,13 @@ VCATimeAxisView::VCATimeAxisView (PublicEditor& ed, Session* s, ArdourCanvas::Ca solo_button.set_name ("solo button"); set_tooltip (solo_button, _("Solo slaves")); solo_button.signal_button_release_event().connect (sigc::mem_fun (*this, &VCATimeAxisView::solo_release), false); - mute_button.unset_flags (Gtk::CAN_FOCUS); + mute_button.set_can_focus (false); mute_button.set_name ("mute button"); mute_button.set_text (_("M")); set_tooltip (mute_button, _("Mute slaves")); mute_button.signal_button_release_event().connect (sigc::mem_fun (*this, &VCATimeAxisView::mute_release), false); - solo_button.unset_flags (Gtk::CAN_FOCUS); + solo_button.set_can_focus (false); drop_button.set_name ("mute button"); drop_button.set_text (_("D"));