summaryrefslogtreecommitdiff
path: root/ui/util.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:02:17 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:02:17 +0200
commitb9203ee84953006547f4afd58f405874c87bf0dc (patch)
tree9e41f1533f120e9268e86658c52458630ffd718a /ui/util.cpp
parent3.0 (diff)
downloadFreeFileSync-b9203ee84953006547f4afd58f405874c87bf0dc.tar.gz
FreeFileSync-b9203ee84953006547f4afd58f405874c87bf0dc.tar.bz2
FreeFileSync-b9203ee84953006547f4afd58f405874c87bf0dc.zip
3.1
Diffstat (limited to 'ui/util.cpp')
-rw-r--r--ui/util.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/util.cpp b/ui/util.cpp
index 9abdf6e8..853bd91b 100644
--- a/ui/util.cpp
+++ b/ui/util.cpp
@@ -85,6 +85,16 @@ wxString FreeFileSync::formatFilesizeToShortString(const double filesize)
}
+wxString FreeFileSync::fromatPercentage(const wxLongLong& dividend, const wxLongLong& divisor)
+{
+ const double ratio = dividend.ToDouble() * 100 / divisor.ToDouble();
+ wxString output = _("%x Percent");
+ output.Replace(wxT("%x"), wxString::Format(wxT("%3.2f"), ratio), false);
+ return output;
+}
+
+
+
wxString FreeFileSync::includeNumberSeparator(const wxString& number)
{
wxString output(number);
bgstack15