gtkmm: use get_sensitive() instead of deprecated Gtk::Widget::sensitive()

This commit is contained in:
Mads Kiilerich 2022-01-26 22:02:41 +01:00 committed by Robin Gareus
parent a9965e9b93
commit 71ea2cc7b9
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 12 additions and 12 deletions

View File

@ -624,11 +624,11 @@ LoudnessDialog::apply_preset ()
void void
LoudnessDialog::update_sensitivity () LoudnessDialog::update_sensitivity ()
{ {
_dbfs_spinbutton.set_sensitive (_dbfs_btn.get_active () && _dbfs_btn.sensitive ()); _dbfs_spinbutton.set_sensitive (_dbfs_btn.get_active () && _dbfs_btn.is_sensitive ());
_dbtp_spinbutton.set_sensitive (_dbtp_btn.get_active () && _dbtp_btn.sensitive ()); _dbtp_spinbutton.set_sensitive (_dbtp_btn.get_active () && _dbtp_btn.is_sensitive ());
_lufs_i_spinbutton.set_sensitive (_lufs_i_btn.get_active () && _dbtp_btn.sensitive ()); _lufs_i_spinbutton.set_sensitive (_lufs_i_btn.get_active () && _dbtp_btn.is_sensitive ());
_lufs_s_spinbutton.set_sensitive (_lufs_s_btn.get_active () && _lufs_s_btn.sensitive ()); _lufs_s_spinbutton.set_sensitive (_lufs_s_btn.get_active () && _lufs_s_btn.is_sensitive ());
_lufs_m_spinbutton.set_sensitive (_lufs_m_btn.get_active () && _lufs_m_btn.sensitive ()); _lufs_m_spinbutton.set_sensitive (_lufs_m_btn.get_active () && _lufs_m_btn.is_sensitive ());
} }
void void
@ -742,19 +742,19 @@ LoudnessDialog::calculate_gain ()
set = true; \ set = true; \
} }
if (_dbfs_btn.get_active () && _dbfs_btn.sensitive ()) { if (_dbfs_btn.get_active () && _dbfs_btn.is_sensitive ()) {
MIN_IF_SET (dbfs, _dbfs); MIN_IF_SET (dbfs, _dbfs);
} }
if (_dbtp_btn.get_active () && _dbtp_btn.sensitive ()) { if (_dbtp_btn.get_active () && _dbtp_btn.is_sensitive ()) {
MIN_IF_SET (dbtp, _dbtp); MIN_IF_SET (dbtp, _dbtp);
} }
if (_lufs_i_btn.get_active () && _lufs_i_btn.sensitive ()) { if (_lufs_i_btn.get_active () && _lufs_i_btn.is_sensitive ()) {
MIN_IF_SET (lufs_i, _lufs_i); MIN_IF_SET (lufs_i, _lufs_i);
} }
if (_lufs_s_btn.get_active () && _lufs_s_btn.sensitive ()) { if (_lufs_s_btn.get_active () && _lufs_s_btn.is_sensitive ()) {
MIN_IF_SET (lufs_s, _lufs_s); MIN_IF_SET (lufs_s, _lufs_s);
} }
if (_lufs_m_btn.get_active () && _lufs_m_btn.sensitive ()) { if (_lufs_m_btn.get_active () && _lufs_m_btn.is_sensitive ()) {
MIN_IF_SET (lufs_m, _lufs_m); MIN_IF_SET (lufs_m, _lufs_m);
} }

View File

@ -251,7 +251,7 @@ SessionDialog::master_channel_count ()
bool bool
SessionDialog::use_session_template () const SessionDialog::use_session_template () const
{ {
if (!back_button->sensitive () && !new_only) { if (!back_button->is_sensitive () && !new_only) {
/* open session -- not create a new one */ /* open session -- not create a new one */
return false; return false;
} }

View File

@ -260,7 +260,7 @@ ArdourKnob::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_t*
cairo_stroke (cr); cairo_stroke (cr);
// a transparent overlay to indicate insensitivity // a transparent overlay to indicate insensitivity
if (!sensitive ()) { if (!get_sensitive ()) {
cairo_arc (cr, 0, 0, center_radius, 0, 2.0*G_PI); cairo_arc (cr, 0, 0, center_radius, 0, 2.0*G_PI);
uint32_t ins_color = UIConfigurationBase::instance().color ("gtk_background"); uint32_t ins_color = UIConfigurationBase::instance().color ("gtk_background");
Gtkmm2ext::set_source_rgb_a (cr, ins_color, 0.6); Gtkmm2ext::set_source_rgb_a (cr, ins_color, 0.6);