summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-06 15:07:19 +0100
committerRobin Gareus <robin@gareus.org>2017-03-06 15:42:58 +0100
commite8ea0548e0817044c013aa778aa810f4e028c8c3 (patch)
treed4597f8c33f2e03c4cd3883e2ff89bbe34f6aae7 /gtk2_ardour/ardour_ui.cc
parent12f46c7385b7172cf1fceafea0c30834f7410649 (diff)
Fix save-as progress dialog.
ScopedConnection and label,bar went out of scope.
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r--gtk2_ardour/ardour_ui.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 38fceffdd8..10d637d2e9 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -2705,16 +2705,17 @@ ARDOUR_UI::save_session_as ()
*/
ArdourDialog progress_dialog (_("Save As"), true);
+ ScopedConnection c;
if (sa.include_media && sa.copy_media) {
- Gtk::Label label;
- Gtk::ProgressBar progress_bar;
+ Gtk::Label* label = manage (new Gtk::Label());
+ Gtk::ProgressBar* progress_bar = manage (new Gtk::ProgressBar ());
- progress_dialog.get_vbox()->pack_start (label);
- progress_dialog.get_vbox()->pack_start (progress_bar);
- label.show ();
- progress_bar.show ();
+ progress_dialog.get_vbox()->pack_start (*label);
+ progress_dialog.get_vbox()->pack_start (*progress_bar);
+ label->show ();
+ progress_bar->show ();
/* this signal will be emitted from within this, the calling thread,
* after every file is copied. It provides information on percentage
@@ -2722,9 +2723,7 @@ ARDOUR_UI::save_session_as ()
* copied so far, and the total number to copy.
*/
- ScopedConnection c;
-
- sa.Progress.connect_same_thread (c, boost::bind (&ARDOUR_UI::save_as_progress_update, this, _1, _2, _3, &label, &progress_bar));
+ sa.Progress.connect_same_thread (c, boost::bind (&ARDOUR_UI::save_as_progress_update, this, _1, _2, _3, label, progress_bar));
progress_dialog.show_all ();
progress_dialog.present ();