Skip to content

Commit

Permalink
notes@schorschii: Allow in-desklet note taking (#1293)
Browse files Browse the repository at this point in the history
  • Loading branch information
anaximeno authored Sep 28, 2024
1 parent 80fcacc commit 004221f
Show file tree
Hide file tree
Showing 18 changed files with 1,314 additions and 412 deletions.
10 changes: 9 additions & 1 deletion notes@schorschii/files/notes@schorschii/desklet.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ MyDesklet.prototype = {
this.settings.bindProperty(Settings.BindingDirection.IN, "bg-color", "customBgColor", this.on_setting_changed);
this.settings.bindProperty(Settings.BindingDirection.IN, "file", "file", this.on_setting_changed);
this.settings.bindProperty(Settings.BindingDirection.IN, "edit-cmd", "editCmd", this.on_setting_changed);
this.settings.bindProperty(Settings.BindingDirection.IN, "note-taking-method", "noteTakingMethod", this.on_setting_changed);
this.settings.bindProperty(Settings.BindingDirection.IN, "note-text", "noteText", this.on_setting_changed);

// initialize desklet gui
this.setupUI();
Expand Down Expand Up @@ -154,6 +156,12 @@ MyDesklet.prototype = {
},

loadText: function(reloadGraphics = false) {
if (this.noteTakingMethod == "desklet") {
this.notecontent = this.noteText;
this.refreshDesklet(reloadGraphics);
return;
}

// get notes text file path
this.finalPath = decodeURIComponent(this.file.replace("file://", ""));
if(this.finalPath == "") this.finalPath = "note.txt"; // in home dir
Expand Down Expand Up @@ -278,7 +286,7 @@ MyDesklet.prototype = {
},

on_desklet_clicked: function() {
if(this.editCmd != "") {
if(this.noteTakingMethod == "file" && this.editCmd != "") {
Util.spawnCommandLine(this.editCmd.replace("%f", '"'+this.finalPath+'"'));
}
},
Expand Down
2 changes: 1 addition & 1 deletion notes@schorschii/files/notes@schorschii/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"max-instances": "10",
"description": "A desklet to display notes including various themes.",
"name": "Note",
"version": "2.3",
"version": "2.4",
"uuid": "notes@schorschii"
}
66 changes: 35 additions & 31 deletions notes@schorschii/files/notes@schorschii/po/ca.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-04 15:06+0200\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-09-28 12:45-0400\n"
"PO-Revision-Date: 2023-08-04 19:52+0200\n"
"Last-Translator: Daniel <[email protected]>\n"
"Language-Team: \n"
Expand All @@ -16,11 +17,11 @@ msgstr ""
"X-Poedit-SearchPath-0: desklet.js\n"
"X-Poedit-SearchPath-1: settings-schema.json\n"

#: desklet.js:130
#. desklet.js:133
msgid "Refresh"
msgstr "Actualitza"

#: desklet.js:143
#. desklet.js:146
msgid ""
"Can't read text file.\n"
"Select a file in settings.\n"
Expand All @@ -32,7 +33,7 @@ msgstr ""
"\n"
"Feu clic aquí per editar-ho."

#: desklet.js:263
#. desklet.js:272
msgid "Notepad"
msgstr "Llibreta"

Expand All @@ -42,17 +43,38 @@ msgstr ""
"Una miniaplicació d'escriptori senzilla per mostrar notes amb diversos temes."

#. metadata.json->name
#. settings-schema.json->note-section->title
msgid "Note"
msgstr "Nota"

#. settings-schema.json->head0->description
msgid "Settings for notes@schorschii"
msgstr "Ajusts per notes@schorschii"

#. settings-schema.json->head1->description
#. settings-schema.json->general-page->title
#. settings-schema.json->general-section->title
msgid "General"
msgstr "General"

#. settings-schema.json->visual-page->title
#. settings-schema.json->visual-section->title
msgid "Visual"
msgstr "Visual"

#. settings-schema.json->label-section->title
msgid "Label"
msgstr ""

#. settings-schema.json->note-taking-method->description
msgid "Note Taking Method"
msgstr ""

#. settings-schema.json->note-taking-method->options
#, fuzzy
msgid "Text File"
msgstr "Color del text"

#. settings-schema.json->note-taking-method->options
#, fuzzy
msgid "Desklet Settings"
msgstr "Alçada de la miniaplicació d'escriptori"

#. settings-schema.json->file->description
msgid "Path to note text file"
msgstr "Camí al fitxer de text de la nota"
Expand All @@ -69,9 +91,9 @@ msgstr "Ordre per editar aquesta nota (amb el clic del ratolí)"
msgid "%f will replaced by the text file path."
msgstr "%f se substituirà amb el camí al fitxer de text."

#. settings-schema.json->head2->description
msgid "Visual"
msgstr "Visual"
#. settings-schema.json->note-text->description
msgid "Write Your Note"
msgstr ""

#. settings-schema.json->style->description
msgid "Notes style"
Expand Down Expand Up @@ -299,12 +321,6 @@ msgstr ""
"Augmenta o disminueix la mida de la nota\n"
"amb aquest factor de canvi d'escala."

#. settings-schema.json->head3->description
msgid "Custom desklet label (only visible if decorations are enabled)"
msgstr ""
"Etiqueta de miniaplicació d'escriptori personalitzada (només és visible si "
"les decoracions estan habilitades)"

#. settings-schema.json->use-custom-label->description
msgid "Use a custom desklet label"
msgstr "Utilitza una etiqueta de miniaplicació d'escriptori personalitzada"
Expand All @@ -327,15 +343,3 @@ msgstr ""
"Establiu aquí la vostra etiqueta personalitzada. Aquest camp no està "
"disponible\n"
"a menys que la casella de selecció de dalt estigui habilitada."

#~ msgid "Note size"
#~ msgstr "Mida de la nota"

#~ msgid "White"
#~ msgstr "Blanc"

#~ msgid "Desklet width"
#~ msgstr "Amplada de la miniaplicació d'escriptori"

#~ msgid "Desklet height"
#~ msgstr "Alçada de la miniaplicació d'escriptori"
52 changes: 35 additions & 17 deletions notes@schorschii/files/notes@schorschii/po/da.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-04 15:06+0200\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-09-28 12:45-0400\n"
"PO-Revision-Date: 2023-12-08 07:45+0100\n"
"Last-Translator: Alan Mortensen <[email protected]>\n"
"Language-Team: Dansk-gruppen <[email protected]>\n"
Expand All @@ -16,11 +17,11 @@ msgstr ""
"X-Poedit-SearchPath-0: desklet.js\n"
"X-Poedit-SearchPath-1: settings-schema.json\n"

#: desklet.js:130
#. desklet.js:133
msgid "Refresh"
msgstr "Opdatér"

#: desklet.js:143
#. desklet.js:146
msgid ""
"Can't read text file.\n"
"Select a file in settings.\n"
Expand All @@ -32,7 +33,7 @@ msgstr ""
"\n"
"Klik her for at redigere."

#: desklet.js:263
#. desklet.js:272
msgid "Notepad"
msgstr "Notesblok"

Expand All @@ -42,17 +43,38 @@ msgstr ""
"Et enkelt skrivebordsprogram til visning af noter med forskellige temaer."

#. metadata.json->name
#. settings-schema.json->note-section->title
msgid "Note"
msgstr "Note"

#. settings-schema.json->head0->description
msgid "Settings for notes@schorschii"
msgstr "Indstillinger"

#. settings-schema.json->head1->description
#. settings-schema.json->general-page->title
#. settings-schema.json->general-section->title
msgid "General"
msgstr "Generel"

#. settings-schema.json->visual-page->title
#. settings-schema.json->visual-section->title
msgid "Visual"
msgstr "Visuel"

#. settings-schema.json->label-section->title
msgid "Label"
msgstr ""

#. settings-schema.json->note-taking-method->description
msgid "Note Taking Method"
msgstr ""

#. settings-schema.json->note-taking-method->options
#, fuzzy
msgid "Text File"
msgstr "Tekstfarve"

#. settings-schema.json->note-taking-method->options
#, fuzzy
msgid "Desklet Settings"
msgstr "Skrivebordsprogrammets størrelse"

#. settings-schema.json->file->description
msgid "Path to note text file"
msgstr "Sti til notetekstfilen"
Expand All @@ -69,9 +91,9 @@ msgstr "Kommando til redigering af denne note (ved museklik)"
msgid "%f will replaced by the text file path."
msgstr "%f vil blive erstattet af stien til tekstfilen."

#. settings-schema.json->head2->description
msgid "Visual"
msgstr "Visuel"
#. settings-schema.json->note-text->description
msgid "Write Your Note"
msgstr ""

#. settings-schema.json->style->description
msgid "Notes style"
Expand Down Expand Up @@ -299,10 +321,6 @@ msgstr ""
"Forøg eller formindsk skrivebordsprogrammets størrelse med denne "
"skaleringsfaktor."

#. settings-schema.json->head3->description
msgid "Custom desklet label (only visible if decorations are enabled)"
msgstr "Tilpasset etiket (kun synlig hvis boksen rundt om er aktiveret)"

#. settings-schema.json->use-custom-label->description
msgid "Use a custom desklet label"
msgstr "Anvend tilpasset etiket"
Expand Down
68 changes: 40 additions & 28 deletions notes@schorschii/files/notes@schorschii/po/de.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-04 15:06+0200\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-09-28 12:45-0400\n"
"PO-Revision-Date: 2023-04-04 15:06+0200\n"
"Last-Translator: Georg Sieber\n"
"Language-Team: \n"
Expand All @@ -16,11 +17,11 @@ msgstr ""
"X-Poedit-SearchPath-0: desklet.js\n"
"X-Poedit-SearchPath-1: settings-schema.json\n"

#: desklet.js:130
#. desklet.js:133
msgid "Refresh"
msgstr "Aktualisieren"

#: desklet.js:143
#. desklet.js:146
msgid ""
"Can't read text file.\n"
"Select a file in settings.\n"
Expand All @@ -32,7 +33,7 @@ msgstr ""
"\n"
"Klicken Sie hier zum Bearbeiten."

#: desklet.js:263
#. desklet.js:272
msgid "Notepad"
msgstr "Notizblock"

Expand All @@ -41,17 +42,38 @@ msgid "A desklet to display notes including various themes."
msgstr "Ein Desklet mit verschiedenen Designs um Notizen anzuzeigen."

#. metadata.json->name
#. settings-schema.json->note-section->title
msgid "Note"
msgstr "Notiz"

#. settings-schema.json->head0->description
msgid "Settings for notes@schorschii"
msgstr "Einstellungen für notes@schorschii"

#. settings-schema.json->head1->description
#. settings-schema.json->general-page->title
#. settings-schema.json->general-section->title
msgid "General"
msgstr "Allgemein"

#. settings-schema.json->visual-page->title
#. settings-schema.json->visual-section->title
msgid "Visual"
msgstr "Aussehen"

#. settings-schema.json->label-section->title
msgid "Label"
msgstr ""

#. settings-schema.json->note-taking-method->description
msgid "Note Taking Method"
msgstr ""

#. settings-schema.json->note-taking-method->options
#, fuzzy
msgid "Text File"
msgstr "Textfarbe"

#. settings-schema.json->note-taking-method->options
#, fuzzy
msgid "Desklet Settings"
msgstr "Deskletgröße"

#. settings-schema.json->file->description
msgid "Path to note text file"
msgstr "Pfad zur Notiz-Textdatei"
Expand All @@ -70,9 +92,9 @@ msgstr "Befehlszeile zum Bearbeiten von Notizen (bei Mausklick)"
msgid "%f will replaced by the text file path."
msgstr "%f wird durch den Pfad zur Textdatei ersetzt."

#. settings-schema.json->head2->description
msgid "Visual"
msgstr "Aussehen"
#. settings-schema.json->note-text->description
msgid "Write Your Note"
msgstr ""

#. settings-schema.json->style->description
msgid "Notes style"
Expand Down Expand Up @@ -270,12 +292,6 @@ msgstr "Schriftgröße"
msgid "Increase or decrease the note font size."
msgstr "Erhöhen oder verringern Sie die Schriftgröße der Notiz."

#. settings-schema.json->scale-size->tooltip
msgid "Increase or decrease the size of this desklet using this scale factor."
msgstr ""
"Erhöhen oder verringern Sie die Größe dieses Desklets indem Sie diesen "
"Skalierungsfaktor anpassen."

#. settings-schema.json->font-bold->description
msgid "Bold"
msgstr "Fett"
Expand All @@ -300,9 +316,11 @@ msgstr "Skalierungsfaktor"
msgid "Desklet size"
msgstr "Deskletgröße"

#. settings-schema.json->head3->description
msgid "Custom desklet label (only visible if decorations are enabled)"
msgstr "Eigenes Deskletlabel (nur sichtbar wenn Dekorationen aktiviert sind)"
#. settings-schema.json->scale-size->tooltip
msgid "Increase or decrease the size of this desklet using this scale factor."
msgstr ""
"Erhöhen oder verringern Sie die Größe dieses Desklets indem Sie diesen "
"Skalierungsfaktor anpassen."

#. settings-schema.json->use-custom-label->description
msgid "Use a custom desklet label"
Expand All @@ -325,9 +343,3 @@ msgid ""
msgstr ""
"Legen Sie hier Ihr eigenes Deskletlabel fest. Dieses Feld ist deaktiviert, "
"wenn Sie die Option darüber nicht aktiviert haben."

#~ msgid "Yellow"
#~ msgstr "Gelb"

#~ msgid "White"
#~ msgstr "Weiß"
Loading

0 comments on commit 004221f

Please sign in to comment.