13
0

fix translation issue with verb substitution in quit/close dialog

git-svn-id: svn://localhost/ardour2/branches/3.0@9567 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-05-22 20:02:50 +00:00
parent 9c733915a0
commit 2761f899c5
3 changed files with 17 additions and 10 deletions

View File

@ -809,7 +809,11 @@ ARDOUR_UI::finish()
}
if (_session->dirty()) {
switch (ask_about_saving_session(_("quit"))) {
vector<string> actions;
actions.push_back (_("Don't quit"));
actions.push_back (_("Just quit"));
actions.push_back (_("Save and quit"));
switch (ask_about_saving_session(actions)) {
case -1:
return;
break;
@ -858,7 +862,7 @@ If you still wish to quit, please use the\n\n\
}
int
ARDOUR_UI::ask_about_saving_session (const string & what)
ARDOUR_UI::ask_about_saving_session (const vector<string>& actions)
{
ArdourDialog window (_("Unsaved Session"));
Gtk::HBox dhbox; // the hbox for the image and text
@ -867,12 +871,11 @@ ARDOUR_UI::ask_about_saving_session (const string & what)
string msg;
msg = string_compose(_("Don't %1"), what);
window.add_button (msg, RESPONSE_REJECT);
msg = string_compose(_("Just %1"), what);
window.add_button (msg, RESPONSE_APPLY);
msg = string_compose(_("Save and %1"), what);
window.add_button (msg, RESPONSE_ACCEPT);
assert (actions.size() >= 3);
window.add_button (actions[0], RESPONSE_REJECT);
window.add_button (actions[1], RESPONSE_APPLY);
window.add_button (actions[2], RESPONSE_ACCEPT);
window.set_default_response (RESPONSE_ACCEPT);

View File

@ -303,7 +303,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void startup ();
void shutdown ();
int ask_about_saving_session (const std::string & why);
int ask_about_saving_session (const std::vector<std::string>& actions);
/* periodic safety backup, to be precise */
gint autosave_session();

View File

@ -185,7 +185,11 @@ int
ARDOUR_UI::unload_session (bool hide_stuff)
{
if (_session && _session->dirty()) {
switch (ask_about_saving_session (_("close"))) {
std::vector<std::string> actions;
actions.push_back (_("Don't close"));
actions.push_back (_("Just close"));
actions.push_back (_("Save and close"));
switch (ask_about_saving_session (actions)) {
case -1:
// cancel
return 1;