diff options
author | Sakari Bergen <sakari.bergen@beatwaves.net> | 2012-01-28 12:55:28 +0000 |
---|---|---|
committer | Sakari Bergen <sakari.bergen@beatwaves.net> | 2012-01-28 12:55:28 +0000 |
commit | eb85208fe8ab985831acc7011c3cebd219aa0031 (patch) | |
tree | 2c723c78cc0e79c185b608df10ea1d283641d608 | |
parent | 2858d439020af4d3084d64d36776d77655eb293b (diff) |
Implement simple separate progress bar for export normalizing phase(s), needs to be made prettier still after some discussions...
git-svn-id: svn://localhost/ardour2/branches/3.0@11374 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/export_dialog.cc | 22 | ||||
-rw-r--r-- | gtk2_ardour/export_dialog.h | 6 |
2 files changed, 21 insertions, 7 deletions
diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index 8d5ccae469..61fa64ad20 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -125,6 +125,10 @@ ExportDialog::init () progress_widget.pack_start (progress_label, false, false, 6); progress_widget.pack_start (progress_bar, false, false, 6); + progress_widget.pack_start (normalizing_widget, false, false, 0); + normalizing_widget.pack_start (normalizing_label, false, false, 6); + normalizing_widget.pack_start (normalizing_bar, false, false, 6); + /* Buttons */ cancel_button = add_button (Gtk::Stock::CANCEL, RESPONSE_CANCEL); @@ -310,6 +314,7 @@ ExportDialog::show_progress () warning_widget.hide_all(); progress_widget.show (); progress_widget.show_all_children (); + normalizing_widget.hide(); progress_connection = Glib::signal_timeout().connect (sigc::mem_fun(*this, &ExportDialog::progress_timeout), 100); gtk_main_iteration (); @@ -329,17 +334,20 @@ ExportDialog::show_progress () gint ExportDialog::progress_timeout () { - std::string status_text; if (status->normalizing) { - status_text = string_compose (_("Normalizing timespan %1 of %2"), - status->timespan, status->total_timespans); + normalizing_widget.show(); + normalizing_label.set_text (string_compose (_("Normalizing timespan %1 of %2"), + status->timespan, status->total_timespans)); + normalizing_bar.set_fraction (status->progress); } else { - status_text = string_compose (_("Exporting timespan %1 of %2"), - status->timespan, status->total_timespans); + normalizing_bar.set_fraction (0); + normalizing_label.set_text (""); + + progress_label.set_text (string_compose (_("Exporting timespan %1 of %2"), + status->timespan, status->total_timespans)); + progress_bar.set_fraction (status->progress); } - progress_label.set_text (status_text); - progress_bar.set_fraction (status->progress); return TRUE; } diff --git a/gtk2_ardour/export_dialog.h b/gtk2_ardour/export_dialog.h index 5928c67e9f..9b06492cdd 100644 --- a/gtk2_ardour/export_dialog.h +++ b/gtk2_ardour/export_dialog.h @@ -131,6 +131,12 @@ class ExportDialog : public ArdourDialog { Gtk::ProgressBar progress_bar; sigc::connection progress_connection; + /* Normalizing */ + + Gtk::VBox normalizing_widget; + Gtk::Label normalizing_label; + Gtk::ProgressBar normalizing_bar; + /* Buttons */ Gtk::Button * cancel_button; |