#include "i18n.h"
using namespace ARDOUR;
-using namespace SigC;
+using namespace sigc;
using namespace Gtk;
Editor::TimeStretchDialog::TimeStretchDialog (Editor& e)
action_button (_("Stretch/Shrink it"))
{
set_modal (true);
- set_position (GTK_WIN_POS_MOUSE);
+ set_position (Gtk::WIN_POS_MOUSE);
set_title (_("ardour: timestretch"));
set_name (N_("TimeStretchDialog"));
antialias_button.set_name (N_("TimeStretchButton"));
progress_bar.set_name (N_("TimeStretchProgress"));
- action_button.clicked.connect (bind (slot (*this, &ArdourDialog::stop), 1));
+ action_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), 1));
}
gint
Editor::TimeStretchDialog::update_progress ()
{
- progress_bar.set_percentage (request.progress);
+ progress_bar.set_fraction (request.progress/100);
return request.running;
}
current_timestretch = new TimeStretchDialog (*this);
}
- current_timestretch->progress_bar.set_percentage (0.0f);
- current_timestretch->first_cancel = current_timestretch->cancel_button.clicked.connect (bind (slot (*current_timestretch, &ArdourDialog::stop), -1));
- current_timestretch->first_delete = current_timestretch->delete_event.connect (slot (*current_timestretch, &ArdourDialog::wm_close_event));
+ current_timestretch->progress_bar.set_fraction (0.0f);
+ current_timestretch->first_cancel = current_timestretch->cancel_button.signal_clicked().connect (bind (mem_fun (*current_timestretch, &ArdourDialog::stop), -1));
+ // GTK2FIX
+ // current_timestretch->first_delete = current_timestretch->signal_delete_event().connect (mem_fun (*current_timestretch, &ArdourDialog::wm_close_event));
current_timestretch->run ();
if (current_timestretch->run_status() != 1) {
- current_timestretch->close ();
+ // GTK2FIX
+ // current_timestretch->close ();
return 1; /* no error, but we did nothing */
}
current_timestretch->first_cancel.disconnect();
current_timestretch->first_delete.disconnect();
- current_timestretch->cancel_button.clicked.connect (slot (current_timestretch, &TimeStretchDialog::cancel_timestretch_in_progress));
- current_timestretch->delete_event.connect (slot (current_timestretch, &TimeStretchDialog::delete_timestretch_in_progress));
+ current_timestretch->cancel_button.signal_clicked().connect (mem_fun (current_timestretch, &TimeStretchDialog::cancel_timestretch_in_progress));
+ current_timestretch->signal_delete_event().connect (mem_fun (current_timestretch, &TimeStretchDialog::delete_timestretch_in_progress));
if (pthread_create_and_store ("timestretch", &thread, 0, timestretch_thread, current_timestretch)) {
current_timestretch->close ();
pthread_detach (thread);
- SigC::Connection c = Main::timeout.connect (slot (current_timestretch, &TimeStretchDialog::update_progress), 100);
+ sigc::connection c = Glib::signal_timeout().connect (mem_fun (current_timestretch, &TimeStretchDialog::update_progress), 100);
while (current_timestretch->request.running) {
gtk_main_iteration ();
}
c.disconnect ();
-
- current_timestretch->close ();
+
+ // GTK2FIX
+ // current_timestretch->close ();
return current_timestretch->status;
}