#include "group_tabs.h"
#include "utils.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace Gtk;
using namespace ARDOUR;
_active.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
_color.signal_color_set().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
_gain.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
- _relative.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
- _mute.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
- _solo.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
- _rec_enable.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
- _select.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
- _route_active.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
+ _relative.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
+ _mute.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
+ _solo.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
+ _rec_enable.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
+ _select.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
+ _route_active.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
_share_color.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
_share_monitoring.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
show_all_children ();
}
-/** @return true if the route group edit was cancelled, otherwise false */
bool
-RouteGroupDialog::do_run ()
+RouteGroupDialog::name_check () const
{
- while (1) {
- int const r = run ();
+ if (unique_name (_name.get_text())) {
+ /* not cancelled and the name is ok, so all is well */
+ return true;
+ }
- if (r != Gtk::RESPONSE_OK) {
- return true;
- }
+ _group->set_name (_initial_name);
- if (unique_name (_name.get_text())) {
- /* not cancelled and the name is ok, so all is well */
- return false;
- }
+ MessageDialog msg (
+ _("The group name is not unique. Please use a different name."),
+ false,
+ Gtk::MESSAGE_ERROR,
+ Gtk::BUTTONS_OK,
+ true
+ );
- _group->set_name (_initial_name);
- MessageDialog msg (
- _("The group name is not unique. Please use a different name."),
- false,
- Gtk::MESSAGE_ERROR,
- Gtk::BUTTONS_OK,
- true
- );
-
- msg.run ();
- }
+ msg.set_position (WIN_POS_MOUSE);
+ msg.run ();
- abort(); /* NOTREACHED */
return false;
}