[gnome-sound-recorder] Add hours to the time label for recordings
- From: Meg Ford (Margaret) <megford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder] Add hours to the time label for recordings
- Date: Mon, 15 Dec 2014 14:05:45 +0000 (UTC)
commit cd45f668b9256fc1e1df0c4b09cfd900398ce735
Author: Meg Ford <megford gnome org>
Date: Mon Dec 15 07:58:21 2014 -0600
Add hours to the time label for recordings
closes https://bugzilla.gnome.org/show_bug.cgi?id=739625
src/mainWindow.js | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index c143659..6172e68 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -204,7 +204,14 @@ const MainView = new Lang.Class({
_formatTime: function(unformattedTime) {
this.unformattedTime = unformattedTime;
let seconds = Math.floor(this.unformattedTime);
- let hoursString = parseInt( seconds / Math.pow(_TIME_DIVISOR, 2));
+ let hours = parseInt( seconds / Math.pow(_TIME_DIVISOR, 2));
+ let hoursString = "00"
+
+ if (hours > 10)
+ hoursString = hours
+ else if (hours < 10 && hours > 0)
+
+ hoursString = "0" + hours
let minuteString = parseInt( seconds / _TIME_DIVISOR ) % _TIME_DIVISOR;
let secondString = seconds % _TIME_DIVISOR;
let timeString =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]