summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui_dialogs.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-07-22 17:49:41 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-02-22 15:31:22 -0500
commit16731d07d33e49564b01640d12f09431bb96484e (patch)
tree319576cfec0e268535f965c1c5730f02fc0a9ad8 /gtk2_ardour/ardour_ui_dialogs.cc
parent308f6ed8281d2b8913207e0236bd22678e73ec9b (diff)
remove use of current_toplevel() where unnecessary, fix broken necessary cases, generally fix up show/hide/attach/detach for Tabbables
Diffstat (limited to 'gtk2_ardour/ardour_ui_dialogs.cc')
-rw-r--r--gtk2_ardour/ardour_ui_dialogs.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc
index c31257eb5b..0d8c8a9c27 100644
--- a/gtk2_ardour/ardour_ui_dialogs.cc
+++ b/gtk2_ardour/ardour_ui_dialogs.cc
@@ -332,6 +332,10 @@ _hide_splash (gpointer arg)
void
ARDOUR_UI::show_tabbable (Tabbable* t)
{
+ if (!t) {
+ return;
+ }
+
if (splash && splash->is_visible()) {
// in 2 seconds, hide the splash screen
Glib::signal_timeout().connect (sigc::bind (sigc::ptr_fun (_hide_splash), this), 2000);
@@ -343,12 +347,18 @@ ARDOUR_UI::show_tabbable (Tabbable* t)
void
ARDOUR_UI::hide_tabbable (Tabbable* t)
{
+ if (!t) {
+ return;
+ }
t->make_invisible ();
}
void
ARDOUR_UI::attach_tabbable (Tabbable* t)
{
+ if (!t) {
+ return;
+ }
if (splash && splash->is_visible()) {
// in 2 seconds, hide the splash screen
Glib::signal_timeout().connect (sigc::bind (sigc::ptr_fun (_hide_splash), this), 2000);
@@ -360,6 +370,9 @@ ARDOUR_UI::attach_tabbable (Tabbable* t)
void
ARDOUR_UI::detach_tabbable (Tabbable* t)
{
+ if (!t) {
+ return;
+ }
t->detach ();
}