Enzymatic Software
« Added elapsed time in the toolTip »

Welcome Guest. Please Login or Register.
Nov 24, 2009, 5:51am



Enzymatic Software has a new homepage!
http://www.enzysoft.com


Individual Extension Homepages:
http://downloadstatusbar.mozdev.org
http://menueditor.mozdev.org

Enzymatic Software :: Firefox Extensions :: Download Statusbar :: Added elapsed time in the toolTip
   [Search This Thread][Reply] [Send Topic To Friend] [Print]
 AuthorTopic: Added elapsed time in the toolTip (Read 19 times)
Stybi
Guest
 Added elapsed time in the toolTip
« Thread Started on Nov 6, 2009, 9:28pm »
[Quote]

Hello,

I added the elapsed time into the tooltip. If you like it, feel free to use it:

Index: chrome/content/downbaroverlay.js
===================================================================
RCS file: /cvs/downloadstatusbar/source/downbar/chrome/content/downbaroverlay.js,v
retrieving revision 1.40
diff -u -r1.40 downbaroverlay.js
--- chrome/content/downbaroverlay.js 17 Aug 2009 04:55:57 -0000 1.40
+++ chrome/content/downbaroverlay.js 7 Nov 2009 02:25:31 -0000
@@ -1419,10 +1419,21 @@
totalSize = totalSize + " " + db_strings.getString("KiloBytesAbbr");
}
}
+
+ try {
+ var startTime = elem.getAttribute("startTime")/1000;
+ var now = new Date();
+ seconds = (now.getTime()-startTime)/1000;
+ var progressTime = db_formatSeconds(seconds);
+ } catch(e) {
+ seconds = -1;
+ progressTime = db_strings.getString("unknown");
+ }

document.getElementById("db_progTipFileName").value = elem.getAttribute("name") + additionalText; // for some reason the last char is getting cut off by about 2px, adding a space after fixes it
document.getElementById("db_progTipStatus").value = " " + currSize + " of " + totalSize + " (at " + speed + " " + db_strings.getString("KBperSecond") + ") ";
document.getElementById("db_progTipTimeLeft").value = " " + remainTime + " "; // for some reason the first and last number is getting cut off by about 2px, this fixes it
+ document.getElementById("db_progTipTimeProg").value = " " + progressTime + " "; // for some reason the first and last number is getting cut off by about 2px, this fixes it
document.getElementById("db_progTipPercentText").value = " " + percent + " ";

elem.setAttribute("pTimeCode", window.setTimeout(function(){db_makeTooltip(dlElemID);}, 1000));
Index: chrome/content/downbaroverlay.xul
===================================================================
RCS file: /cvs/downloadstatusbar/source/downbar/chrome/content/downbaroverlay.xul,v
retrieving revision 1.17
diff -u -r1.17 downbaroverlay.xul
--- chrome/content/downbaroverlay.xul 12 Aug 2009 06:08:11 -0000 1.17
+++ chrome/content/downbaroverlay.xul 7 Nov 2009 02:12:13 -0000
@@ -200,7 +200,22 @@
<hbox align="center" pack="end">
<label value="&timeTip.label;" class="db_tootipText"/>
</hbox>
- <label id="db_progTipTimeLeft" value="" class="db_tootipText"/>
+ <grid flex="1">
+ <columns>
+ <column flex="1"/>
+ <column/>
+ <column/>
+ </columns>
+ <rows>
+ <row>
+ <label id="db_progTipTimeLeft" value="" class="db_tootipText"/>
+ <hbox align="center" pack="end">
+ <label value="&timeProgTip.label;" class="db_tootipText"/>
+ </hbox>
+ <label id="db_progTipTimeProg" value="" flex="1" class="db_tootipText"/>
+ </row>
+ </rows>
+ </grid>
</row>
<separator style="height:5px;"/>
<row>
Index: chrome/locale/en-US/downbartext.dtd
===================================================================
RCS file: /cvs/downloadstatusbar/source/downbar/chrome/locale/en-US/downbartext.dtd,v
retrieving revision 1.6
diff -u -r1.6 downbartext.dtd
--- chrome/locale/en-US/downbartext.dtd 4 Sep 2009 04:20:44 -0000 1.6
+++ chrome/locale/en-US/downbartext.dtd 7 Nov 2009 02:21:11 -0000
@@ -25,6 +25,7 @@
<!ENTITY toTip.label "To:">
<!ENTITY statusTip.label "Status:">
<!ENTITY timeTip.label "Time Left:">
+<!ENTITY timeProgTip.label "Time Elapsed:">
<!ENTITY percentTip.label "Percent Done:">
<!ENTITY sizeTip.label "File Size:">
<!ENTITY timeCompleteTip.label "Time to Complete:">
Index: translations/0.9.6/sk-SK/downbartext.dtd
===================================================================
RCS file: /cvs/downloadstatusbar/source/downbar/translations/0.9.6/sk-SK/downbartext.dtd,v
retrieving revision 1.1
diff -u -r1.1 downbartext.dtd
--- translations/0.9.6/sk-SK/downbartext.dtd 5 Jan 2009 05:15:58 -0000 1.1
+++ translations/0.9.6/sk-SK/downbartext.dtd 7 Nov 2009 01:49:16 -0000
@@ -20,9 +20,10 @@
<!ENTITY toTip.label "Kam:">
<!ENTITY statusTip.label "Stav:">
<!ENTITY timeTip.label "Zostávajúci čas:">
+<!ENTITY timeProgTip.label "Ubehlý čas:">
<!ENTITY percentTip.label "Hotovo percent:">
<!ENTITY sizeTip.label "Veľkosť súboru:">
-<!ENTITY timeCompleteTip.label "Zostávajúci čas:">
+<!ENTITY timeCompleteTip.label "Celkový čas:">
<!ENTITY avgSpeedTip.label "Priemerná rýchlosť:">
<!ENTITY numFinishedTip.label "Dokončené preberania:">
<!ENTITY sizeFinishedTip.label "Celková veľkosť prevzatých súborov:">

Link to Post - Back to Top  IP: Logged
   [Search This Thread][Reply] [Send Topic To Friend] [Print]

Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!