gtkmm: use get_visible() instead of deprecated Gtk::Widget::is_visible()
This commit is contained in:
parent
d52c727ec5
commit
a86aa31747
@ -90,7 +90,7 @@ ArdourMessageDialog::push_splash ()
|
||||
{
|
||||
if (Splash::exists()) {
|
||||
Splash* spl = Splash::instance();
|
||||
if (spl->is_visible()) {
|
||||
if (spl->get_visible()) {
|
||||
spl->pop_back_for (*this);
|
||||
_splash_pushed = true;
|
||||
}
|
||||
|
@ -2789,7 +2789,7 @@ ARDOUR_UI::add_route ()
|
||||
add_route_dialog->signal_response().connect (sigc::mem_fun (*this, &ARDOUR_UI::add_route_dialog_response));
|
||||
}
|
||||
|
||||
if (add_route_dialog->is_visible()) {
|
||||
if (add_route_dialog->get_visible()) {
|
||||
/* we're already doing this */
|
||||
return;
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ ARDOUR_UI::shared_popup_menu ()
|
||||
{
|
||||
ENSURE_GUI_THREAD (*this, &ARDOUR_UI::shared_popup_menu, ignored);
|
||||
|
||||
assert (!_shared_popup_menu || !_shared_popup_menu->is_visible());
|
||||
assert (!_shared_popup_menu || !_shared_popup_menu->get_visible());
|
||||
delete _shared_popup_menu;
|
||||
_shared_popup_menu = new Gtk::Menu;
|
||||
return _shared_popup_menu;
|
||||
|
@ -55,7 +55,7 @@ ARDOUR_UI::key_event_handler (GdkEventKey* ev, Gtk::Window* event_window)
|
||||
Gtkmm2ext::Bindings* bindings = 0;
|
||||
Gtk::Window* window = 0;
|
||||
|
||||
if (virtual_keyboard_window && virtual_keyboard_window->is_visible()) {
|
||||
if (virtual_keyboard_window && virtual_keyboard_window->get_visible()) {
|
||||
if (gtk_window_propagate_key_event (virtual_keyboard_window->gobj(), ev)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ ARDOUR_UI::add_video (Gtk::Window* float_window)
|
||||
add_video_dialog->set_transient_for (*float_window);
|
||||
}
|
||||
|
||||
if (add_video_dialog->is_visible()) {
|
||||
if (add_video_dialog->get_visible()) {
|
||||
/* we're already doing this */
|
||||
return;
|
||||
}
|
||||
|
@ -848,7 +848,7 @@ AudioClock::set (timepos_t const & w, bool force, timecnt_t const & offset)
|
||||
{
|
||||
timepos_t when (w);
|
||||
|
||||
if ((!force && !is_visible()) || !_session) {
|
||||
if ((!force && !get_visible()) || !_session) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1897,7 +1897,7 @@ Editor::add_region_context_items (Menu_Helpers::MenuList& edit_items, boost::sha
|
||||
const timepos_t position = get_preferred_edit_position (EDIT_IGNORE_NONE, true);
|
||||
|
||||
edit_items.push_back (*_popup_region_menu_item);
|
||||
if (Config->get_layer_model() == Manual && track->playlist()->count_regions_at (position) > 1 && (layering_order_editor == 0 || !layering_order_editor->is_visible ())) {
|
||||
if (Config->get_layer_model() == Manual && track->playlist()->count_regions_at (position) > 1 && (layering_order_editor == 0 || !layering_order_editor->get_visible ())) {
|
||||
edit_items.push_back (*manage (_region_actions->get_action ("choose-top-region-context-menu")->create_menu_item ()));
|
||||
}
|
||||
edit_items.push_back (SeparatorElem());
|
||||
@ -6449,7 +6449,7 @@ Editor::change_region_layering_order (bool from_context_menu)
|
||||
void
|
||||
Editor::update_region_layering_order_editor ()
|
||||
{
|
||||
if (layering_order_editor && layering_order_editor->is_visible ()) {
|
||||
if (layering_order_editor && layering_order_editor->get_visible ()) {
|
||||
change_region_layering_order (true);
|
||||
}
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ Editor::reset_controls_layout_width ()
|
||||
edit_controls_vbox.size_request (req);
|
||||
w = req.width;
|
||||
|
||||
if (_group_tabs->is_visible()) {
|
||||
if (_group_tabs->get_visible()) {
|
||||
_group_tabs->size_request (req);
|
||||
w += req.width;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ Message::run ()
|
||||
|
||||
bool splash_pushed = false;
|
||||
Splash* spl = Splash::exists () ? Splash::instance() : NULL;
|
||||
if (spl && spl->is_visible()) {
|
||||
if (spl && spl->get_visible()) {
|
||||
spl->pop_back_for (_message_dialog);
|
||||
splash_pushed = true;
|
||||
}
|
||||
|
@ -3824,7 +3824,7 @@ Mixer_UI::screenshot (std::string const& filename)
|
||||
}
|
||||
|
||||
int height = strip_packer.get_height();
|
||||
bool with_vca = vca_vpacker.is_visible ();
|
||||
bool with_vca = vca_vpacker.get_visible ();
|
||||
MixerStrip* master = strip_by_route (_session->master_out ());
|
||||
|
||||
Gtk::OffscreenWindow osw;
|
||||
|
@ -579,7 +579,7 @@ MonitorSection::update_processor_box ()
|
||||
toggle_processorbox_button.set_name (X_("monitor section processors toggle"));
|
||||
}
|
||||
|
||||
if (insert_box->is_visible() == show_processor_box) {
|
||||
if (insert_box->get_visible() == show_processor_box) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -562,7 +562,7 @@ NewUserWizard::push_splash ()
|
||||
{
|
||||
if (Splash::exists()) {
|
||||
Splash* spl = Splash::instance();
|
||||
if (spl->is_visible()) {
|
||||
if (spl->get_visible()) {
|
||||
spl->pop_back_for (*this);
|
||||
_splash_pushed = true;
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ PatchChangeWidget::~PatchChangeWidget ()
|
||||
void
|
||||
PatchChangeWidget::refresh ()
|
||||
{
|
||||
if (is_visible ()) {
|
||||
if (get_visible ()) {
|
||||
on_show ();
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ PluginDSPLoadWindow::set_session (Session* s)
|
||||
ArdourWindow::set_session (s);
|
||||
if (!s) {
|
||||
drop_references ();
|
||||
} else if (is_visible ()) {
|
||||
} else if (get_visible ()) {
|
||||
refill_processors ();
|
||||
}
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ PluginEqGui::stop_updating ()
|
||||
void
|
||||
PluginEqGui::start_updating ()
|
||||
{
|
||||
if (!_update_connection.connected() && is_visible()) {
|
||||
if (!_update_connection.connected() && get_visible()) {
|
||||
_update_connection = Glib::signal_timeout().connect (sigc::mem_fun (this, &PluginEqGui::timeout_callback), 250, Glib::PRIORITY_DEFAULT_IDLE);
|
||||
}
|
||||
}
|
||||
|
@ -1583,7 +1583,7 @@ PluginPinWidget::connect_sidechain ()
|
||||
_sidechain_selector = new IOSelectorWindow (_session, _pi->sidechain_input ());
|
||||
}
|
||||
|
||||
if (_sidechain_selector->is_visible ()) {
|
||||
if (_sidechain_selector->get_visible ()) {
|
||||
_sidechain_selector->get_toplevel ()->get_window ()->raise ();
|
||||
} else {
|
||||
_sidechain_selector->present ();
|
||||
|
@ -916,7 +916,7 @@ PluginSelector::plugin_menu()
|
||||
void
|
||||
PluginSelector::build_plugin_menu ()
|
||||
{
|
||||
if (is_visible ()) {
|
||||
if (get_visible ()) {
|
||||
_need_menu_rebuild = true;
|
||||
return;
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ PluginUIWindow::app_activated (bool)
|
||||
was_visible = true;
|
||||
}
|
||||
} else {
|
||||
was_visible = is_visible();
|
||||
was_visible = get_visible();
|
||||
get_position (pre_deactivate_x, pre_deactivate_y);
|
||||
hide ();
|
||||
_pluginui->deactivate ();
|
||||
|
@ -736,7 +736,7 @@ ProcessorEntry::add_control_state (XMLNode* node) const
|
||||
if (_plugin_display) {
|
||||
XMLNode* c = new XMLNode (X_("Object"));
|
||||
c->set_property (X_("id"), X_("InlineDisplay"));
|
||||
c->set_property (X_("visible"), _plugin_display->is_visible ());
|
||||
c->set_property (X_("visible"), _plugin_display->get_visible ());
|
||||
node->add_child_nocopy (*c);
|
||||
}
|
||||
}
|
||||
@ -793,7 +793,7 @@ ProcessorEntry::build_controls_menu ()
|
||||
if (_plugin_display) {
|
||||
items.push_back (CheckMenuElem (_("Inline Display")));
|
||||
Gtk::CheckMenuItem* c = dynamic_cast<Gtk::CheckMenuItem*> (&items.back ());
|
||||
c->set_active (_plugin_display->is_visible ());
|
||||
c->set_active (_plugin_display->get_visible ());
|
||||
c->signal_toggled().connect (sigc::mem_fun (*this, &ProcessorEntry::toggle_inline_display_visibility));
|
||||
}
|
||||
|
||||
@ -826,7 +826,7 @@ ProcessorEntry::build_controls_menu ()
|
||||
void
|
||||
ProcessorEntry::toggle_inline_display_visibility ()
|
||||
{
|
||||
if (_plugin_display->is_visible ()) {
|
||||
if (_plugin_display->get_visible ()) {
|
||||
_plugin_display->hide();
|
||||
} else {
|
||||
_plugin_display->show();
|
||||
@ -1736,7 +1736,7 @@ ProcessorEntry::PluginInlineDisplay::update_height_alloc (uint32_t inline_height
|
||||
Gtk::ScrolledWindow* sw = dynamic_cast<Gtk::ScrolledWindow*> (pr);
|
||||
if (sw) {
|
||||
const Gtk::VScrollbar* vsb = sw->get_vscrollbar();
|
||||
sc = vsb && vsb->is_visible();
|
||||
sc = vsb && vsb->get_visible();
|
||||
}
|
||||
|
||||
if (shm != _cur_height) {
|
||||
|
@ -1081,7 +1081,7 @@ void
|
||||
RecorderUI::update_spacer_width (Allocation&, TrackRecordAxis* rec)
|
||||
{
|
||||
int w = rec->summary_xpos ();
|
||||
if (_rec_group_tabs->is_visible ()) {
|
||||
if (_rec_group_tabs->get_visible ()) {
|
||||
w += _rec_group_tabs->get_width ();
|
||||
}
|
||||
_space.set_size_request (w, -1); //< Note: this is idempotent
|
||||
|
@ -593,7 +593,7 @@ RouteUI::edit_output_configuration ()
|
||||
|
||||
IOSelectorWindow* w = output_selectors[id];
|
||||
|
||||
if (w->is_visible()) {
|
||||
if (w->get_visible()) {
|
||||
w->get_toplevel()->get_window()->raise();
|
||||
} else {
|
||||
w->present ();
|
||||
@ -611,7 +611,7 @@ RouteUI::edit_input_configuration ()
|
||||
|
||||
IOSelectorWindow* w = input_selectors[_route->id ()];
|
||||
|
||||
if (w->is_visible()) {
|
||||
if (w->get_visible()) {
|
||||
w->get_toplevel()->get_window()->raise();
|
||||
} else {
|
||||
w->present ();
|
||||
@ -635,8 +635,8 @@ RouteUI::solo_press(GdkEventButton* ev)
|
||||
|
||||
if (Keyboard::is_context_menu_event (ev)) {
|
||||
|
||||
if (! (solo_isolated_led && solo_isolated_led->is_visible()) ||
|
||||
! (solo_safe_led && solo_safe_led->is_visible())) {
|
||||
if (! (solo_isolated_led && solo_isolated_led->get_visible()) ||
|
||||
! (solo_safe_led && solo_safe_led->get_visible())) {
|
||||
|
||||
if (solo_menu == 0) {
|
||||
build_solo_menu ();
|
||||
@ -1751,7 +1751,7 @@ RouteUI::route_rename ()
|
||||
void
|
||||
RouteUI::toggle_comment_editor ()
|
||||
{
|
||||
if (_comment_window && _comment_window->is_visible ()) {
|
||||
if (_comment_window && _comment_window->get_visible ()) {
|
||||
_comment_window->hide ();
|
||||
} else {
|
||||
open_comment_editor ();
|
||||
|
@ -2030,7 +2030,7 @@ SoundFileOmega::reset (uint32_t selected_audio_tracks, uint32_t selected_midi_tr
|
||||
chooser.set_filter (audio_and_midi_filter);
|
||||
}
|
||||
|
||||
if (is_visible()) {
|
||||
if (get_visible()) {
|
||||
reset_options ();
|
||||
}
|
||||
}
|
||||
@ -2038,7 +2038,7 @@ SoundFileOmega::reset (uint32_t selected_audio_tracks, uint32_t selected_midi_tr
|
||||
void
|
||||
SoundFileOmega::file_selection_changed ()
|
||||
{
|
||||
if (resetting_ourselves || !is_visible ()) {
|
||||
if (resetting_ourselves || !get_visible ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ ShuttleControl::~ShuttleControl ()
|
||||
void
|
||||
ShuttleControl::varispeed_button_clicked ()
|
||||
{
|
||||
if (_session->default_play_speed () == 1.0 && !_vari_dialog.is_visible ()) {
|
||||
if (_session->default_play_speed () == 1.0 && !_vari_dialog.get_visible ()) {
|
||||
_vari_dialog.present ();
|
||||
} else {
|
||||
_vari_dialog.hide ();
|
||||
|
@ -269,7 +269,7 @@ Splash::expose (GdkEventExpose* ev)
|
||||
void
|
||||
Splash::boot_message (std::string msg)
|
||||
{
|
||||
if (!is_visible() && _window_stack.empty ()) {
|
||||
if (!get_visible() && _window_stack.empty ()) {
|
||||
display ();
|
||||
}
|
||||
message (msg);
|
||||
|
@ -143,7 +143,7 @@ PersistentTooltip::show ()
|
||||
|
||||
set_tip (_tip);
|
||||
|
||||
if (!_window->is_visible ()) {
|
||||
if (!_window->get_visible ()) {
|
||||
int rx, ry;
|
||||
int sw = gdk_screen_width ();
|
||||
|
||||
|
@ -313,7 +313,7 @@ Frame::on_expose_event (GdkEventExpose* ev)
|
||||
cr->restore ();
|
||||
}
|
||||
|
||||
if (_w->is_visible ()) {
|
||||
if (_w->get_visible ()) {
|
||||
propagate_expose (*_w, ev);
|
||||
}
|
||||
return true;
|
||||
|
@ -103,7 +103,7 @@ Pane::on_size_request (GtkRequisition* req)
|
||||
for (Children::iterator c = children.begin(); c != children.end(); ++c) {
|
||||
GtkRequisition r;
|
||||
|
||||
if (!(*c)->w->is_visible ()) {
|
||||
if (!(*c)->w->get_visible ()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -248,7 +248,7 @@ Pane::reallocate (Gtk::Allocation const & alloc)
|
||||
|
||||
if (children.size() == 1) {
|
||||
/* only child gets the full allocation */
|
||||
if (children.front()->w->is_visible ()) {
|
||||
if (children.front()->w->get_visible ()) {
|
||||
children.front()->w->size_allocate (alloc);
|
||||
}
|
||||
return;
|
||||
@ -269,7 +269,7 @@ Pane::reallocate (Gtk::Allocation const & alloc)
|
||||
/* skip initial hidden children */
|
||||
|
||||
while (child != children.end()) {
|
||||
if ((*child)->w->is_visible()) {
|
||||
if ((*child)->w->get_visible()) {
|
||||
break;
|
||||
}
|
||||
++child;
|
||||
@ -284,7 +284,7 @@ Pane::reallocate (Gtk::Allocation const & alloc)
|
||||
/* Move on to next *visible* child */
|
||||
|
||||
while (++next != children.end()) {
|
||||
if ((*next)->w->is_visible()) {
|
||||
if ((*next)->w->get_visible()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -321,7 +321,7 @@ Pane::reallocate (Gtk::Allocation const & alloc)
|
||||
} else {
|
||||
child_alloc.set_height (max (child_alloc.get_height(), (*child)->minsize));
|
||||
}
|
||||
} else if (!check_fract && (*child)->w->is_visible ()) {
|
||||
} else if (!check_fract && (*child)->w->get_visible ()) {
|
||||
if (horizontal) {
|
||||
child_alloc.set_width (max (child_alloc.get_width(), cr.width));
|
||||
} else {
|
||||
@ -329,7 +329,7 @@ Pane::reallocate (Gtk::Allocation const & alloc)
|
||||
}
|
||||
}
|
||||
|
||||
if ((*child)->w->is_visible ()) {
|
||||
if ((*child)->w->get_visible ()) {
|
||||
(*child)->w->size_allocate (child_alloc);
|
||||
}
|
||||
|
||||
@ -380,12 +380,12 @@ Pane::on_expose_event (GdkEventExpose* ev)
|
||||
|
||||
for (child = children.begin(), div = dividers.begin(); child != children.end(); ++child) {
|
||||
|
||||
if ((*child)->w->is_visible()) {
|
||||
if ((*child)->w->get_visible()) {
|
||||
propagate_expose (*((*child)->w), ev);
|
||||
}
|
||||
|
||||
if (div != dividers.end()) {
|
||||
if ((*div)->is_visible()) {
|
||||
if ((*div)->get_visible()) {
|
||||
propagate_expose (**div, ev);
|
||||
}
|
||||
++div;
|
||||
|
@ -99,7 +99,7 @@ PopUp::touch ()
|
||||
{
|
||||
ENSURE_GUI_THREAD (mem_fun (*this, &PopUp::touch));
|
||||
|
||||
if (is_visible ()) {
|
||||
if (get_visible ()) {
|
||||
remove ();
|
||||
} else {
|
||||
Gtkmm2ext::set_size_request_to_display_given_text (label, my_text.c_str(), 25, 10);
|
||||
|
@ -87,7 +87,7 @@ Tabbable::window_visible () const
|
||||
return false;
|
||||
}
|
||||
|
||||
return _window->is_visible();
|
||||
return _window->get_visible();
|
||||
}
|
||||
|
||||
Window*
|
||||
|
Loading…
Reference in New Issue
Block a user