From fc420927ff9039c543cd533f1c0be039c008147f Mon Sep 17 00:00:00 2001 From: Guido Lerch Date: Thu, 24 Sep 2015 19:26:35 +0200 Subject: Uemis downloader: display message if no dives to download Display an error message if no new dives are there for download. [Dirk Hohndel: small adjustment to the message] Signed-off-by: Guido Lerch Signed-off-by: Dirk Hohndel --- uemis-downloader.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uemis-downloader.c b/uemis-downloader.c index 3b8ddf900..af0d6ced1 100644 --- a/uemis-downloader.c +++ b/uemis-downloader.c @@ -27,6 +27,8 @@ #define ERR_FS_ALMOST_FULL QT_TRANSLATE_NOOP("gettextFromC", "Uemis Zurich: the file system is almost full.\nDisconnect/reconnect the dive computer\nand click \'Retry\'") #define ERR_FS_FULL QT_TRANSLATE_NOOP("gettextFromC", "Uemis Zurich: the file system is full.\nDisconnect/reconnect the dive computer\nand click Retry") #define ERR_FS_SHORT_WRITE QT_TRANSLATE_NOOP("gettextFromC", "Short write to req.txt file.\nIs the Uemis Zurich plugged in correctly?") +#define ERR_NO_FILES QT_TRANSLATE_NOOP("gettextFromC", "No dives to download.") +#define BUFLEN 2048 #define BUFLEN 2048 #define NUM_PARAM_BUFS 10 @@ -1345,5 +1347,7 @@ bail: } free(deviceid); free(reqtxt_path); + if (!data->download_table->nr) + result = translate("gettextFromC", ERR_NO_FILES); return result; } -- cgit v1.2.3-70-g09d2