From ee026723ed17d8b27bc6bf2a63dfb84f575ea517 Mon Sep 17 00:00:00 2001 From: Pranav Kant Date: Wed, 7 Jun 2017 09:19:52 +0530 Subject: [PATCH] Bin redundant code Change-Id: Id691052e343cea73f3dec512ee6f4d4960f9614b --- loleaflet/dist/errormessages.js | 3 +-- tools/KitClient.cpp | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/loleaflet/dist/errormessages.js b/loleaflet/dist/errormessages.js index dc9ed7f025..fa6a999790 100644 --- a/loleaflet/dist/errormessages.js +++ b/loleaflet/dist/errormessages.js @@ -13,6 +13,5 @@ exports.storage = { loadfailed: _('Failed to read document from storage. Please contact your storage server (%storageserver) administrator.'), savediskfull: _('Save failed due to no disk space left on storage server. Document will now be read-only. Please contact the server (%storageserver) administrator to continue editing.'), saveunauthorized: _('Document cannot be saved due to expired or invalid access token.'), - savefailed: _('Document cannot be saved. Check your permissions or contact the storage server administrator.'), - documentconflict: _('Document has been changed in storage outside WOPI.') + savefailed: _('Document cannot be saved. Check your permissions or contact the storage server administrator.') }; diff --git a/tools/KitClient.cpp b/tools/KitClient.cpp index 8aa38e736c..dfdb006c08 100644 --- a/tools/KitClient.cpp +++ b/tools/KitClient.cpp @@ -189,13 +189,10 @@ protected: pngStream.write(png.data(), png.size()); pngStream.close(); - if (std::getenv("DISPLAY") != nullptr) + if (std::system((std::string("display ") + pngFile.path()).c_str()) == -1) { - if (std::system((std::string("display ") + pngFile.path()).c_str()) == -1) - { - // Not worth it to display a warning, this is just a throwaway test program, and - // the developer running it surely notices if nothing shows up... - } + // Not worth it to display a warning, this is just a throwaway test program, and + // the developer running it surely notices if nothing shows up... } } else