summaryrefslogtreecommitdiff
path: root/shared/util.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:09:45 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:09:45 +0200
commit88c8801298cbf6fec9cdce254c7b3cb9e066a421 (patch)
tree35a35acf48eb227bac30abc8f87ea9b1c3c57b68 /shared/util.cpp
parent3.12 (diff)
downloadFreeFileSync-88c8801298cbf6fec9cdce254c7b3cb9e066a421.tar.gz
FreeFileSync-88c8801298cbf6fec9cdce254c7b3cb9e066a421.tar.bz2
FreeFileSync-88c8801298cbf6fec9cdce254c7b3cb9e066a421.zip
3.13
Diffstat (limited to 'shared/util.cpp')
-rw-r--r--shared/util.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/shared/util.cpp b/shared/util.cpp
index 25c8c5e0..f115f8dc 100644
--- a/shared/util.cpp
+++ b/shared/util.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#include "util.h"
@@ -16,11 +16,22 @@
#include "system_func.h"
#include "check_exist.h"
#include "assert_static.h"
+#include "system_constants.h"
+
#ifdef FFS_WIN
#include <wx/msw/wrapwin.h> //includes "windows.h"
#endif
+wxString ffs3::extractJobName(const wxString& configFilename)
+{
+ using namespace common;
+
+ const wxString shortName = configFilename.AfterLast(FILE_NAME_SEPARATOR); //returns the whole string if seperator not found
+ const wxString jobName = shortName.BeforeLast(wxChar('.')); //returns empty string if seperator not found
+ return jobName.IsEmpty() ? shortName : jobName;
+}
+
wxString ffs3::formatFilesizeToShortString(const wxLongLong& filesize)
{
@@ -39,7 +50,7 @@ wxString ffs3::formatFilesizeToShortString(double filesize)
if (filesize < 0)
return _("Error");
- wxString output = _("%x Byte");
+ wxString output = _("%x Bytes");
if (filesize > 999)
{
bgstack15