mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
slowly fixing up ArdourDialog nonsense
git-svn-id: svn://localhost/trunk/ardour2@132 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
aaa44a37aa
commit
1f16781c75
16 changed files with 225 additions and 524 deletions
|
|
@ -32,29 +32,24 @@
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
using namespace Gtkmm2ext;
|
using namespace Gtkmm2ext;
|
||||||
using namespace sigc;
|
using namespace sigc;
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
extern std::vector<string> channel_combo_strings;
|
extern std::vector<string> channel_combo_strings;
|
||||||
|
|
||||||
AddRouteDialog::AddRouteDialog ()
|
AddRouteDialog::AddRouteDialog ()
|
||||||
: ArdourDialog ("add route dialog"),
|
: Dialog (_("ardour: add track/bus")),
|
||||||
ok_button (_("OK")),
|
|
||||||
cancel_button (_("Cancel")),
|
|
||||||
track_button (_("Tracks")),
|
track_button (_("Tracks")),
|
||||||
bus_button (_("Busses")),
|
bus_button (_("Busses")),
|
||||||
routes_adjustment (1, 1, 32, 1, 4),
|
routes_adjustment (1, 1, 32, 1, 4),
|
||||||
routes_spinner (routes_adjustment)
|
routes_spinner (routes_adjustment)
|
||||||
{
|
{
|
||||||
set_name ("AddRouteDialog");
|
set_name ("AddRouteDialog");
|
||||||
set_title (_("ardour: add track/bus"));
|
|
||||||
set_wmclass (X_("ardour_add_track_bus"), "Ardour");
|
set_wmclass (X_("ardour_add_track_bus"), "Ardour");
|
||||||
set_position (Gtk::WIN_POS_MOUSE);
|
set_position (Gtk::WIN_POS_MOUSE);
|
||||||
set_keyboard_input (true);
|
|
||||||
|
|
||||||
name_template_entry.set_name ("AddRouteDialogNameTemplateEntry");
|
name_template_entry.set_name ("AddRouteDialogNameTemplateEntry");
|
||||||
track_button.set_name ("AddRouteDialogRadioButton");
|
track_button.set_name ("AddRouteDialogRadioButton");
|
||||||
bus_button.set_name ("AddRouteDialogRadioButton");
|
bus_button.set_name ("AddRouteDialogRadioButton");
|
||||||
ok_button.set_name ("AddRouteDialogButton");
|
|
||||||
cancel_button.set_name ("AddRouteDialogButton");
|
|
||||||
routes_spinner.set_name ("AddRouteDialogSpinner");
|
routes_spinner.set_name ("AddRouteDialogSpinner");
|
||||||
|
|
||||||
RadioButton::Group g = track_button.get_group();
|
RadioButton::Group g = track_button.get_group();
|
||||||
|
|
@ -85,20 +80,6 @@ AddRouteDialog::AddRouteDialog ()
|
||||||
hbnt->pack_start (name_template_entry, true, true);
|
hbnt->pack_start (name_template_entry, true, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
HBox* hbbut = manage (new HBox);
|
|
||||||
|
|
||||||
set_size_request_to_display_given_text (ok_button, _("Cancel"), 20, 15); // this is cancel on purpose
|
|
||||||
set_size_request_to_display_given_text (cancel_button, _("Cancel"), 20, 15);
|
|
||||||
|
|
||||||
hbbut->set_homogeneous (true);
|
|
||||||
hbbut->set_spacing (6);
|
|
||||||
hbbut->pack_end (cancel_button, false, false);
|
|
||||||
hbbut->pack_end (ok_button, false, false);
|
|
||||||
|
|
||||||
HBox* hbbutouter = manage (new HBox);
|
|
||||||
hbbutouter->set_border_width (12);
|
|
||||||
hbbutouter->pack_end (*hbbut, false, false);
|
|
||||||
|
|
||||||
VBox* vb2 = manage (new VBox);
|
VBox* vb2 = manage (new VBox);
|
||||||
|
|
||||||
vb2->set_border_width (12);
|
vb2->set_border_width (12);
|
||||||
|
|
@ -108,13 +89,15 @@ AddRouteDialog::AddRouteDialog ()
|
||||||
#if NOT_USEFUL_YET
|
#if NOT_USEFUL_YET
|
||||||
vb2->pack_start (*hbnt, false, false);
|
vb2->pack_start (*hbnt, false, false);
|
||||||
#endif
|
#endif
|
||||||
vb2->pack_start (*hbbutouter, false, false);
|
|
||||||
|
get_vbox()->pack_start (*hbrb, false, false);
|
||||||
add (*vb2);
|
get_vbox()->pack_start (*vbcc, false, false);
|
||||||
|
#if NOT_USEFUL_YET
|
||||||
// signal_delete_event().connect (mem_fun(*this, &ArdourDialog::wm_close_event));
|
get_vbox()->pack_start (*hbnt, false, false);
|
||||||
ok_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), 0));
|
#endif
|
||||||
cancel_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), 1));
|
|
||||||
|
add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||||
|
add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
AddRouteDialog::~AddRouteDialog ()
|
AddRouteDialog::~AddRouteDialog ()
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <gtkmm/entry.h>
|
#include <gtkmm/entry.h>
|
||||||
|
#include <gtkmm/dialog.h>
|
||||||
#include <gtkmm/radiobutton.h>
|
#include <gtkmm/radiobutton.h>
|
||||||
#include <gtkmm/adjustment.h>
|
#include <gtkmm/adjustment.h>
|
||||||
#include <gtkmm/spinbutton.h>
|
#include <gtkmm/spinbutton.h>
|
||||||
|
|
@ -12,9 +13,7 @@
|
||||||
|
|
||||||
#include <gtkmm2ext/click_box.h>
|
#include <gtkmm2ext/click_box.h>
|
||||||
|
|
||||||
#include "ardour_dialog.h"
|
class AddRouteDialog : public Gtk::Dialog
|
||||||
|
|
||||||
class AddRouteDialog : public ArdourDialog
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AddRouteDialog ();
|
AddRouteDialog ();
|
||||||
|
|
@ -25,9 +24,6 @@ class AddRouteDialog : public ArdourDialog
|
||||||
int channels ();
|
int channels ();
|
||||||
int count ();
|
int count ();
|
||||||
|
|
||||||
Gtk::Button ok_button;
|
|
||||||
Gtk::Button cancel_button;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gtk::Entry name_template_entry;
|
Gtk::Entry name_template_entry;
|
||||||
Gtk::RadioButton track_button;
|
Gtk::RadioButton track_button;
|
||||||
|
|
|
||||||
|
|
@ -26,15 +26,10 @@
|
||||||
#include "ardour_ui.h"
|
#include "ardour_ui.h"
|
||||||
|
|
||||||
|
|
||||||
ArdourDialog::ArdourDialog (string name)
|
ArdourDialog::ArdourDialog (string title, bool modal)
|
||||||
: Dialog (name)
|
: Dialog (title, modal)
|
||||||
{
|
{
|
||||||
session = 0;
|
session = 0;
|
||||||
kbd_input = false;
|
|
||||||
running = false;
|
|
||||||
_run_status = 0;
|
|
||||||
_within_hiding = false;
|
|
||||||
hide_on_stop = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ArdourDialog::~ArdourDialog ()
|
ArdourDialog::~ArdourDialog ()
|
||||||
|
|
@ -64,64 +59,5 @@ ArdourDialog::on_leave_notify_event (GdkEventCrossing *ev)
|
||||||
void
|
void
|
||||||
ArdourDialog::on_unmap ()
|
ArdourDialog::on_unmap ()
|
||||||
{
|
{
|
||||||
_within_hiding = true;
|
|
||||||
_within_hiding = false;
|
|
||||||
Dialog::on_unmap ();
|
Dialog::on_unmap ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
ArdourDialog::set_hide_on_stop (bool yn)
|
|
||||||
{
|
|
||||||
hide_on_stop = yn;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ArdourDialog::stop (int rr)
|
|
||||||
{
|
|
||||||
if (hide_on_stop) {
|
|
||||||
hide_all ();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (running) {
|
|
||||||
if (rr == 0) {
|
|
||||||
response (GTK_RESPONSE_ACCEPT);
|
|
||||||
} else {
|
|
||||||
response (GTK_RESPONSE_CANCEL);
|
|
||||||
}
|
|
||||||
running = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ArdourDialog::run ()
|
|
||||||
{
|
|
||||||
show_all ();
|
|
||||||
|
|
||||||
running = true;
|
|
||||||
switch (Dialog::run ()) {
|
|
||||||
case GTK_RESPONSE_ACCEPT:
|
|
||||||
_run_status = 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GTK_RESPONSE_DELETE_EVENT:
|
|
||||||
_run_status = -1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
_run_status = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
hide_all ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ArdourDialog::set_keyboard_input (bool yn)
|
|
||||||
{
|
|
||||||
kbd_input = yn;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
ArdourDialog::run_status ()
|
|
||||||
{
|
|
||||||
return _run_status;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -36,17 +36,9 @@ namespace ARDOUR {
|
||||||
class ArdourDialog : public Gtk::Dialog
|
class ArdourDialog : public Gtk::Dialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArdourDialog (string name);
|
ArdourDialog (std::string title, bool modal = false);
|
||||||
~ArdourDialog();
|
~ArdourDialog();
|
||||||
|
|
||||||
bool within_hiding() const { return _within_hiding; }
|
|
||||||
|
|
||||||
void run ();
|
|
||||||
void stop (int);
|
|
||||||
void set_keyboard_input (bool yn);
|
|
||||||
void set_hide_on_stop (bool yn);
|
|
||||||
int run_status();
|
|
||||||
|
|
||||||
bool on_enter_notify_event (GdkEventCrossing*);
|
bool on_enter_notify_event (GdkEventCrossing*);
|
||||||
bool on_leave_notify_event (GdkEventCrossing*);
|
bool on_leave_notify_event (GdkEventCrossing*);
|
||||||
void on_unmap ();
|
void on_unmap ();
|
||||||
|
|
@ -60,15 +52,6 @@ class ArdourDialog : public Gtk::Dialog
|
||||||
virtual void session_gone () {
|
virtual void session_gone () {
|
||||||
set_session (0);
|
set_session (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void quit ();
|
|
||||||
|
|
||||||
private:
|
|
||||||
int _run_status;
|
|
||||||
bool _within_hiding;
|
|
||||||
bool kbd_input;
|
|
||||||
bool running;
|
|
||||||
bool hide_on_stop;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __ardour_dialog_h__
|
#endif // __ardour_dialog_h__
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gtkmm2ext/utils.h>
|
#include <gtkmm/stock.h>
|
||||||
|
|
||||||
#include "ardour_message.h"
|
#include "ardour_message.h"
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
@ -27,37 +27,26 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
|
|
||||||
|
|
||||||
ArdourMessage::ArdourMessage (Gtk::Window* parent,
|
ArdourMessage::ArdourMessage (Gtk::Window* parent,
|
||||||
string name, string msg,
|
string name, string msg,
|
||||||
bool grab_focus, bool auto_run)
|
bool grab_focus, bool auto_run)
|
||||||
: ArdourDialog (name),
|
: ArdourDialog (name)
|
||||||
ok_button (_("OK"))
|
|
||||||
{
|
{
|
||||||
set_keyboard_input (true);
|
|
||||||
|
|
||||||
label.set_text (msg);
|
label.set_text (msg);
|
||||||
label.set_alignment (0.5, 0.5);
|
label.set_alignment (0.5, 0.5);
|
||||||
label.set_name (X_("PrompterLabel"));
|
label.set_name (X_("PrompterLabel"));
|
||||||
|
|
||||||
ok_button.set_name ("EditorGTKButton");
|
get_vbox()->pack_start (label);
|
||||||
ok_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), 1));
|
|
||||||
|
Button* ok_button = add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||||
packer.set_spacing (10);
|
|
||||||
packer.set_border_width (10);
|
|
||||||
packer.pack_start (label);
|
|
||||||
packer.pack_start (ok_button);
|
|
||||||
|
|
||||||
set_name (X_("Prompter"));
|
set_name (X_("Prompter"));
|
||||||
set_position (Gtk::WIN_POS_MOUSE);
|
set_position (Gtk::WIN_POS_MOUSE);
|
||||||
set_modal (true);
|
set_modal (true);
|
||||||
add (packer);
|
set_type_hint (Gdk::WINDOW_TYPE_HINT_MENU);
|
||||||
show_all ();
|
|
||||||
|
|
||||||
signal_realize().connect (bind (sigc::ptr_fun (Gtkmm2ext::set_decoration), this, Gdk::WMDecoration (GDK_DECOR_BORDER|GDK_DECOR_RESIZEH)));
|
|
||||||
|
|
||||||
if (grab_focus) {
|
if (grab_focus) {
|
||||||
ok_button.grab_focus ();
|
ok_button->grab_focus ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parent) {
|
if (parent) {
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,6 @@ class ArdourMessage : public ArdourDialog
|
||||||
~ArdourMessage();
|
~ArdourMessage();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gtk::VBox packer;
|
|
||||||
Gtk::Button ok_button;
|
|
||||||
Gtk::Label label;
|
Gtk::Label label;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1098,24 +1098,16 @@ If you still wish to quit, please use the\n\n\
|
||||||
int
|
int
|
||||||
ARDOUR_UI::ask_about_saving_session (string what)
|
ARDOUR_UI::ask_about_saving_session (string what)
|
||||||
{
|
{
|
||||||
ArdourDialog window ("saving dialog");
|
ArdourDialog window (_("ardour: save session?"));
|
||||||
Gtk::VBox packer;
|
|
||||||
Gtk::Label prompt_label;
|
Gtk::Label prompt_label;
|
||||||
Gtk::HBox button_packer;
|
|
||||||
|
|
||||||
string msg;
|
string msg;
|
||||||
|
|
||||||
msg = string_compose(_("Save and %1"), what);
|
msg = string_compose(_("Save and %1"), what);
|
||||||
|
window.add_button (msg, RESPONSE_ACCEPT);
|
||||||
Gtk::Button save_button (msg);
|
|
||||||
save_button.set_name ("EditorGTKButton");
|
|
||||||
|
|
||||||
msg = string_compose(_("Just %1"), what);
|
msg = string_compose(_("Just %1"), what);
|
||||||
|
window.add_button (msg, RESPONSE_REJECT);
|
||||||
Gtk::Button nosave_button (msg);
|
|
||||||
nosave_button.set_name ("EditorGTKButton");
|
|
||||||
|
|
||||||
msg = string_compose(_("Don't %1"), what);
|
msg = string_compose(_("Don't %1"), what);
|
||||||
|
window.add_button (msg, RESPONSE_REJECT);
|
||||||
|
|
||||||
Gtk::Button noquit_button (msg);
|
Gtk::Button noquit_button (msg);
|
||||||
noquit_button.set_name ("EditorGTKButton");
|
noquit_button.set_name ("EditorGTKButton");
|
||||||
|
|
@ -1134,36 +1126,30 @@ ARDOUR_UI::ask_about_saving_session (string what)
|
||||||
prompt_label.set_text (prompt);
|
prompt_label.set_text (prompt);
|
||||||
prompt_label.set_alignment (0.5, 0.5);
|
prompt_label.set_alignment (0.5, 0.5);
|
||||||
prompt_label.set_name (X_("PrompterLabel"));
|
prompt_label.set_name (X_("PrompterLabel"));
|
||||||
|
|
||||||
save_button.signal_clicked().connect (bind(mem_fun(window,&ArdourDialog::stop), 1));
|
|
||||||
nosave_button.signal_clicked().connect (bind(mem_fun(window,&ArdourDialog::stop), 0));
|
|
||||||
noquit_button.signal_clicked().connect (bind(mem_fun(window,&ArdourDialog::stop), -1));
|
|
||||||
|
|
||||||
button_packer.set_spacing (10);
|
|
||||||
button_packer.pack_start (save_button);
|
|
||||||
button_packer.pack_start (nosave_button);
|
|
||||||
button_packer.pack_start (noquit_button);
|
|
||||||
|
|
||||||
packer.set_spacing (10);
|
window.get_vbox()->pack_start (prompt_label);
|
||||||
packer.set_border_width (10);
|
|
||||||
packer.pack_start (prompt_label);
|
|
||||||
packer.pack_start (button_packer);
|
|
||||||
|
|
||||||
window.set_name (_("Prompter"));
|
window.set_name (_("Prompter"));
|
||||||
window.set_title (_("ardour: save session?"));
|
|
||||||
window.set_position (Gtk::WIN_POS_MOUSE);
|
window.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
window.set_modal (true);
|
window.set_modal (true);
|
||||||
window.add (packer);
|
|
||||||
window.show_all ();
|
window.show_all ();
|
||||||
window.set_keyboard_input (true);
|
|
||||||
|
|
||||||
save_the_session = 0;
|
save_the_session = 0;
|
||||||
|
|
||||||
editor->ensure_float (window);
|
editor->ensure_float (window);
|
||||||
|
|
||||||
window.run ();
|
ResponseType r = (ResponseType) window.run();
|
||||||
|
|
||||||
return window.run_status();
|
window.hide ();
|
||||||
|
|
||||||
|
switch (r) {
|
||||||
|
case RESPONSE_ACCEPT:
|
||||||
|
return 0;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
|
|
@ -1719,17 +1705,10 @@ ARDOUR_UI::build_session_selector ()
|
||||||
{
|
{
|
||||||
session_selector_window = new ArdourDialog ("session selector");
|
session_selector_window = new ArdourDialog ("session selector");
|
||||||
|
|
||||||
Gtk::VBox *vpacker = manage (new Gtk::VBox);
|
|
||||||
Gtk::ScrolledWindow *scroller = manage (new Gtk::ScrolledWindow);
|
Gtk::ScrolledWindow *scroller = manage (new Gtk::ScrolledWindow);
|
||||||
Gtk::HBox *button_packer = manage (new Gtk::HBox);
|
|
||||||
Gtk::Button *cancel_button = manage (new Gtk::Button (_("cancel")));
|
|
||||||
Gtk::Button *rescan_button = manage (new Gtk::Button (_("rescan")));
|
|
||||||
|
|
||||||
button_packer->pack_start (*rescan_button);
|
session_selector_window->add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||||
button_packer->pack_start (*cancel_button);
|
session_selector_window->add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||||
|
|
||||||
vpacker->pack_start (*scroller);
|
|
||||||
vpacker->pack_start (*button_packer, false, false);
|
|
||||||
|
|
||||||
recent_session_model = TreeStore::create (recent_session_columns);
|
recent_session_model = TreeStore::create (recent_session_columns);
|
||||||
recent_session_display.set_model (recent_session_model);
|
recent_session_display.set_model (recent_session_model);
|
||||||
|
|
@ -1739,9 +1718,9 @@ ARDOUR_UI::build_session_selector ()
|
||||||
scroller->add (recent_session_display);
|
scroller->add (recent_session_display);
|
||||||
scroller->set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
|
scroller->set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
|
||||||
|
|
||||||
session_selector_window->add (*vpacker);
|
|
||||||
session_selector_window->set_name ("SessionSelectorWindow");
|
session_selector_window->set_name ("SessionSelectorWindow");
|
||||||
session_selector_window->set_size_request (200, 400);
|
session_selector_window->set_size_request (200, 400);
|
||||||
|
session_selector_window->get_vbox()->pack_start (*scroller);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1755,13 +1734,13 @@ ARDOUR_UI::open_recent_session ()
|
||||||
|
|
||||||
redisplay_recent_sessions ();
|
redisplay_recent_sessions ();
|
||||||
|
|
||||||
session_selector_window->run ();
|
ResponseType r = (ResponseType) session_selector_window->run ();
|
||||||
|
|
||||||
|
session_selector_window->hide();
|
||||||
|
|
||||||
switch (session_selector_window->run_status()) {
|
switch (r) {
|
||||||
case 0:
|
case RESPONSE_ACCEPT:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1775,11 +1754,9 @@ ARDOUR_UI::open_recent_session ()
|
||||||
Glib::ustring path = (*i)[recent_session_columns.fullpath];
|
Glib::ustring path = (*i)[recent_session_columns.fullpath];
|
||||||
Glib::ustring state = (*i)[recent_session_columns.visible_name];
|
Glib::ustring state = (*i)[recent_session_columns.visible_name];
|
||||||
|
|
||||||
session_selector_window->response (RESPONSE_ACCEPT);
|
|
||||||
_session_is_new = false;
|
_session_is_new = false;
|
||||||
|
|
||||||
load_session (path, state);
|
load_session (path, state);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
@ -2886,7 +2863,7 @@ require some unused files to continue to exist."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArdourDialog results ("cleanup results");
|
ArdourDialog results (_("ardour: cleanup"), true);
|
||||||
|
|
||||||
struct CleanupResultsModelColumns : public Gtk::TreeModel::ColumnRecord {
|
struct CleanupResultsModelColumns : public Gtk::TreeModel::ColumnRecord {
|
||||||
CleanupResultsModelColumns() {
|
CleanupResultsModelColumns() {
|
||||||
|
|
@ -2909,11 +2886,6 @@ require some unused files to continue to exist."));
|
||||||
|
|
||||||
Gtk::ScrolledWindow list_scroller;
|
Gtk::ScrolledWindow list_scroller;
|
||||||
Gtk::Label txt;
|
Gtk::Label txt;
|
||||||
Gtk::Button ok_button (_("OK"));
|
|
||||||
Gtk::VBox vpacker;
|
|
||||||
|
|
||||||
vpacker.set_border_width (10);
|
|
||||||
vpacker.set_spacing (10);
|
|
||||||
|
|
||||||
if (rep.space < 1048576.0f) {
|
if (rep.space < 1048576.0f) {
|
||||||
if (removed > 1) {
|
if (removed > 1) {
|
||||||
|
|
@ -2929,7 +2901,7 @@ require some unused files to continue to exist."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vpacker.pack_start (txt, false, false);
|
results.get_vbox()->pack_start (txt, false, false);
|
||||||
|
|
||||||
for (vector<string>::iterator i = rep.paths.begin(); i != rep.paths.end(); ++i) {
|
for (vector<string>::iterator i = rep.paths.begin(); i != rep.paths.end(); ++i) {
|
||||||
TreeModel::Row row = *(results_model->append());
|
TreeModel::Row row = *(results_model->append());
|
||||||
|
|
@ -2941,14 +2913,9 @@ require some unused files to continue to exist."));
|
||||||
list_scroller.set_size_request (-1, 250);
|
list_scroller.set_size_request (-1, 250);
|
||||||
list_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
|
list_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
|
||||||
|
|
||||||
vpacker.pack_start (list_scroller, true, true);
|
results.get_vbox()->pack_start (list_scroller, true, true);
|
||||||
vpacker.pack_start (ok_button, false, false);
|
results.add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||||
|
|
||||||
results.add (vpacker);
|
|
||||||
|
|
||||||
results.set_position (Gtk::WIN_POS_MOUSE);
|
results.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
results.set_title (_("ardour: cleanup"));
|
|
||||||
results.set_modal (true);
|
|
||||||
|
|
||||||
results.run ();
|
results.run ();
|
||||||
}
|
}
|
||||||
|
|
@ -2961,40 +2928,22 @@ ARDOUR_UI::cleanup ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArdourDialog checker (X_("cleanup confirm dialog"));
|
ArdourDialog checker (_("ardour cleanup"));
|
||||||
Gtk::Label label (_("\
|
Gtk::Label label (_("\
|
||||||
Cleanup is a destructive operation.\n\
|
Cleanup is a destructive operation.\n\
|
||||||
ALL undo/redo information will be lost if you cleanup.\n\
|
ALL undo/redo information will be lost if you cleanup.\n\
|
||||||
Unused audio files will be moved to a \"dead sounds\" location."));
|
Unused audio files will be moved to a \"dead sounds\" location."));
|
||||||
|
|
||||||
Gtk::Button ok_button (_("Proceed with cleanup"));
|
|
||||||
Gtk::Button cancel_button (_("Cancel"));
|
|
||||||
Gtk::HBox bbox;
|
|
||||||
Gtk::VBox vbox;
|
|
||||||
|
|
||||||
bbox.set_border_width (6);
|
|
||||||
bbox.set_spacing (12);
|
|
||||||
bbox.pack_start (ok_button, true, false);
|
|
||||||
bbox.pack_start (cancel_button, true, false);
|
|
||||||
|
|
||||||
vbox.set_border_width (6);
|
checker.get_vbox()->pack_start (label, false, false);
|
||||||
vbox.set_spacing (12);
|
checker.add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||||
vbox.pack_start (label, false, false);
|
checker.add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||||
vbox.pack_start (bbox, false, false);
|
|
||||||
|
|
||||||
checker.add (vbox);
|
|
||||||
checker.set_name (_("CleanupDialog"));
|
checker.set_name (_("CleanupDialog"));
|
||||||
checker.set_title (_("ardour cleanup"));
|
|
||||||
checker.set_wmclass (_("ardour_cleanup"), "Ardour");
|
checker.set_wmclass (_("ardour_cleanup"), "Ardour");
|
||||||
checker.set_position (Gtk::WIN_POS_MOUSE);
|
checker.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
|
|
||||||
ok_button.signal_clicked().connect (bind (mem_fun (checker, &ArdourDialog::stop), 1));
|
switch (checker.run()) {
|
||||||
cancel_button.signal_clicked().connect (bind (mem_fun (checker, &ArdourDialog::stop), 0));
|
case RESPONSE_ACCEPT:
|
||||||
|
|
||||||
checker.run ();
|
|
||||||
|
|
||||||
switch (checker.run_status()) {
|
|
||||||
case 0:
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
|
|
@ -3056,10 +3005,16 @@ ARDOUR_UI::add_route ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
add_route_dialog->run ();
|
ResponseType r = (ResponseType) add_route_dialog->run ();
|
||||||
|
|
||||||
|
add_route_dialog->hide();
|
||||||
|
|
||||||
if (add_route_dialog->run_status()) {
|
switch (r) {
|
||||||
|
case RESPONSE_ACCEPT:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
return;
|
return;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((count = add_route_dialog->count()) <= 0) {
|
if ((count = add_route_dialog->count()) <= 0) {
|
||||||
|
|
@ -3214,8 +3169,6 @@ int
|
||||||
ARDOUR_UI::pending_state_dialog ()
|
ARDOUR_UI::pending_state_dialog ()
|
||||||
{
|
{
|
||||||
ArdourDialog dialog ("pending state dialog");
|
ArdourDialog dialog ("pending state dialog");
|
||||||
Button use_button (_("Recover from crash"));
|
|
||||||
Button cancel_button (_("Ignore crash data"));
|
|
||||||
Label message (_("\
|
Label message (_("\
|
||||||
This session appears to have been in\n\
|
This session appears to have been in\n\
|
||||||
middle of recording when ardour or\n\
|
middle of recording when ardour or\n\
|
||||||
|
|
@ -3224,28 +3177,18 @@ the computer was shutdown.\n\
|
||||||
Ardour can recover any captured audio for\n\
|
Ardour can recover any captured audio for\n\
|
||||||
you, or it can ignore it. Please decide\n\
|
you, or it can ignore it. Please decide\n\
|
||||||
what you would like to do.\n"));
|
what you would like to do.\n"));
|
||||||
HBox hpacker;
|
|
||||||
VBox vpacker;
|
|
||||||
|
|
||||||
vpacker.set_border_width (12);
|
dialog.get_vbox()->pack_start (message);
|
||||||
vpacker.set_spacing (7);
|
dialog.add_button (_("Recover from crash"), RESPONSE_ACCEPT);
|
||||||
vpacker.pack_start (message);
|
dialog.add_button (_("Ignore crash data"), RESPONSE_REJECT);
|
||||||
vpacker.pack_start (hpacker);
|
|
||||||
|
|
||||||
hpacker.set_spacing (7);
|
|
||||||
hpacker.pack_start (use_button);
|
|
||||||
hpacker.pack_start (cancel_button);
|
|
||||||
|
|
||||||
use_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 0));
|
|
||||||
cancel_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 1));
|
|
||||||
|
|
||||||
dialog.add (vpacker);
|
|
||||||
dialog.set_position (WIN_POS_CENTER);
|
dialog.set_position (WIN_POS_CENTER);
|
||||||
dialog.show_all ();
|
dialog.show_all ();
|
||||||
|
|
||||||
dialog.run ();
|
switch (dialog.run ()) {
|
||||||
|
case RESPONSE_ACCEPT:
|
||||||
if (dialog.run_status () != 0) {
|
break;
|
||||||
|
default:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -248,13 +248,8 @@ ARDOUR_UI::toggle_connection_editor ()
|
||||||
//GTK2FIX
|
//GTK2FIX
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
if (connection_editor->within_hiding()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (connection_editor_check->get_active()){
|
if (connection_editor_check->get_active()){
|
||||||
connection_editor->show_all();
|
connection_editor->present();
|
||||||
} else {
|
} else {
|
||||||
connection_editor->hide_all();
|
connection_editor->hide_all();
|
||||||
}
|
}
|
||||||
|
|
@ -291,9 +286,7 @@ ARDOUR_UI::toggle_options_window ()
|
||||||
option_editor = new OptionEditor (*this, *editor, *mixer);
|
option_editor = new OptionEditor (*this, *editor, *mixer);
|
||||||
option_editor->signal_unmap().connect(mem_fun(*this, &ARDOUR_UI::option_hiding));
|
option_editor->signal_unmap().connect(mem_fun(*this, &ARDOUR_UI::option_hiding));
|
||||||
option_editor->set_session (session);
|
option_editor->set_session (session);
|
||||||
} else if (option_editor->within_hiding()) {
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (option_editor->is_visible()) {
|
if (option_editor->is_visible()) {
|
||||||
option_editor->hide ();
|
option_editor->hide ();
|
||||||
|
|
@ -335,10 +328,6 @@ ARDOUR_UI::toggle_location_window ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (location_ui->within_hiding()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (location_ui->is_visible()) {
|
if (location_ui->is_visible()) {
|
||||||
location_ui->hide();
|
location_ui->hide();
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -370,10 +359,6 @@ ARDOUR_UI::toggle_route_params_window ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (route_params->within_hiding()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (route_params->is_visible ()) {
|
if (route_params->is_visible ()) {
|
||||||
route_params->hide ();
|
route_params->hide ();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ using namespace Gtk;
|
||||||
using namespace sigc;
|
using namespace sigc;
|
||||||
|
|
||||||
ConnectionEditor::ConnectionEditor ()
|
ConnectionEditor::ConnectionEditor ()
|
||||||
: ArdourDialog ("connection editor"),
|
: ArdourDialog (_("ardour: connections")),
|
||||||
input_frame (_("Input Connections")),
|
input_frame (_("Input Connections")),
|
||||||
output_frame (_("Output Connections")),
|
output_frame (_("Output Connections")),
|
||||||
new_input_connection_button (_("New Input")),
|
new_input_connection_button (_("New Input")),
|
||||||
|
|
@ -193,11 +193,7 @@ ConnectionEditor::ConnectionEditor ()
|
||||||
main_vbox.pack_start (main_hbox);
|
main_vbox.pack_start (main_hbox);
|
||||||
main_vbox.pack_start (button_frame, false, false);
|
main_vbox.pack_start (button_frame, false, false);
|
||||||
|
|
||||||
set_title (_("ardour: connections"));
|
get_vbox()->pack_start (main_vbox);
|
||||||
add (main_vbox);
|
|
||||||
|
|
||||||
// GTK2FIX
|
|
||||||
// signal_delete_event.connect (bind (ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
|
|
||||||
|
|
||||||
clear_button.signal_clicked().connect (mem_fun(*this, &ConnectionEditor::clear));
|
clear_button.signal_clicked().connect (mem_fun(*this, &ConnectionEditor::clear));
|
||||||
add_port_button.signal_clicked().connect (mem_fun(*this, &ConnectionEditor::add_port));
|
add_port_button.signal_clicked().connect (mem_fun(*this, &ConnectionEditor::add_port));
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ CrossfadeEditor::Half::Half ()
|
||||||
}
|
}
|
||||||
|
|
||||||
CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double mxy)
|
CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double mxy)
|
||||||
: ArdourDialog (_("crossfade editor")),
|
: ArdourDialog (_("ardour: x-fade edit")),
|
||||||
cancel_button (_("Cancel")),
|
cancel_button (_("Cancel")),
|
||||||
ok_button (_("OK")),
|
ok_button (_("OK")),
|
||||||
xfade (xf),
|
xfade (xf),
|
||||||
|
|
@ -98,10 +98,8 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
|
||||||
{
|
{
|
||||||
set_wmclass ("ardour_automationedit", "Ardour");
|
set_wmclass ("ardour_automationedit", "Ardour");
|
||||||
set_name ("CrossfadeEditWindow");
|
set_name ("CrossfadeEditWindow");
|
||||||
set_title (_("ardour: x-fade edit"));
|
|
||||||
set_position (Gtk::WIN_POS_MOUSE);
|
set_position (Gtk::WIN_POS_MOUSE);
|
||||||
|
|
||||||
add (vpacker);
|
|
||||||
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::POINTER_MOTION_MASK);
|
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::POINTER_MOTION_MASK);
|
||||||
|
|
||||||
RadioButtonGroup sel_but_group = select_in_button.get_group();
|
RadioButtonGroup sel_but_group = select_in_button.get_group();
|
||||||
|
|
@ -281,10 +279,8 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
|
||||||
curve_button_box.pack_start (*vpacker2, false, false, 12);
|
curve_button_box.pack_start (*vpacker2, false, false, 12);
|
||||||
curve_button_box.pack_start (fade_in_table, false, false, 12);
|
curve_button_box.pack_start (fade_in_table, false, false, 12);
|
||||||
|
|
||||||
vpacker.set_border_width (12);
|
get_vbox()->pack_start (*canvas_frame, true, true);
|
||||||
vpacker.set_spacing (5);
|
get_vbox()->pack_start (curve_button_box, false, false);
|
||||||
vpacker.pack_start (*canvas_frame, true, true);
|
|
||||||
vpacker.pack_start (curve_button_box, false, false);
|
|
||||||
|
|
||||||
/* button to allow hackers to check the actual curve values */
|
/* button to allow hackers to check the actual curve values */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3759,49 +3759,27 @@ Editor::duplicate_dialog (bool dup_region)
|
||||||
ArdourDialog win ("duplicate dialog");
|
ArdourDialog win ("duplicate dialog");
|
||||||
Entry entry;
|
Entry entry;
|
||||||
Label label (_("Duplicate how many times?"));
|
Label label (_("Duplicate how many times?"));
|
||||||
HBox hbox;
|
|
||||||
HBox button_box;
|
|
||||||
Button ok_button (_("OK"));
|
|
||||||
Button cancel_button (_("Cancel"));
|
|
||||||
VBox vbox;
|
|
||||||
|
|
||||||
button_box.set_spacing (7);
|
win.get_vbox()->pack_start (label);
|
||||||
set_size_request_to_display_given_text (ok_button, _("Cancel"), 20, 15); // this is cancel on purpose
|
win.add_action_widget (entry, RESPONSE_ACCEPT);
|
||||||
set_size_request_to_display_given_text (cancel_button, _("Cancel"), 20, 15);
|
win.add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||||
button_box.pack_end (ok_button, false, false);
|
win.add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||||
button_box.pack_end (cancel_button, false, false);
|
|
||||||
|
|
||||||
hbox.set_spacing (5);
|
|
||||||
hbox.pack_start (label);
|
|
||||||
hbox.pack_start (entry, true, true);
|
|
||||||
|
|
||||||
vbox.set_spacing (5);
|
|
||||||
vbox.set_border_width (5);
|
|
||||||
vbox.pack_start (hbox);
|
|
||||||
vbox.pack_start (button_box);
|
|
||||||
|
|
||||||
win.add (vbox);
|
|
||||||
win.set_position (Gtk::WIN_POS_MOUSE);
|
win.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
win.show_all ();
|
|
||||||
|
|
||||||
ok_button.signal_clicked().connect (bind (mem_fun (win, &ArdourDialog::stop), 0));
|
|
||||||
entry.signal_activate().connect (bind (mem_fun (win, &ArdourDialog::stop), 0));
|
|
||||||
cancel_button.signal_clicked().connect (bind (mem_fun (win, &ArdourDialog::stop), 1));
|
|
||||||
|
|
||||||
entry.set_text ("1");
|
entry.set_text ("1");
|
||||||
set_size_request_to_display_given_text (entry, X_("12345678"), 20, 15);
|
set_size_request_to_display_given_text (entry, X_("12345678"), 20, 15);
|
||||||
entry.select_region (0, entry.get_text_length());
|
entry.select_region (0, entry.get_text_length());
|
||||||
|
|
||||||
win.set_position (Gtk::WIN_POS_MOUSE);
|
|
||||||
// GTK2FIX
|
|
||||||
// win.realize ();
|
|
||||||
// win.get_window()->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
|
|
||||||
|
|
||||||
entry.grab_focus ();
|
entry.grab_focus ();
|
||||||
|
|
||||||
win.run ();
|
// GTK2FIX
|
||||||
|
// win.get_window()->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
|
||||||
|
|
||||||
if (win.run_status() != 0) {
|
|
||||||
|
switch (win.run ()) {
|
||||||
|
case RESPONSE_ACCEPT:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4286,17 +4264,18 @@ Editor::edit_xfade (Crossfade* xfade)
|
||||||
|
|
||||||
ensure_float (cew);
|
ensure_float (cew);
|
||||||
|
|
||||||
cew.ok_button.signal_clicked().connect (bind (mem_fun (cew, &ArdourDialog::stop), 1));
|
|
||||||
cew.cancel_button.signal_clicked().connect (bind (mem_fun (cew, &ArdourDialog::stop), 0));
|
|
||||||
// GTK2FIX
|
// GTK2FIX
|
||||||
// cew.signal_delete_event().connect (mem_fun (cew, &ArdourDialog::wm_doi_event_stop));
|
// cew.signal_delete_event().connect (mem_fun (cew, &ArdourDialog::wm_doi_event_stop));
|
||||||
|
|
||||||
cew.run ();
|
switch (cew.run ()) {
|
||||||
|
case RESPONSE_ACCEPT:
|
||||||
if (cew.run_status() == 1) {
|
break;
|
||||||
cew.apply ();
|
default:
|
||||||
xfade->StateChanged (Change (~0));
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cew.apply ();
|
||||||
|
xfade->StateChanged (Change (~0));
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaylistSelector&
|
PlaylistSelector&
|
||||||
|
|
@ -4331,56 +4310,30 @@ Editor::playlist_deletion_dialog (Playlist* pl)
|
||||||
"If left alone, no audio files used by it will be cleaned.\n"
|
"If left alone, no audio files used by it will be cleaned.\n"
|
||||||
"If deleted, audio files used by it alone by will cleaned."),
|
"If deleted, audio files used by it alone by will cleaned."),
|
||||||
pl->name()));
|
pl->name()));
|
||||||
HBox button_box;
|
|
||||||
Button del_button (_("Delete playlist"));
|
|
||||||
Button keep_button (_("Keep playlist"));
|
|
||||||
Button abort_button (_("Cancel cleanup"));
|
|
||||||
VBox vbox;
|
|
||||||
|
|
||||||
button_box.set_spacing (7);
|
|
||||||
button_box.set_homogeneous (true);
|
|
||||||
button_box.pack_end (del_button, false, false);
|
|
||||||
button_box.pack_end (keep_button, false, false);
|
|
||||||
button_box.pack_end (abort_button, false, false);
|
|
||||||
|
|
||||||
vbox.set_spacing (5);
|
|
||||||
vbox.set_border_width (5);
|
|
||||||
vbox.pack_start (label);
|
|
||||||
vbox.pack_start (button_box);
|
|
||||||
|
|
||||||
dialog.add (vbox);
|
|
||||||
dialog.set_position (Gtk::WIN_POS_CENTER);
|
dialog.set_position (Gtk::WIN_POS_CENTER);
|
||||||
dialog.show_all ();
|
dialog.get_vbox()->pack_start (label);
|
||||||
|
|
||||||
del_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 0));
|
dialog.add_button (_("Delete playlist"), RESPONSE_ACCEPT);
|
||||||
keep_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 1));
|
dialog.add_button (_("Keep playlist"), RESPONSE_CANCEL);
|
||||||
abort_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 2));
|
dialog.add_button (_("Cancel"), RESPONSE_CANCEL);
|
||||||
|
|
||||||
// GTK2FIX
|
switch (dialog.run ()) {
|
||||||
// dialog.realize ();
|
case RESPONSE_ACCEPT:
|
||||||
// dialog.get_window()->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
|
|
||||||
|
|
||||||
dialog.run ();
|
|
||||||
|
|
||||||
switch (dialog.run_status()) {
|
|
||||||
case 1:
|
|
||||||
/* keep the playlist */
|
|
||||||
return 1;
|
|
||||||
break;
|
|
||||||
case 0:
|
|
||||||
/* delete the playlist */
|
/* delete the playlist */
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
case 2:
|
|
||||||
/* abort cleanup */
|
case RESPONSE_REJECT:
|
||||||
return -1;
|
/* keep the playlist */
|
||||||
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* keep the playlist */
|
return -1;
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
|
|
@ -1818,23 +1818,21 @@ Editor::audition_playlist_region_standalone (AudioRegion& region)
|
||||||
void
|
void
|
||||||
Editor::build_interthread_progress_window ()
|
Editor::build_interthread_progress_window ()
|
||||||
{
|
{
|
||||||
interthread_progress_window = new ArdourDialog (X_("interthread progress"));
|
interthread_progress_window = new ArdourDialog (X_("interthread progress"), true);
|
||||||
|
|
||||||
interthread_progress_bar.set_orientation (Gtk::PROGRESS_LEFT_TO_RIGHT);
|
interthread_progress_bar.set_orientation (Gtk::PROGRESS_LEFT_TO_RIGHT);
|
||||||
|
|
||||||
interthread_progress_vbox.set_border_width (10);
|
interthread_progress_window->get_vbox()->pack_start (interthread_progress_label, false, false);
|
||||||
interthread_progress_vbox.set_spacing (5);
|
interthread_progress_window->get_vbox()->pack_start (interthread_progress_bar,false, false);
|
||||||
interthread_progress_vbox.pack_start (interthread_progress_label, false, false);
|
|
||||||
interthread_progress_vbox.pack_start (interthread_progress_bar,false, false);
|
// GTK2FIX: this button needs a modifiable label
|
||||||
interthread_progress_vbox.pack_start (interthread_cancel_button,false, false);
|
|
||||||
|
Button* b = interthread_progress_window->add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||||
|
b->signal_clicked().connect (mem_fun(*this, &Editor::interthread_cancel_clicked));
|
||||||
|
|
||||||
interthread_cancel_button.add (interthread_cancel_label);
|
interthread_cancel_button.add (interthread_cancel_label);
|
||||||
|
|
||||||
interthread_cancel_button.signal_clicked().connect (mem_fun(*this, &Editor::interthread_cancel_clicked));
|
|
||||||
|
|
||||||
interthread_progress_window->set_modal (true);
|
|
||||||
interthread_progress_window->set_default_size (200, 100);
|
interthread_progress_window->set_default_size (200, 100);
|
||||||
interthread_progress_window->add (interthread_progress_vbox);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -243,14 +243,9 @@ Editor::mouse_add_new_tempo_event (jack_nframes_t frame)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TempoMap& map(session->tempo_map());
|
TempoMap& map(session->tempo_map());
|
||||||
TempoDialog tempo_dialog (map, frame, _("add"));
|
TempoDialog tempo_dialog (map, frame, _("add"));
|
||||||
|
|
||||||
tempo_dialog.bpm_entry.signal_activate().connect (bind (mem_fun (tempo_dialog, &ArdourDialog::stop), 0));
|
|
||||||
tempo_dialog.ok_button.signal_clicked().connect (bind (mem_fun (tempo_dialog, &ArdourDialog::stop), 0));
|
|
||||||
tempo_dialog.cancel_button.signal_clicked().connect (bind (mem_fun (tempo_dialog, &ArdourDialog::stop), -1));
|
|
||||||
|
|
||||||
tempo_dialog.set_position (Gtk::WIN_POS_MOUSE);
|
tempo_dialog.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
// GTK2FIX
|
// GTK2FIX
|
||||||
// tempo_dialog.realize ();
|
// tempo_dialog.realize ();
|
||||||
|
|
@ -258,26 +253,28 @@ Editor::mouse_add_new_tempo_event (jack_nframes_t frame)
|
||||||
|
|
||||||
ensure_float (tempo_dialog);
|
ensure_float (tempo_dialog);
|
||||||
|
|
||||||
tempo_dialog.run();
|
switch (tempo_dialog.run()) {
|
||||||
|
case RESPONSE_ACCEPT:
|
||||||
if (tempo_dialog.run_status() == 0) {
|
break;
|
||||||
|
default:
|
||||||
double bpm = 0;
|
return;
|
||||||
BBT_Time requested;
|
|
||||||
|
|
||||||
bpm = tempo_dialog.get_bpm ();
|
|
||||||
bpm = max (0.01, bpm);
|
|
||||||
|
|
||||||
tempo_dialog.get_bbt_time (requested);
|
|
||||||
|
|
||||||
begin_reversible_command (_("add tempo mark"));
|
|
||||||
session->add_undo (map.get_memento());
|
|
||||||
map.add_tempo (Tempo (bpm), requested);
|
|
||||||
session->add_redo_no_execute (map.get_memento());
|
|
||||||
commit_reversible_command ();
|
|
||||||
|
|
||||||
map.dump (cerr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double bpm = 0;
|
||||||
|
BBT_Time requested;
|
||||||
|
|
||||||
|
bpm = tempo_dialog.get_bpm ();
|
||||||
|
bpm = max (0.01, bpm);
|
||||||
|
|
||||||
|
tempo_dialog.get_bbt_time (requested);
|
||||||
|
|
||||||
|
begin_reversible_command (_("add tempo mark"));
|
||||||
|
session->add_undo (map.get_memento());
|
||||||
|
map.add_tempo (Tempo (bpm), requested);
|
||||||
|
session->add_redo_no_execute (map.get_memento());
|
||||||
|
commit_reversible_command ();
|
||||||
|
|
||||||
|
map.dump (cerr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -291,9 +288,6 @@ Editor::mouse_add_new_meter_event (jack_nframes_t frame)
|
||||||
TempoMap& map(session->tempo_map());
|
TempoMap& map(session->tempo_map());
|
||||||
MeterDialog meter_dialog (map, frame, _("add"));
|
MeterDialog meter_dialog (map, frame, _("add"));
|
||||||
|
|
||||||
meter_dialog.ok_button.signal_clicked().connect (bind (mem_fun (meter_dialog, &ArdourDialog::stop), 0));
|
|
||||||
meter_dialog.cancel_button.signal_clicked().connect (bind (mem_fun (meter_dialog, &ArdourDialog::stop), -1));
|
|
||||||
|
|
||||||
meter_dialog.set_position (Gtk::WIN_POS_MOUSE);
|
meter_dialog.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
// GTK2FIX
|
// GTK2FIX
|
||||||
// meter_dialog.realize ();
|
// meter_dialog.realize ();
|
||||||
|
|
@ -301,26 +295,28 @@ Editor::mouse_add_new_meter_event (jack_nframes_t frame)
|
||||||
|
|
||||||
ensure_float (meter_dialog);
|
ensure_float (meter_dialog);
|
||||||
|
|
||||||
meter_dialog.run ();
|
switch (meter_dialog.run ()) {
|
||||||
|
case RESPONSE_ACCEPT:
|
||||||
if (meter_dialog.run_status() == 0) {
|
break;
|
||||||
|
default:
|
||||||
double bpb = meter_dialog.get_bpb ();
|
return;
|
||||||
bpb = max (1.0, bpb); // XXX is this a reasonable limit?
|
|
||||||
|
|
||||||
double note_type = meter_dialog.get_note_type ();
|
|
||||||
BBT_Time requested;
|
|
||||||
|
|
||||||
meter_dialog.get_bbt_time (requested);
|
|
||||||
|
|
||||||
begin_reversible_command (_("add meter mark"));
|
|
||||||
session->add_undo (map.get_memento());
|
|
||||||
map.add_meter (Meter (bpb, note_type), requested);
|
|
||||||
session->add_redo_no_execute (map.get_memento());
|
|
||||||
commit_reversible_command ();
|
|
||||||
|
|
||||||
map.dump (cerr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double bpb = meter_dialog.get_bpb ();
|
||||||
|
bpb = max (1.0, bpb); // XXX is this a reasonable limit?
|
||||||
|
|
||||||
|
double note_type = meter_dialog.get_note_type ();
|
||||||
|
BBT_Time requested;
|
||||||
|
|
||||||
|
meter_dialog.get_bbt_time (requested);
|
||||||
|
|
||||||
|
begin_reversible_command (_("add meter mark"));
|
||||||
|
session->add_undo (map.get_memento());
|
||||||
|
map.add_meter (Meter (bpb, note_type), requested);
|
||||||
|
session->add_redo_no_execute (map.get_memento());
|
||||||
|
commit_reversible_command ();
|
||||||
|
|
||||||
|
map.dump (cerr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -349,9 +345,6 @@ Editor::edit_meter_section (MeterSection* section)
|
||||||
{
|
{
|
||||||
MeterDialog meter_dialog (*section, _("done"));
|
MeterDialog meter_dialog (*section, _("done"));
|
||||||
|
|
||||||
meter_dialog.ok_button.signal_clicked().connect (bind (mem_fun (meter_dialog, &ArdourDialog::stop), 0));
|
|
||||||
meter_dialog.cancel_button.signal_clicked().connect (bind (mem_fun (meter_dialog, &ArdourDialog::stop), -1));
|
|
||||||
|
|
||||||
meter_dialog.set_position (Gtk::WIN_POS_MOUSE);
|
meter_dialog.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
// GTK2FIX
|
// GTK2FIX
|
||||||
// meter_dialog.realize ();
|
// meter_dialog.realize ();
|
||||||
|
|
@ -359,21 +352,23 @@ Editor::edit_meter_section (MeterSection* section)
|
||||||
|
|
||||||
ensure_float (meter_dialog);
|
ensure_float (meter_dialog);
|
||||||
|
|
||||||
meter_dialog.run ();
|
switch (meter_dialog.run()) {
|
||||||
|
case RESPONSE_ACCEPT:
|
||||||
if (meter_dialog.run_status() == 0) {
|
break;
|
||||||
|
default:
|
||||||
double bpb = meter_dialog.get_bpb ();
|
return;
|
||||||
bpb = max (1.0, bpb); // XXX is this a reasonable limit?
|
|
||||||
|
|
||||||
double note_type = meter_dialog.get_note_type ();
|
|
||||||
|
|
||||||
begin_reversible_command (_("replace tempo mark"));
|
|
||||||
session->add_undo (session->tempo_map().get_memento());
|
|
||||||
session->tempo_map().replace_meter (*section, Meter (bpb, note_type));
|
|
||||||
session->add_redo_no_execute (session->tempo_map().get_memento());
|
|
||||||
commit_reversible_command ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double bpb = meter_dialog.get_bpb ();
|
||||||
|
bpb = max (1.0, bpb); // XXX is this a reasonable limit?
|
||||||
|
|
||||||
|
double note_type = meter_dialog.get_note_type ();
|
||||||
|
|
||||||
|
begin_reversible_command (_("replace tempo mark"));
|
||||||
|
session->add_undo (session->tempo_map().get_memento());
|
||||||
|
session->tempo_map().replace_meter (*section, Meter (bpb, note_type));
|
||||||
|
session->add_redo_no_execute (session->tempo_map().get_memento());
|
||||||
|
commit_reversible_command ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -381,10 +376,6 @@ Editor::edit_tempo_section (TempoSection* section)
|
||||||
{
|
{
|
||||||
TempoDialog tempo_dialog (*section, _("done"));
|
TempoDialog tempo_dialog (*section, _("done"));
|
||||||
|
|
||||||
tempo_dialog.bpm_entry.signal_activate().connect (bind (mem_fun (tempo_dialog, &ArdourDialog::stop), 0));
|
|
||||||
tempo_dialog.ok_button.signal_clicked().connect (bind (mem_fun (tempo_dialog, &ArdourDialog::stop), 0));
|
|
||||||
tempo_dialog.cancel_button.signal_clicked().connect (bind (mem_fun (tempo_dialog, &ArdourDialog::stop), -1));
|
|
||||||
|
|
||||||
tempo_dialog.set_position (Gtk::WIN_POS_MOUSE);
|
tempo_dialog.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
// GTK2FIX
|
// GTK2FIX
|
||||||
// tempo_dialog.realize ();
|
// tempo_dialog.realize ();
|
||||||
|
|
@ -392,22 +383,24 @@ Editor::edit_tempo_section (TempoSection* section)
|
||||||
|
|
||||||
ensure_float (tempo_dialog);
|
ensure_float (tempo_dialog);
|
||||||
|
|
||||||
tempo_dialog.run ();
|
switch (tempo_dialog.run ()) {
|
||||||
|
case RESPONSE_ACCEPT:
|
||||||
if (tempo_dialog.run_status() == 0) {
|
break;
|
||||||
|
default:
|
||||||
double bpm = tempo_dialog.get_bpm ();
|
return;
|
||||||
BBT_Time when;
|
|
||||||
tempo_dialog.get_bbt_time(when);
|
|
||||||
bpm = max (0.01, bpm);
|
|
||||||
|
|
||||||
begin_reversible_command (_("replace tempo mark"));
|
|
||||||
session->add_undo (session->tempo_map().get_memento());
|
|
||||||
session->tempo_map().replace_tempo (*section, Tempo (bpm));
|
|
||||||
session->tempo_map().move_tempo (*section, when);
|
|
||||||
session->add_redo_no_execute (session->tempo_map().get_memento());
|
|
||||||
commit_reversible_command ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double bpm = tempo_dialog.get_bpm ();
|
||||||
|
BBT_Time when;
|
||||||
|
tempo_dialog.get_bbt_time(when);
|
||||||
|
bpm = max (0.01, bpm);
|
||||||
|
|
||||||
|
begin_reversible_command (_("replace tempo mark"));
|
||||||
|
session->add_undo (session->tempo_map().get_memento());
|
||||||
|
session->tempo_map().replace_tempo (*section, Tempo (bpm));
|
||||||
|
session->tempo_map().move_tempo (*section, when);
|
||||||
|
session->add_redo_no_execute (session->tempo_map().get_memento());
|
||||||
|
commit_reversible_command ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,6 @@ Editor::TimeStretchDialog::TimeStretchDialog (Editor& e)
|
||||||
set_title (_("ardour: timestretch"));
|
set_title (_("ardour: timestretch"));
|
||||||
set_name (N_("TimeStretchDialog"));
|
set_name (N_("TimeStretchDialog"));
|
||||||
|
|
||||||
set_hide_on_stop (false);
|
|
||||||
|
|
||||||
add (packer);
|
add (packer);
|
||||||
|
|
||||||
packer.set_spacing (5);
|
packer.set_spacing (5);
|
||||||
|
|
@ -85,7 +83,8 @@ Editor::TimeStretchDialog::TimeStretchDialog (Editor& e)
|
||||||
antialias_button.set_name (N_("TimeStretchButton"));
|
antialias_button.set_name (N_("TimeStretchButton"));
|
||||||
progress_bar.set_name (N_("TimeStretchProgress"));
|
progress_bar.set_name (N_("TimeStretchProgress"));
|
||||||
|
|
||||||
action_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), 1));
|
// GTK2FIX
|
||||||
|
// action_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
|
|
@ -120,16 +119,16 @@ Editor::run_timestretch (AudioRegionSelection& regions, float fraction)
|
||||||
}
|
}
|
||||||
|
|
||||||
current_timestretch->progress_bar.set_fraction (0.0f);
|
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
|
// GTK2FIX
|
||||||
|
// current_timestretch->first_cancel = current_timestretch->cancel_button.signal_clicked().connect (bind (mem_fun (*current_timestretch, &ArdourDialog::stop), -1));
|
||||||
// current_timestretch->first_delete = current_timestretch->signal_delete_event().connect (mem_fun (*current_timestretch, &ArdourDialog::wm_close_event));
|
// current_timestretch->first_delete = current_timestretch->signal_delete_event().connect (mem_fun (*current_timestretch, &ArdourDialog::wm_close_event));
|
||||||
|
|
||||||
current_timestretch->run ();
|
switch (current_timestretch->run ()) {
|
||||||
|
case RESPONSE_ACCEPT:
|
||||||
if (current_timestretch->run_status() != 1) {
|
break;
|
||||||
// GTK2FIX
|
default:
|
||||||
// current_timestretch->close ();
|
current_timestretch->hide ();
|
||||||
return 1; /* no error, but we did nothing */
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
current_timestretch->status = 0;
|
current_timestretch->status = 0;
|
||||||
|
|
@ -165,8 +164,7 @@ Editor::run_timestretch (AudioRegionSelection& regions, float fraction)
|
||||||
|
|
||||||
c.disconnect ();
|
c.disconnect ();
|
||||||
|
|
||||||
// GTK2FIX
|
current_timestretch->hide ();
|
||||||
// current_timestretch->close ();
|
|
||||||
return current_timestretch->status;
|
return current_timestretch->status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -429,9 +429,6 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, IO& io)
|
||||||
{
|
{
|
||||||
ArdourDialog dialog ("wierd plugin dialog");
|
ArdourDialog dialog ("wierd plugin dialog");
|
||||||
Label label;
|
Label label;
|
||||||
Button button (_("OK"));
|
|
||||||
VBox vpacker;
|
|
||||||
HBox button_box;
|
|
||||||
|
|
||||||
/* i hate this kind of code */
|
/* i hate this kind of code */
|
||||||
|
|
||||||
|
|
@ -479,16 +476,9 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, IO& io)
|
||||||
streams));
|
streams));
|
||||||
}
|
}
|
||||||
|
|
||||||
button_box.pack_start (button, false, true);
|
dialog.get_vbox()->pack_start (label);
|
||||||
|
dialog.add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||||
|
|
||||||
vpacker.set_spacing (12);
|
|
||||||
vpacker.set_border_width (12);
|
|
||||||
vpacker.pack_start (label);
|
|
||||||
vpacker.pack_start (button_box);
|
|
||||||
|
|
||||||
button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 0));
|
|
||||||
|
|
||||||
dialog.add (vpacker);
|
|
||||||
dialog.set_name (X_("PluginIODialog"));
|
dialog.set_name (X_("PluginIODialog"));
|
||||||
dialog.set_position (Gtk::WIN_POS_MOUSE);
|
dialog.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
dialog.set_modal (true);
|
dialog.set_modal (true);
|
||||||
|
|
@ -705,25 +695,16 @@ RedirectBox::compute_redirect_sort_keys ()
|
||||||
|
|
||||||
ArdourDialog dialog ("wierd plugin dialog");
|
ArdourDialog dialog ("wierd plugin dialog");
|
||||||
Label label;
|
Label label;
|
||||||
Button button (_("OK"));
|
|
||||||
VBox vpacker;
|
|
||||||
HBox button_box;
|
|
||||||
|
|
||||||
label.set_text (_("\
|
label.set_text (_("\
|
||||||
You cannot reorder this set of redirects\n\
|
You cannot reorder this set of redirects\n\
|
||||||
in that way because the inputs and\n\
|
in that way because the inputs and\n\
|
||||||
outputs do not work correctly."));
|
outputs do not work correctly."));
|
||||||
|
|
||||||
button_box.pack_start (button, false, true);
|
|
||||||
|
|
||||||
vpacker.set_spacing (12);
|
dialog.get_vbox()->pack_start (label);
|
||||||
vpacker.set_border_width (12);
|
dialog.add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||||
vpacker.pack_start (label);
|
|
||||||
vpacker.pack_start (button_box);
|
|
||||||
|
|
||||||
button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 0));
|
|
||||||
|
|
||||||
dialog.add (vpacker);
|
|
||||||
dialog.set_name (X_("PluginIODialog"));
|
dialog.set_name (X_("PluginIODialog"));
|
||||||
dialog.set_position (Gtk::WIN_POS_MOUSE);
|
dialog.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
dialog.set_modal (true);
|
dialog.set_modal (true);
|
||||||
|
|
@ -825,47 +806,32 @@ RedirectBox::idle_delete_redirect (Redirect *redirect)
|
||||||
void
|
void
|
||||||
RedirectBox::rename_redirect (Redirect* redirect)
|
RedirectBox::rename_redirect (Redirect* redirect)
|
||||||
{
|
{
|
||||||
ArdourDialog dialog ("rename redirect dialog");
|
ArdourDialog dialog (_("ardour: rename redirect"), true);
|
||||||
Entry entry;
|
Entry entry;
|
||||||
VBox vbox;
|
VBox vbox;
|
||||||
HBox hbox;
|
HBox hbox;
|
||||||
Button ok_button (_("OK"));
|
Button ok_button (_("OK"));
|
||||||
Button cancel_button (_("Cancel"));
|
Button cancel_button (_("Cancel"));
|
||||||
|
|
||||||
dialog.set_title (_("ardour: rename redirect"));
|
|
||||||
dialog.set_name ("RedirectRenameWindow");
|
dialog.set_name ("RedirectRenameWindow");
|
||||||
dialog.set_size_request (300, -1);
|
dialog.set_size_request (300, -1);
|
||||||
dialog.set_position (Gtk::WIN_POS_MOUSE);
|
dialog.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
dialog.set_modal (true);
|
|
||||||
|
|
||||||
vbox.set_border_width (12);
|
dialog.add_action_widget (entry, RESPONSE_ACCEPT);
|
||||||
vbox.set_spacing (12);
|
dialog.add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||||
vbox.pack_start (entry, false, false);
|
dialog.add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||||
vbox.pack_start (hbox, false, false);
|
|
||||||
hbox.pack_start (ok_button);
|
|
||||||
hbox.pack_start (cancel_button);
|
|
||||||
|
|
||||||
dialog.add (vbox);
|
|
||||||
|
|
||||||
entry.set_name ("RedirectNameDisplay");
|
entry.set_name ("RedirectNameDisplay");
|
||||||
entry.set_text (redirect->name());
|
entry.set_text (redirect->name());
|
||||||
entry.select_region (0, -1);
|
entry.select_region (0, -1);
|
||||||
entry.grab_focus ();
|
entry.grab_focus ();
|
||||||
|
|
||||||
ok_button.set_name ("EditorGTKButton");
|
switch (dialog.run ()) {
|
||||||
cancel_button.set_name ("EditorGTKButton");
|
case RESPONSE_ACCEPT:
|
||||||
|
|
||||||
entry.signal_activate().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 1));
|
|
||||||
cancel_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), -1));
|
|
||||||
ok_button.signal_clicked().connect (bind (mem_fun (dialog, &ArdourDialog::stop), 1));
|
|
||||||
|
|
||||||
/* recurse */
|
|
||||||
|
|
||||||
dialog.set_keyboard_input (true);
|
|
||||||
dialog.run ();
|
|
||||||
|
|
||||||
if (dialog.run_status() == 1) {
|
|
||||||
redirect->set_name (entry.get_text(), this);
|
redirect->set_name (entry.get_text(), this);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
#include <cstdio> // for snprintf, grrr
|
#include <cstdio> // for snprintf, grrr
|
||||||
|
|
||||||
|
#include <gtkmm/stock.h>
|
||||||
#include <gtkmm2ext/utils.h>
|
#include <gtkmm2ext/utils.h>
|
||||||
|
|
||||||
#include "tempo_dialog.h"
|
#include "tempo_dialog.h"
|
||||||
|
|
@ -106,8 +107,6 @@ TempoDialog::init (const BBT_Time& when, double bpm, bool movable)
|
||||||
|
|
||||||
add (vpacker);
|
add (vpacker);
|
||||||
set_name ("MetricDialog");
|
set_name ("MetricDialog");
|
||||||
|
|
||||||
set_keyboard_input(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
|
|
@ -222,15 +221,6 @@ MeterDialog::init (const BBT_Time& when, double bpb, double note_type, bool mova
|
||||||
note_frame.add (vspacer1);
|
note_frame.add (vspacer1);
|
||||||
bpb_frame.add (vspacer2);
|
bpb_frame.add (vspacer2);
|
||||||
|
|
||||||
button_box.set_border_width (10);
|
|
||||||
button_box.set_spacing (5);
|
|
||||||
button_box.set_homogeneous (true);
|
|
||||||
button_box.pack_start (ok_button);
|
|
||||||
button_box.pack_start (cancel_button);
|
|
||||||
|
|
||||||
vpacker.set_border_width (10);
|
|
||||||
vpacker.set_spacing (5);
|
|
||||||
|
|
||||||
if (movable) {
|
if (movable) {
|
||||||
snprintf (buf, sizeof (buf), "%" PRIu32, when.bars);
|
snprintf (buf, sizeof (buf), "%" PRIu32, when.bars);
|
||||||
when_bar_entry.set_text (buf);
|
when_bar_entry.set_text (buf);
|
||||||
|
|
@ -263,20 +253,18 @@ MeterDialog::init (const BBT_Time& when, double bpb, double note_type, bool mova
|
||||||
vpacker.pack_start (when_frame, false, false);
|
vpacker.pack_start (when_frame, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
vpacker.pack_start (bpb_frame, false, false);
|
get_vbox()->pack_start (bpb_frame, false, false);
|
||||||
vpacker.pack_start (note_frame, false, false);
|
get_vbox()->pack_start (note_frame, false, false);
|
||||||
vpacker.pack_start (button_box, false, false);
|
|
||||||
|
|
||||||
bpb_frame.set_name ("MetricDialogFrame");
|
bpb_frame.set_name ("MetricDialogFrame");
|
||||||
note_frame.set_name ("MetricDialogFrame");
|
note_frame.set_name ("MetricDialogFrame");
|
||||||
bpb_entry.set_name ("MetricEntry");
|
bpb_entry.set_name ("MetricEntry");
|
||||||
ok_button.set_name ("MetricButton");
|
|
||||||
cancel_button.set_name ("MetricButton");
|
|
||||||
|
|
||||||
add (vpacker);
|
add_action_widget (bpb_entry, RESPONSE_ACCEPT);
|
||||||
|
add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||||
|
add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||||
|
|
||||||
set_name ("MetricDialog");
|
set_name ("MetricDialog");
|
||||||
|
|
||||||
set_keyboard_input(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue