#include <ardour/diskstream.h>
#include "i18n.h"
-/* there is a string_compose() here.. */
-//using namespace sigc;
+using namespace sigc;
using namespace Gtk;
using namespace Gtkmm2ext;
using namespace ARDOUR;
{
bool picked;
Gdk::Color color;
- gdouble current[4];
+ Gdk::Color current;
- current[0] = _color.get_red() / 65535.0;
- current[1] = _color.get_green() / 65535.0;
- current[2] = _color.get_blue() / 65535.0;
- current[3] = 1.0;
+ current.set_red ( _color.get_red() / 65535);
+ current.set_green (_color.get_green() / 65535);
+ current.set_blue (_color.get_blue() / 65535);
- color = Gtkmm2ext::UI::instance()->get_color (_("ardour: color selection"), picked, current);
+ color = Gtkmm2ext::UI::instance()->get_color (_("ardour: color selection"), picked, ¤t);
if (picked) {
set_color (color);
Choice prompter (prompt, choices);
- prompter.chosen.connect (Gtk::Main::quit.slot());
+ prompter.chosen.connect(sigc::ptr_fun(Gtk::Main::quit));
prompter.show_all ();
Gtk::Main::run ();
if (prompter.get_choice() == 0) {
- Glib::signal_idle().connect (bind (mem_fun (&RouteUI::idle_remove_this_route), this));
+ Glib::signal_idle().connect (bind (sigc::ptr_fun (&RouteUI::idle_remove_this_route), this));
}
}
RouteUI::route_rename ()
{
ArdourPrompter name_prompter (true);
+ string result;
name_prompter.set_prompt (_("new name: "));
name_prompter.set_initial_text (_route.name());
- name_prompter.done.connect (Gtk::Main::quit.slot());
name_prompter.show_all ();
- Gtk::Main::run();
-
- if (name_prompter.status == Gtkmm2ext::Prompter::cancelled) {
- return;
- }
-
- string result;
- name_prompter.get_result (result);
+ switch (name_prompter.run ()) {
- if (result.length() == 0) {
- return;
+ case GTK_RESPONSE_ACCEPT:
+ name_prompter.get_result (result);
+ if (result.length()) {
+ strip_whitespace_edges (result);
+ _route.set_name (result, this);
+ }
+ break;
}
- strip_whitespace_edges (result);
- _route.set_name (result, this);
+ return;
+
}
void