From 77bf1b5197566e5fb996838b125df8295b82dded Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Thu, 21 Aug 2008 04:21:06 +0000 Subject: [PATCH] 2008-08-21 Chris Allegretta * text.c: Change error messages where we may possibly get into a bad state and urge the user to save when this happens. Originally by Benno Schulenberg git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4308 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ src/text.c | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe24400c..6bab4bef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-08-21 Chris Allegretta + * text.c: Change error messages where we may possibly get into a bad state and urge + the user to save when this happens. Originally by Benno Schulenberg + 2008-08-08 Magnus Granberg / Adam Conrad * files.c: (write_file): Add needed flags to open() calls when writing out files. Fixes Savannah bug #23827: Compilation fails with -D_FORTIFY_SOURCE=2 diff --git a/src/text.c b/src/text.c index f4892c35..783f64f9 100644 --- a/src/text.c +++ b/src/text.c @@ -386,7 +386,7 @@ void do_undo(void) for (; f->next != NULL && f->lineno != u->lineno; f = f->next) ; if (f->lineno != u->lineno) { - statusbar(_("Couldnt match current undo line")); + statusbar(_("Internal error: can't match line %d. Please save your work"), u->lineno); return; } #ifdef DEBUG @@ -484,7 +484,7 @@ void do_undo(void) f->data = data; break; default: - undidmsg = _("wtf?"); + undidmsg = _("Internal error: unknown type. Please save your work"); break; } @@ -509,7 +509,7 @@ void do_redo(void) return; } if (u->next != openfile->current_undo) { - statusbar(_("Can't find previous undo to re-do, argh")); + statusbar(_("Internal error: Redo setup failed. Please save your work")); return; } @@ -520,7 +520,7 @@ void do_redo(void) for (; f->next != NULL && f->lineno != u->lineno; f = f->next) ; if (f->lineno != u->lineno) { - statusbar(_("Couldnt match current undo line")); + statusbar(_("Internal error: can't match line %d. Please save your work"), u->lineno); return; } #ifdef DEBUG @@ -630,7 +630,7 @@ void do_redo(void) cutbottom = oldcutbottom; break; default: - undidmsg = _("wtf?"); + undidmsg = _("Internal error: unknown type. Please save your work"); break; } @@ -879,7 +879,7 @@ void add_undo(undo_type current_action) case UNCUT: break; case OTHER: - statusbar(_("OOPS. Tried to add unknown thing to undo struct, I'd save your work")); + statusbar(_("Internal error: unknown type. Please save your work.")); break; }