summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-12-23 01:26:33 +0000
committerCarl Hetherington <carl@carlh.net>2009-12-23 01:26:33 +0000
commitdefa1fad942e9a33b8fe3f56b26427af069a1b73 (patch)
treeee04bf6eac6afd01ac0c036cd81a0ac1ae7892cf
parentbe8a2e20dcacfc980c8de0341165b0be67ce35fd (diff)
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
-rw-r--r--gtk2_ardour/editor_audio_import.cc8
-rw-r--r--gtk2_ardour/editor_ops.cc20
-rw-r--r--gtk2_ardour/editor_snapshots.cc4
-rw-r--r--gtk2_ardour/processor_box.cc4
-rw-r--r--gtk2_ardour/route_ui.cc13
-rw-r--r--libs/gtkmm2ext/choice.cc3
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/choice.h2
7 files changed, 39 insertions, 15 deletions
diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc
index 108dcde7d3..de275f8738 100644
--- a/gtk2_ardour/editor_audio_import.cc
+++ b/gtk2_ardour/editor_audio_import.cc
@@ -596,9 +596,11 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
choices.push_back (_("Embed all without questions"));
Gtkmm2ext::Choice rate_choice (
+ _("Sample rate"),
string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"),
short_path (path, 40)),
- choices, false);
+ choices, false
+ );
int resx = rate_choice.run ();
@@ -623,8 +625,10 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
choices.push_back (_("Embed it anyway"));
Gtkmm2ext::Choice rate_choice (
+ _("Sample rate"),
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 ();
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 2e5556352c..f4e40f4120 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -4501,7 +4501,7 @@ Editor::remove_last_capture ()
choices.push_back (_("No, do nothing."));
choices.push_back (_("Yes, destroy it."));
- Gtkmm2ext::Choice prompter (prompt, choices);
+ Gtkmm2ext::Choice prompter (_("Destroy last capture"), prompt, choices);
if (prompter.run () == 1) {
_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 (_("Add new marker"));
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);
switch (c.run()) {
@@ -6200,7 +6205,14 @@ Editor::remove_tracks ()
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) {
return;
diff --git a/gtk2_ardour/editor_snapshots.cc b/gtk2_ardour/editor_snapshots.cc
index 795ba425ea..e7bd89f604 100644
--- a/gtk2_ardour/editor_snapshots.cc
+++ b/gtk2_ardour/editor_snapshots.cc
@@ -154,12 +154,12 @@ EditorSnapshots::remove (Glib::ustring name)
{
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 (_("Yes, remove it."));
- Gtkmm2ext::Choice prompter (prompt, choices);
+ Gtkmm2ext::Choice prompter (_("Remove snapshot"), prompt, choices);
if (prompter.run () == 1) {
_session->remove_state (name);
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 96305ab19d..07d2a4e6d4 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -1373,7 +1373,7 @@ ProcessorBox::clear_processors ()
choices.push_back (_("Cancel"));
choices.push_back (_("Yes, remove them all"));
- Gtkmm2ext::Choice prompter (prompt, choices);
+ Gtkmm2ext::Choice prompter (_("Remove processors"), prompt, choices);
if (prompter.run () == 1) {
_route->clear_processors (PreFader);
@@ -1398,7 +1398,7 @@ ProcessorBox::clear_processors (Placement p)
choices.push_back (_("Cancel"));
choices.push_back (_("Yes, remove them all"));
- Gtkmm2ext::Choice prompter (prompt, choices);
+ Gtkmm2ext::Choice prompter (_("Remove processors"), prompt, choices);
if (prompter.run () == 1) {
_route->clear_processors (p);
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 6068385587..f78885deb4 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -1097,15 +1097,22 @@ RouteUI::remove_this_route ()
string prompt;
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 {
- 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 (_("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) {
Glib::signal_idle().connect (sigc::bind (sigc::ptr_fun (&RouteUI::idle_remove_this_route), this));
diff --git a/libs/gtkmm2ext/choice.cc b/libs/gtkmm2ext/choice.cc
index 7f5f869ada..363942eab7 100644
--- a/libs/gtkmm2ext/choice.cc
+++ b/libs/gtkmm2ext/choice.cc
@@ -26,7 +26,8 @@ using namespace Gtkmm2ext;
using namespace sigc;
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;
vector<string>::iterator i;
diff --git a/libs/gtkmm2ext/gtkmm2ext/choice.h b/libs/gtkmm2ext/gtkmm2ext/choice.h
index b6dcdc05c1..17e3b3192c 100644
--- a/libs/gtkmm2ext/gtkmm2ext/choice.h
+++ b/libs/gtkmm2ext/gtkmm2ext/choice.h
@@ -32,7 +32,7 @@ namespace Gtkmm2ext {
class Choice : public Gtk::Dialog
{
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 ();
protected: