Skip to content

Commit

Permalink
Add feature to start pomodoro automatically on startup or not
Browse files Browse the repository at this point in the history
  • Loading branch information
gfreeau committed Apr 22, 2024
1 parent 4b48b37 commit 7f5836c
Show file tree
Hide file tree
Showing 20 changed files with 644 additions and 546 deletions.
8 changes: 8 additions & 0 deletions pomodoro@gregfreeman.org/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class PomodoroApplet extends Applet.TextIconApplet {
this._opt_shortBreakTimeMinutes = null;
this._opt_longBreakTimeMinutes = null;
this._opt_pomodoriNumber = null;
this._opt_startAutomaticallyOnLoad = null;
this._opt_showDialogMessages = null;
this._opt_autoContinueAfterPomodoro = null;
this._opt_autoContinueAfterShortBreak = null;
Expand Down Expand Up @@ -116,6 +117,12 @@ class PomodoroApplet extends Applet.TextIconApplet {

// Initial setup of the hotkey
this._updateHotkey();

// start timer automatically
if (this._opt_startAutomaticallyOnLoad) {
this._appletMenu.toggleTimerState(true);
this._timerQueue.start();
}
}

_bindSettings() {
Expand Down Expand Up @@ -176,6 +183,7 @@ class PomodoroApplet extends Applet.TextIconApplet {
);

// Binding simple properties that don't require logic beyond setting the value
this._settingsProvider.bindProperty(Settings.BindingDirection.IN, "start_automatically_on_load", "_opt_startAutomaticallyOnLoad", emptyCallback);
this._settingsProvider.bindProperty(Settings.BindingDirection.IN, "show_dialog_messages", "_opt_showDialogMessages", emptyCallback);
this._settingsProvider.bindProperty(Settings.BindingDirection.IN, "auto_start_after_pomodoro_ends", "_opt_autoContinueAfterPomodoro", emptyCallback);
this._settingsProvider.bindProperty(Settings.BindingDirection.IN, "auto_start_after_short_break_ends", "_opt_autoContinueAfterShortBreak", emptyCallback);
Expand Down
2 changes: 1 addition & 1 deletion pomodoro@gregfreeman.org/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"uuid": "pomodoro@gregfreeman.org",
"name": "Pomodoro Timer",
"description": "Great tool for boosted productivity!",
"version": "1.0.0"
"version": "1.0.1"
}
69 changes: 37 additions & 32 deletions pomodoro@gregfreeman.org/po/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
"issues\n"
"POT-Creation-Date: 2024-04-22 13:13+1000\n"
"POT-Creation-Date: 2024-04-22 16:51+1000\n"
"PO-Revision-Date: 2021-02-16 11:26+0100\n"
"Last-Translator: carlos <c.carrizosa@gmx.com>\n"
"Language-Team: \n"
Expand All @@ -18,145 +18,145 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.3\n"

#: applet.js:265
#: applet.js:273
#, fuzzy
msgid "Short break running"
msgstr "Duració del descans curt: "

#: applet.js:268
#: applet.js:276
#, fuzzy
msgid "Long break running"
msgstr "Duració del descans llarg: "

#: applet.js:271
#: applet.js:279
#, javascript-format
msgid "Pomodori %d, set %d running"
msgstr ""

#: applet.js:276
#: applet.js:284
msgid "Waiting to start"
msgstr ""

# notifications
#: applet.js:329
#: applet.js:337
msgid "Pomodoro started"
msgstr "Inici del pomodoro"

#: applet.js:394
#: applet.js:402
msgid "Let's go to work!"
msgstr ""

#: applet.js:412
#: applet.js:420
msgid "Take a short break"
msgstr "Pren un descans curt"

#: applet.js:432
#: applet.js:440
msgid "Take a long break"
msgstr "Pren un descans llarg"

#: applet.js:465
#: applet.js:473
msgid "Pomodoro ended"
msgstr "Fi del pomodoro"

#: applet.js:561
#: applet.js:569
msgid "http://en.wikipedia.org/wiki/Pomodoro_Technique"
msgstr ""

# applet menu
#. metadata.json->name
#: applet.js:707
#: applet.js:715
msgid "Pomodoro Timer"
msgstr "Cronòmetre Pomodoro"

#: applet.js:716
#: applet.js:724
msgid "Completed"
msgstr "Completats"

#: applet.js:724
#: applet.js:732
msgid "Reset Timer"
msgstr "Reiniciar cronometre"

#: applet.js:732
#: applet.js:740
msgid "Reset Counts and Timer"
msgstr "Reiniciar comptador i cronòmetre"

#: applet.js:741
#: applet.js:749
msgid "Skip To Next Timer"
msgstr ""

#: applet.js:748
#: applet.js:756
msgid "What is this?"
msgstr "Què és això?"

#: applet.js:788
#: applet.js:796
msgid "None"
msgstr "Cap"

# dialog
#: applet.js:805
#: applet.js:813
msgid "Switch Off Pomodoro"
msgstr "Tancar Pomodoro"

#: applet.js:811
#: applet.js:819
msgid "Start a new Pomodoro"
msgstr "Començar un nou Pomodoro"

#: applet.js:817
#: applet.js:825
msgid "Hide"
msgstr "Amaga"

#: applet.js:829
#: applet.js:837
#, fuzzy
msgid "Pomodoro set finished, you deserve a break!"
msgstr "Pomodoro finalitzat, et mereixes un descans!"

#: applet.js:838
#: applet.js:846
msgid "Your break is over, start another pomodoro!"
msgstr "El descans s'acaba, comença un altre pomodoro!"

#: applet.js:844
#: applet.js:852
#, fuzzy, javascript-format
msgid "A new pomodoro begins in %s."
msgstr "Un nou pomodoro comença en "

#: applet.js:856
#: applet.js:864
#, javascript-format
msgid "%d minute"
msgid_plural "%d minutes"
msgstr[0] ""
msgstr[1] ""

#: applet.js:857
#: applet.js:865
#, javascript-format
msgid "%d second"
msgid_plural "%d seconds"
msgstr[0] ""
msgstr[1] ""

#: applet.js:859
#: applet.js:867
#, javascript-format
msgid "%s and %s"
msgstr ""

#: applet.js:874
#: applet.js:882
msgid "Continue Current Pomodoro"
msgstr ""

#: applet.js:880 applet.js:913
#: applet.js:888 applet.js:921
#, fuzzy
msgid "Pause Pomodoro"
msgstr "Començar un nou Pomodoro"

#: applet.js:891
#: applet.js:899
msgid "Short break finished, ready to continue?"
msgstr ""

#: applet.js:907
#: applet.js:915
#, fuzzy
msgid "Start break"
msgstr "Pren un descans curt"

#: applet.js:924
#: applet.js:932
#, fuzzy
msgid "Pomodoro finished, ready to take a break?"
msgstr "Pomodoro finalitzat, et mereixes un descans!"
Expand Down Expand Up @@ -193,6 +193,11 @@ msgstr "Número de pomodoros abans del descans llarg: "
msgid "Options"
msgstr "Opcions"

#. settings-schema.json->start_automatically_on_load->description
#, fuzzy
msgid "Start the pomodoro timer as soon as the applet loads"
msgstr "Mostra la icona pomodoro en el panell de miniaplicacions"

#. settings-schema.json->show_dialog_messages->description
msgid "Show Dialog Messages"
msgstr "Mostra missatges "
Expand Down
Loading

0 comments on commit 7f5836c

Please sign in to comment.