mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 20:26:30 +01:00
Give titles to Gtkmm2ext::Choice prompts, and do some minor cleanups to prompt text.
git-svn-id: svn://localhost/ardour2/branches/3.0@6394 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
be8a2e20dc
commit
defa1fad94
7 changed files with 39 additions and 15 deletions
|
|
@ -596,9 +596,11 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
|
||||||
choices.push_back (_("Embed all without questions"));
|
choices.push_back (_("Embed all without questions"));
|
||||||
|
|
||||||
Gtkmm2ext::Choice rate_choice (
|
Gtkmm2ext::Choice rate_choice (
|
||||||
|
_("Sample rate"),
|
||||||
string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"),
|
string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"),
|
||||||
short_path (path, 40)),
|
short_path (path, 40)),
|
||||||
choices, false);
|
choices, false
|
||||||
|
);
|
||||||
|
|
||||||
int resx = rate_choice.run ();
|
int resx = rate_choice.run ();
|
||||||
|
|
||||||
|
|
@ -623,8 +625,10 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
|
||||||
choices.push_back (_("Embed it anyway"));
|
choices.push_back (_("Embed it anyway"));
|
||||||
|
|
||||||
Gtkmm2ext::Choice rate_choice (
|
Gtkmm2ext::Choice rate_choice (
|
||||||
|
_("Sample rate"),
|
||||||
string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"), path),
|
string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"), path),
|
||||||
choices, false);
|
choices, false
|
||||||
|
);
|
||||||
|
|
||||||
int resx = rate_choice.run ();
|
int resx = rate_choice.run ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4501,7 +4501,7 @@ Editor::remove_last_capture ()
|
||||||
choices.push_back (_("No, do nothing."));
|
choices.push_back (_("No, do nothing."));
|
||||||
choices.push_back (_("Yes, destroy it."));
|
choices.push_back (_("Yes, destroy it."));
|
||||||
|
|
||||||
Gtkmm2ext::Choice prompter (prompt, choices);
|
Gtkmm2ext::Choice prompter (_("Destroy last capture"), prompt, choices);
|
||||||
|
|
||||||
if (prompter.run () == 1) {
|
if (prompter.run () == 1) {
|
||||||
_session->remove_last_capture ();
|
_session->remove_last_capture ();
|
||||||
|
|
@ -5787,8 +5787,13 @@ Editor::define_one_bar (nframes64_t start, nframes64_t end)
|
||||||
options.push_back (_("Cancel"));
|
options.push_back (_("Cancel"));
|
||||||
options.push_back (_("Add new marker"));
|
options.push_back (_("Add new marker"));
|
||||||
options.push_back (_("Set global tempo"));
|
options.push_back (_("Set global tempo"));
|
||||||
Choice c (_("Do you want to set the global tempo or add new tempo marker?"),
|
|
||||||
options);
|
Choice c (
|
||||||
|
_("Define one bar"),
|
||||||
|
_("Do you want to set the global tempo or add a new tempo marker?"),
|
||||||
|
options
|
||||||
|
);
|
||||||
|
|
||||||
c.set_default_response (2);
|
c.set_default_response (2);
|
||||||
|
|
||||||
switch (c.run()) {
|
switch (c.run()) {
|
||||||
|
|
@ -6200,7 +6205,14 @@ Editor::remove_tracks ()
|
||||||
choices.push_back (_("Yes, remove it."));
|
choices.push_back (_("Yes, remove it."));
|
||||||
}
|
}
|
||||||
|
|
||||||
Choice prompter (prompt, choices);
|
string title;
|
||||||
|
if (ntracks) {
|
||||||
|
title = string_compose (_("Remove %1"), trackstr);
|
||||||
|
} else {
|
||||||
|
title = string_compose (_("Remove %1"), busstr);
|
||||||
|
}
|
||||||
|
|
||||||
|
Choice prompter (title, prompt, choices);
|
||||||
|
|
||||||
if (prompter.run () != 1) {
|
if (prompter.run () != 1) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -154,12 +154,12 @@ EditorSnapshots::remove (Glib::ustring name)
|
||||||
{
|
{
|
||||||
vector<string> choices;
|
vector<string> choices;
|
||||||
|
|
||||||
std::string prompt = string_compose (_("Do you really want to remove snapshot \"%1\" ?\n(cannot be undone)"), name);
|
std::string prompt = string_compose (_("Do you really want to remove snapshot \"%1\" ?\n(which cannot be undone)"), name);
|
||||||
|
|
||||||
choices.push_back (_("No, do nothing."));
|
choices.push_back (_("No, do nothing."));
|
||||||
choices.push_back (_("Yes, remove it."));
|
choices.push_back (_("Yes, remove it."));
|
||||||
|
|
||||||
Gtkmm2ext::Choice prompter (prompt, choices);
|
Gtkmm2ext::Choice prompter (_("Remove snapshot"), prompt, choices);
|
||||||
|
|
||||||
if (prompter.run () == 1) {
|
if (prompter.run () == 1) {
|
||||||
_session->remove_state (name);
|
_session->remove_state (name);
|
||||||
|
|
|
||||||
|
|
@ -1373,7 +1373,7 @@ ProcessorBox::clear_processors ()
|
||||||
choices.push_back (_("Cancel"));
|
choices.push_back (_("Cancel"));
|
||||||
choices.push_back (_("Yes, remove them all"));
|
choices.push_back (_("Yes, remove them all"));
|
||||||
|
|
||||||
Gtkmm2ext::Choice prompter (prompt, choices);
|
Gtkmm2ext::Choice prompter (_("Remove processors"), prompt, choices);
|
||||||
|
|
||||||
if (prompter.run () == 1) {
|
if (prompter.run () == 1) {
|
||||||
_route->clear_processors (PreFader);
|
_route->clear_processors (PreFader);
|
||||||
|
|
@ -1398,7 +1398,7 @@ ProcessorBox::clear_processors (Placement p)
|
||||||
choices.push_back (_("Cancel"));
|
choices.push_back (_("Cancel"));
|
||||||
choices.push_back (_("Yes, remove them all"));
|
choices.push_back (_("Yes, remove them all"));
|
||||||
|
|
||||||
Gtkmm2ext::Choice prompter (prompt, choices);
|
Gtkmm2ext::Choice prompter (_("Remove processors"), prompt, choices);
|
||||||
|
|
||||||
if (prompter.run () == 1) {
|
if (prompter.run () == 1) {
|
||||||
_route->clear_processors (p);
|
_route->clear_processors (p);
|
||||||
|
|
|
||||||
|
|
@ -1097,15 +1097,22 @@ RouteUI::remove_this_route ()
|
||||||
string prompt;
|
string prompt;
|
||||||
|
|
||||||
if (is_track()) {
|
if (is_track()) {
|
||||||
prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n(cannot be undone)"), _route->name());
|
prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n(this cannot be undone)"), _route->name());
|
||||||
} else {
|
} else {
|
||||||
prompt = string_compose (_("Do you really want to remove bus \"%1\" ?\n(cannot be undone)"), _route->name());
|
prompt = string_compose (_("Do you really want to remove bus \"%1\" ?\n(this cannot be undone)"), _route->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
choices.push_back (_("No, do nothing."));
|
choices.push_back (_("No, do nothing."));
|
||||||
choices.push_back (_("Yes, remove it."));
|
choices.push_back (_("Yes, remove it."));
|
||||||
|
|
||||||
Choice prompter (prompt, choices);
|
string title;
|
||||||
|
if (is_track()) {
|
||||||
|
title = _("Remove track");
|
||||||
|
} else {
|
||||||
|
title = _("Remove bus");
|
||||||
|
}
|
||||||
|
|
||||||
|
Choice prompter (title, prompt, choices);
|
||||||
|
|
||||||
if (prompter.run () == 1) {
|
if (prompter.run () == 1) {
|
||||||
Glib::signal_idle().connect (sigc::bind (sigc::ptr_fun (&RouteUI::idle_remove_this_route), this));
|
Glib::signal_idle().connect (sigc::bind (sigc::ptr_fun (&RouteUI::idle_remove_this_route), this));
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,8 @@ using namespace Gtkmm2ext;
|
||||||
using namespace sigc;
|
using namespace sigc;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
|
|
||||||
Choice::Choice (string prompt, vector<string> choices, bool center)
|
Choice::Choice (string title, string prompt, vector<string> choices, bool center)
|
||||||
|
: Dialog (title)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
vector<string>::iterator i;
|
vector<string>::iterator i;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ namespace Gtkmm2ext {
|
||||||
class Choice : public Gtk::Dialog
|
class Choice : public Gtk::Dialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Choice (std::string prompt, std::vector<std::string> choices, bool center = true);
|
Choice (std::string title, std::string prompt, std::vector<std::string> choices, bool center = true);
|
||||||
virtual ~Choice ();
|
virtual ~Choice ();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue