From 7061200fa247eee10341f5c9b185d477f85d2c44 Mon Sep 17 00:00:00 2001 From: Kacper Wysocki Date: Thu, 26 Apr 2012 20:32:25 +0200 Subject: [PATCH] increase debuggability of error strings --- gpg.c | 12 ++++++------ interface_cli.c | 2 +- interface_gui.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gpg.c b/gpg.c index b78497d..6bc04cf 100644 --- a/gpg.c +++ b/gpg.c @@ -239,7 +239,7 @@ int gpgCheckSignResult(SHOWERROR_FN showerror_cb, gpgme_sign_result_t result, } if (error) - { showerror_cb(_("GpgMe error"), buffer); } + { showerror_cb(_("GpgMe sign error"), buffer); } memFree(__FILE__, __LINE__, buffer, STDBUFFERLENGTH); @@ -352,7 +352,7 @@ int gpgCheckVerifyResult(SHOWERROR_FN showerror_cb, } if (error) - { showerror_cb(_("GpgMe error"), buffer); } + { showerror_cb(_("GpgMe verify error"), buffer); } memFree(__FILE__, __LINE__, buffer, STDBUFFERLENGTH); @@ -567,7 +567,7 @@ int gpgDecrypt(char* buffer, int size, char** newbuffer, int* newsize, error = gpgme_new(&context); if (error) { - (showerror_cb)(_("GpgMe error"), gpgme_strerror(error)); + (showerror_cb)(_("GpgMe context error"), gpgme_strerror(error)); return 1; } else @@ -643,7 +643,7 @@ int gpgDecrypt(char* buffer, int size, char** newbuffer, int* newsize, if (error) { if (showerror) - { (showerror_cb)(_("GpgMe error"), gpgme_strerror(error)); } + { (showerror_cb)(_("GpgMe decrypt error"), gpgme_strerror(error)); } return 1; } else @@ -808,7 +808,7 @@ int gpgEncrypt(char* buffer, int size, char** newbuffer, int* newsize, if (error) { if (showerror) - { (showerror_cb)(_("GpgMe error"), gpgme_strerror(error)); } + { (showerror_cb)(_("GpgMe encrypt error"), gpgme_strerror(error)); } return 1; } else @@ -977,7 +977,7 @@ int gpgGetRecipients(gpgme_recipient_t recipients, tmpbuffer = memAlloc(__FILE__, __LINE__, STDBUFFERLENGTH); snprintf(tmpbuffer, STDBUFFERLENGTH, _("unknown recipient id %s"), recipient -> keyid); - (showerror_cb)(_("GpgMe error"), tmpbuffer); + (showerror_cb)(_("GpgMe recipient error"), tmpbuffer); memFree(__FILE__, __LINE__, tmpbuffer, STDBUFFERLENGTH); } diff --git a/interface_cli.c b/interface_cli.c index 097d26b..67c25a1 100644 --- a/interface_cli.c +++ b/interface_cli.c @@ -164,7 +164,7 @@ int cliInterface(void) if (!initUTF8Encoding(config -> encoding)) { fprintf(stderr, _("error: %s\n"), - _("failed to initialize the character encoding.")); + _("cli failed to initialize the character encoding.")); exit(1); } diff --git a/interface_gui.c b/interface_gui.c index c143ab1..cef5445 100644 --- a/interface_gui.c +++ b/interface_gui.c @@ -2026,7 +2026,7 @@ void interfaceLoop(void) nodenames = xmlInterfaceGetNames(); nodes = listCount(nodenames); - listwidget[id] = newCDKAlphalist(cdkscreen, CENTER, 0, + listwidget[id] = newCDKAlphalist(cdkscreen, RIGHT, 0, #ifdef CDK_VERSION_5 LINES - infobox -> boxHeight - 1, 0, #else @@ -2281,7 +2281,7 @@ void userInterface(void) if (!initUTF8Encoding(config -> encoding)) { destroyScreen(__LINE__, - _("failed to initialize the character encoding.")); + _("gui failed to initialize the character encoding.")); } if (xmlDataFileRead(runtime -> dbfile, &errormsg, guiDialogPassphrase,