Skip to content

Commit c91077f

Browse files
committed
day-progress@chmodmasx v1.0.2: Added tooltip - Compatible with Cinnamon6.6
1 parent dae68f9 commit c91077f

File tree

6 files changed

+50
-23
lines changed

6 files changed

+50
-23
lines changed

day-progress@chmodmasx/files/day-progress@chmodmasx/applet.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ DayProgressApplet.prototype = {
182182
let settingsItem = new PopupMenu.PopupMenuItem(_("Settings"));
183183
settingsItem.connect('activate', Lang.bind(this, function() {
184184
imports.gi.Gio.Subprocess.new(
185-
['cinnamon-settings', 'applets', this.metadata.uuid, this.instanceId.toString()],
185+
['xlet-settings', 'applet', this.metadata.uuid, '-i', this.instanceId.toString()],
186186
imports.gi.Gio.SubprocessFlags.NONE
187187
);
188188
}));
@@ -278,8 +278,24 @@ DayProgressApplet.prototype = {
278278
let remainingHours = Math.floor(percentRemainingOfPeriod * duration * 24);
279279
let remainingMinutes = Math.floor((percentRemainingOfPeriod * duration * 24 * 60) % 60);
280280

281+
if (elapsedHours < 10) elapsedHours = "0" + elapsedHours; else elapsedHours = "" + elapsedHours;
282+
if (elapsedMinutes < 10) elapsedMinutes = "0" + elapsedMinutes; else elapsedMinutes = "" + elapsedMinutes;
283+
if (remainingHours < 10) remainingHours = "0" + remainingHours; else remainingHours = "" + remainingHours;
284+
if (remainingMinutes < 10) remainingMinutes = "0" + remainingMinutes; else remainingMinutes = "" + remainingMinutes;
285+
281286
this.elapsedValue.text = elapsedHours + 'h ' + elapsedMinutes + 'm | ' + Math.round(percentElapsedOfPeriod * 100) + '%';
282287
this.remainingValue.text = remainingHours + 'h ' + remainingMinutes + 'm | ' + Math.round(percentRemainingOfPeriod * 100) + '%';
288+
289+
this._updateTooltip();
290+
},
291+
292+
_updateTooltip: function() {
293+
let elapsedLength = _("Elapsed").length;
294+
let remainingLength = _("Remaining").length;
295+
let maxLength = Math.max(elapsedLength, remainingLength);
296+
this.set_applet_tooltip(" ".repeat(maxLength - elapsedLength) + _("Elapsed") + " " + this.elapsedValue.text +
297+
"\n" + " ".repeat(maxLength - remainingLength) + _("Remaining") + " " + this.remainingValue.text);
298+
this._applet_tooltip._tooltip.set_style("font-family: monospace; text-align: end; ");
283299
},
284300

285301
mapNumber: function(number, inMin, inMax, outMin, outMax) {

day-progress@chmodmasx/files/day-progress@chmodmasx/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"uuid": "day-progress@chmodmasx",
33
"name": "Day Progress",
44
"description": "Displays a customizable progress pie chart in the panel to help you track your day time.",
5-
"version": "1.0.1",
5+
"version": "1.0.2",
66
"cinnamon-version": ["6.4"],
77
"author": "chmodmasx"
88
}

day-progress@chmodmasx/files/day-progress@chmodmasx/po/day-progress@chmodmasx.pot

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#, fuzzy
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: day-progress@chmodmasx 1.0.1\n"
8+
"Project-Id-Version: day-progress@chmodmasx 1.0.2\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
1010
"issues\n"
11-
"POT-Creation-Date: 2025-12-30 23:07-0300\n"
11+
"POT-Creation-Date: 2026-01-01 12:24+0100\n"
1212
"PO-Revision-Date: \n"
1313
"Last-Translator: \n"
1414
"Language-Team: \n"
@@ -17,11 +17,11 @@ msgstr ""
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919

20-
#. applet.js:158
20+
#. applet.js:158 applet.js:293 applet.js:296
2121
msgid "Elapsed"
2222
msgstr ""
2323

24-
#. applet.js:169
24+
#. applet.js:169 applet.js:294 applet.js:297
2525
msgid "Remaining"
2626
msgstr ""
2727

@@ -105,5 +105,7 @@ msgid "End hour"
105105
msgstr ""
106106

107107
#. settings-schema.json->end-hour->tooltip
108-
msgid "Hour at which the indicator ends"
108+
msgid ""
109+
"Hour at which the indicator ends.\n"
110+
"For a duration of 24 hours, enter the same Start and End hours."
109111
msgstr ""

day-progress@chmodmasx/files/day-progress@chmodmasx/po/es.po

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: day-progress@chmodmasx 1.0\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
1010
"issues\n"
11-
"POT-Creation-Date: 2025-12-30 23:07-0300\n"
11+
"POT-Creation-Date: 2026-01-01 12:24+0100\n"
1212
"PO-Revision-Date: 2025-12-31 10:10-0300\n"
1313
"Last-Translator: chmodmasx\n"
1414
"Language-Team: Spanish\n"
@@ -19,11 +19,11 @@ msgstr ""
1919
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
2020
"X-Generator: Poedit 3.8\n"
2121

22-
#. applet.js:158
22+
#. applet.js:158 applet.js:293 applet.js:296
2323
msgid "Elapsed"
2424
msgstr "Transcurrido"
2525

26-
#. applet.js:169
26+
#. applet.js:169 applet.js:294 applet.js:297
2727
msgid "Remaining"
2828
msgstr "Restante"
2929

@@ -109,5 +109,7 @@ msgid "End hour"
109109
msgstr "Hora de finalización"
110110

111111
#. settings-schema.json->end-hour->tooltip
112-
msgid "Hour at which the indicator ends"
113-
msgstr "Hora en la que finaliza el indicador"
112+
msgid ""
113+
"Hour at which the indicator ends.\n"
114+
"For a duration of 24 hours, enter the same Start and End hours."
115+
msgstr ""

day-progress@chmodmasx/files/day-progress@chmodmasx/po/fr.po

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,24 @@
55
msgid ""
66
msgstr ""
77
"Project-Id-Version: day-progress@chmodmasx 1.0.1\n"
8-
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/issues\n"
9-
"POT-Creation-Date: 2025-12-30 23:07-0300\n"
10-
"PO-Revision-Date: 2025-12-31 12:55+0100\n"
11-
"Last-Translator: FabRCT\n"
8+
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
9+
"issues\n"
10+
"POT-Creation-Date: 2026-01-01 12:24+0100\n"
11+
"PO-Revision-Date: 2026-01-01 12:27+0100\n"
12+
"Last-Translator: claudiux\n"
1213
"Language-Team: none\n"
1314
"Language: fr\n"
1415
"MIME-Version: 1.0\n"
1516
"Content-Type: text/plain; charset=UTF-8\n"
1617
"Content-Transfer-Encoding: 8bit\n"
1718
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
19+
"X-Generator: Poedit 3.4.2\n"
1820

19-
#. applet.js:158
21+
#. applet.js:158 applet.js:293 applet.js:296
2022
msgid "Elapsed"
2123
msgstr "Écoulé"
2224

23-
#. applet.js:169
25+
#. applet.js:169 applet.js:294 applet.js:297
2426
msgid "Remaining"
2527
msgstr "Restant"
2628

@@ -37,7 +39,8 @@ msgid ""
3739
"Displays a customizable progress pie chart in the panel to help you track "
3840
"your day time."
3941
msgstr ""
40-
"Affiche dans le panneau un graphique circulaire de progression personnalisable\n"
42+
"Affiche dans le panneau un graphique circulaire de progression "
43+
"personnalisable\n"
4144
"pour vous aider à suivre votre temps de travail quotidien."
4245

4346
#. settings-schema.json->show-elapsed->description
@@ -106,5 +109,9 @@ msgid "End hour"
106109
msgstr "Heure de fin"
107110

108111
#. settings-schema.json->end-hour->tooltip
109-
msgid "Hour at which the indicator ends"
110-
msgstr "Heure à laquelle l'indicateur prend fin"
112+
msgid ""
113+
"Hour at which the indicator ends.\n"
114+
"For a duration of 24 hours, enter the same Start and End hours."
115+
msgstr ""
116+
"Heure à laquelle l'indicateur finit.\n"
117+
"Pour une durée de 24 heures, indiquer la même heure de Début et de Fin."

day-progress@chmodmasx/files/day-progress@chmodmasx/settings-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@
5353
},
5454
"end-hour": {
5555
"type": "spinbutton",
56-
"default": 23,
56+
"default": 0,
5757
"min": 0,
5858
"max": 23,
5959
"step": 1,
6060
"units": "hours",
6161
"description": "End hour",
62-
"tooltip": "Hour at which the indicator ends"
62+
"tooltip": "Hour at which the indicator ends.\nFor a duration of 24 hours, enter the same Start and End hours."
6363
}
6464
}

0 commit comments

Comments
 (0)