19 #ifndef _ardour_gtk_simpple_progress_dialog_h_
20 #define _ardour_gtk_simpple_progress_dialog_h_
22 #include <ytkmm/button.h>
23 #include <ytkmm/messagedialog.h>
24 #include <ytkmm/progressbar.h>
25 #include <ytkmm/stock.h>
33 : MessageDialog (title, false,
Gtk::MESSAGE_OTHER,
Gtk::BUTTONS_NONE, true)
35 get_vbox()->set_size_request(400,-1);
37 pbar = manage (
new Gtk::ProgressBar());
39 get_vbox()->pack_start (*
pbar, Gtk::PACK_SHRINK, 4);
41 Gtk::Button *cancel_button = add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
42 cancel_button->signal_clicked().connect (cancel);
43 cancel_button->show();
44 get_vbox()->pack_start (*cancel_button, Gtk::PACK_SHRINK);
48 pbar->set_fraction ((
float) c / (
float) t);
51 while (gtk_events_pending() && --timeout) {
52 gtk_main_iteration ();
void update_progress(ARDOUR::samplecnt_t c, ARDOUR::samplecnt_t t)
SimpleProgressDialog(std::string title, const Glib::SignalProxy0< void >::SlotType &cancel)
Temporal::samplecnt_t samplecnt_t