gtkmm: use get_mapped instead of deprecated Gtk::Widget::is_mapped()

This commit is contained in:
Mads Kiilerich 2022-01-26 21:17:53 +01:00 committed by Robin Gareus
parent 539ef331d1
commit d52c727ec5
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
19 changed files with 33 additions and 33 deletions

View File

@ -1182,7 +1182,7 @@ ARDOUR_UI::every_point_zero_something_seconds ()
{
// august 2007: actual update frequency: 25Hz (40ms), not 100Hz
if (editor_meter && UIConfiguration::instance().get_show_editor_meter() && editor_meter_peak_display.is_mapped ()) {
if (editor_meter && UIConfiguration::instance().get_show_editor_meter() && editor_meter_peak_display.get_mapped ()) {
if (_clear_editor_meter) {
editor_meter->clear_meters();

View File

@ -411,7 +411,7 @@ ARDOUR_UI::toggle_editor_and_mixer ()
if (!mwin) {
/* mixer's own window doesn't exist */
mixer->make_visible ();
} else if (!mwin->is_mapped ()) {
} else if (!mwin->get_mapped ()) {
/* mixer's own window exists but isn't mapped */
mixer->make_visible ();
} else {
@ -435,7 +435,7 @@ ARDOUR_UI::toggle_editor_and_mixer ()
if (!ewin) {
/* mixer's own window doesn't exist */
editor->make_visible ();
} else if (!ewin->is_mapped ()) {
} else if (!ewin->get_mapped ()) {
/* editor's own window exists but isn't mapped */
editor->make_visible ();
} else {

View File

@ -1185,7 +1185,7 @@ Editor::generic_event_handler (GdkEvent* ev)
case GDK_MOTION_NOTIFY:
case GDK_KEY_PRESS:
case GDK_KEY_RELEASE:
if (contents().is_mapped()) {
if (contents().get_mapped()) {
gettimeofday (&last_event_time, 0);
}
break;
@ -4214,7 +4214,7 @@ Editor::set_stationary_playhead (bool yn)
bool
Editor::show_touched_automation () const
{
if (!contents().is_mapped()) {
if (!contents().get_mapped()) {
return false;
}
return _show_touched_automation;
@ -6179,7 +6179,7 @@ Editor::super_rapid_screen_update ()
/* METERING / MIXER STRIPS */
/* update track meters, if required */
if (contents().is_mapped() && meters_running) {
if (contents().get_mapped() && meters_running) {
RouteTimeAxisView* rtv;
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
if ((rtv = dynamic_cast<RouteTimeAxisView*>(*i)) != 0) {

View File

@ -40,7 +40,7 @@ Editor::start_updating_meters ()
{
RouteTimeAxisView* rtv;
if (contents().is_mapped() && _session) {
if (contents().get_mapped() && _session) {
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
if ((rtv = dynamic_cast<RouteTimeAxisView*>(*i)) != 0) {
rtv->reset_meter ();
@ -58,7 +58,7 @@ Editor::stop_updating_meters ()
meters_running = false;
if (contents().is_mapped() && _session) {
if (contents().get_mapped() && _session) {
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
if ((rtv = dynamic_cast<RouteTimeAxisView*>(*i)) != 0) {
rtv->hide_meter ();

View File

@ -5968,7 +5968,7 @@ Editor::quantize_regions (const RegionSelection& rs)
quantize_dialog = new QuantizeDialog (*this);
}
if (quantize_dialog->is_mapped()) {
if (quantize_dialog->get_mapped()) {
/* in progress already */
return;
}

View File

@ -1081,7 +1081,7 @@ LocationUI::refresh_location_list ()
using namespace Box_Helpers;
// this is just too expensive to do when window is not shown
if (!is_mapped()) {
if (!get_mapped ()) {
return;
}

View File

@ -515,7 +515,7 @@ Meterbridge::stop_updating ()
void
Meterbridge::fast_update_strips ()
{
if (!is_mapped () || !_session) {
if (!get_mapped () || !_session) {
return;
}
for (list<MeterBridgeStrip>::iterator i = strips.begin(); i != strips.end(); ++i) {

View File

@ -197,7 +197,7 @@ MiniTimeline::set_span (samplecnt_t ts)
void
MiniTimeline::super_rapid_update ()
{
if (!_session || !_session->engine().running() || !is_mapped ()) {
if (!_session || !_session->engine().running() || !get_mapped ()) {
return;
}
samplepos_t const sample = PublicEditor::instance().playhead_cursor_sample ();

View File

@ -1368,7 +1368,7 @@ Mixer_UI::stop_updating ()
void
Mixer_UI::fast_update_strips ()
{
if (_content.is_mapped () && _session) {
if (_content.get_mapped () && _session) {
for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
(*i)->fast_update ();
}

View File

@ -234,7 +234,7 @@ format_time (char* buf, size_t size, int timeout)
void
PluginScanDialog::plugin_scan_timeout (int timeout)
{
if (!is_mapped ()) {
if (!get_mapped ()) {
return;
}
@ -286,14 +286,14 @@ PluginScanDialog::message_handler (std::string type, std::string plugin, bool ca
timeout_info.hide ();
if (type == X_("closeme") && !is_mapped ()) {
if (type == X_("closeme") && !get_mapped ()) {
return;
}
const bool cancelled = PluginManager::instance ().cancelled ();
if (type != X_("closeme") && !UIConfiguration::instance ().get_show_plugin_scan_window () && !verbose) {
if (is_mapped ()) {
if (get_mapped ()) {
hide ();
connections.drop_connections ();
ARDOUR_UI::instance ()->gui_idle_handler ();

View File

@ -700,7 +700,7 @@ RecorderUI::update_meters ()
}
}
if (!contents ().is_mapped ()) {
if (!contents ().get_mapped ()) {
return true;
}

View File

@ -115,7 +115,7 @@ SendUI::update ()
void
SendUI::fast_update ()
{
if (!is_mapped ()) {
if (!get_mapped ()) {
return;
}

View File

@ -980,7 +980,7 @@ SoundFileBrowser::stop_metering ()
void
SoundFileBrowser::meter ()
{
if (is_mapped () && _session && gm) {
if (get_mapped () && _session && gm) {
gm->update_meters ();
}
}

View File

@ -157,7 +157,7 @@ Splash::pop_back_for (Gtk::Window& win)
#else
if (UIConfiguration::instance().get_hide_splash_screen ()) {
hide ();
} else if (is_mapped()) {
} else if (get_mapped ()) {
get_window()->restack (win.get_window(), false);
if (0 == win.get_transient_for ()) {
win.set_transient_for (*this);
@ -285,7 +285,7 @@ Splash::idle_after_expose ()
void
Splash::display ()
{
bool was_mapped = is_mapped ();
bool was_mapped = get_mapped ();
if (ARDOUR_COMMAND_LINE::no_splash) {
return;

View File

@ -283,7 +283,7 @@ TransportMastersWidget::idle_remove (TransportMastersWidget::Row* row)
void
TransportMastersWidget::update_ports ()
{
if (!is_mapped()) {
if (!get_mapped ()) {
return;
}

View File

@ -752,7 +752,7 @@ TriggerPage::stop_updating ()
void
TriggerPage::fast_update_strips ()
{
if (_content.is_mapped () && _session) {
if (_content.get_mapped () && _session) {
for (list<TriggerStrip*>::iterator i = _strips.begin (); i != _strips.end (); ++i) {
(*i)->fast_update ();
}

View File

@ -504,7 +504,7 @@ TriggerStrip::map_frozen ()
void
TriggerStrip::fast_update ()
{
if (is_mapped ()) {
if (get_mapped ()) {
if (_clear_meters) {
_level_meter.clear_meters ();
_clear_meters = false;

View File

@ -63,9 +63,9 @@ bool
VisibilityTracker::fully_visible () const
{
if (_use_window_manager_visibility) {
return _window.is_mapped() && (_visibility == GDK_VISIBILITY_UNOBSCURED);
return _window.get_mapped() && (_visibility == GDK_VISIBILITY_UNOBSCURED);
} else {
return _window.is_mapped();
return _window.get_mapped();
}
}
@ -73,9 +73,9 @@ bool
VisibilityTracker::not_visible () const
{
if (_use_window_manager_visibility) {
return !_window.is_mapped() || (_visibility == GDK_VISIBILITY_FULLY_OBSCURED);
return !_window.get_mapped() || (_visibility == GDK_VISIBILITY_FULLY_OBSCURED);
} else {
return !_window.is_mapped();
return !_window.get_mapped();
}
}
@ -83,8 +83,8 @@ bool
VisibilityTracker::partially_visible () const
{
if (_use_window_manager_visibility) {
return _window.is_mapped() && ((_visibility == GDK_VISIBILITY_PARTIAL) || (_visibility == GDK_VISIBILITY_UNOBSCURED));
return _window.get_mapped() && ((_visibility == GDK_VISIBILITY_PARTIAL) || (_visibility == GDK_VISIBILITY_UNOBSCURED));
} else {
return _window.is_mapped();
return _window.get_mapped();
}
}

View File

@ -128,7 +128,7 @@ WindowProxy::toggle()
/* we'd like to just call this and nothing else */
_window->present ();
} else {
if (_window->is_mapped()) {
if (_window->get_mapped()) {
save_pos_and_size();
}
@ -138,7 +138,7 @@ WindowProxy::toggle()
_window->present ();
}
if (_window->is_mapped()) {
if (_window->get_mapped()) {
if (_width != -1 && _height != -1) {
_window->set_default_size (_width, _height);
}
@ -261,7 +261,7 @@ WindowProxy::configure_handler (GdkEventConfigure* ev)
the difference is generally down to window manager framing.
*/
if (!visible() || !_window->is_mapped()) {
if (!visible() || !_window->get_mapped()) {
return false;
}
save_pos_and_size ();