1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-01-29 04:09:19 +01:00

- posting on chats works;

- fixed ordering  in db:all-chat-messages (message-id was  not a valid
  column name);
- added scheduled events;
- minor changes in labels.
This commit is contained in:
cage 2020-09-06 14:42:16 +02:00
parent c5118d46a6
commit b2b3e65431
13 changed files with 313 additions and 176 deletions

164
po/it.po
View File

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: tinmop 0.0.1\n"
"Report-Msgid-Bugs-To: https://notabug.org/cage/tinmop/\n"
"POT-Creation-Date: 2020-09-05 17:03+0200\n"
"PO-Revision-Date: 2020-09-05 17:07+0200\n"
"POT-Creation-Date: 2020-09-06 12:27+0200\n"
"PO-Revision-Date: 2020-09-06 12:28+0200\n"
"Last-Translator: cage <cage@invalid.org>\n"
"Language-Team: Italian\n"
"Language: it\n"
@ -80,8 +80,8 @@ msgstr "~@[~a~]~@[~a~] ~a non letti: ~a"
#: src/chats-list-window.lisp:64
#, lisp-format
msgid "~a ~a said:~%~a ~a~2%"
msgstr "\"~a ~a ha detto:~%~a ~a~2%\""
msgid "~a ~a wrote:~%~a ~a~2%"
msgstr "~a ~a ha scritto:~%~a ~a~2%"
#: src/chats-list-window.lisp:102
msgid "Current chats"
@ -302,12 +302,12 @@ msgstr "Mappa tasti globale"
msgid "Quick help"
msgstr "Aiuto rapido"
#: src/line-oriented-window.lisp:304 src/ui-goodies.lisp:77
#: src/line-oriented-window.lisp:305 src/ui-goodies.lisp:77
#: src/ui-goodies.lisp:94
msgid "Information"
msgstr "Informazione"
#: src/main.lisp:78
#: src/main.lisp:85
#, lisp-format
msgid "Folder ~s does not exists"
msgstr "La cartella ~s non esiste."
@ -395,7 +395,7 @@ msgstr "È ammessa una sola scelta"
msgid "The poll has expired"
msgstr "Il sondaggio è scaduto"
#: src/message-window.lisp:242
#: src/message-window.lisp:260
msgid "Messages"
msgstr "Messaggi"
@ -634,333 +634,333 @@ msgstr "Il focus è passato alla finestra dei flussi di dati gemini."
msgid "Focus passed on chats list window"
msgstr "Il focus è passato alla finestra delle chat."
#: src/ui-goodies.lisp:505
#: src/ui-goodies.lisp:504
#, lisp-format
msgid "Saving messages in ~s"
msgstr "Salvo i messaggi in ~s"
#: src/ui-goodies.lisp:506
#: src/ui-goodies.lisp:505
#, lisp-format
msgid "Saved message in ~s"
msgstr "Salvati i messaggi in ~s"
#: src/ui-goodies.lisp:509 src/ui-goodies.lisp:527
#: src/ui-goodies.lisp:508 src/ui-goodies.lisp:526
msgid "No folder specified."
msgstr "Nessuna cartella indicata."
#: src/ui-goodies.lisp:511
#: src/ui-goodies.lisp:510
msgid "Move to folder: "
msgstr "Sposta nella cartella: "
#: src/ui-goodies.lisp:525
#: src/ui-goodies.lisp:524
#, lisp-format
msgid "Folder ~s does not exists."
msgstr "La cartella ~s non esiste."
#: src/ui-goodies.lisp:529
#: src/ui-goodies.lisp:528
msgid "Change folder: "
msgstr "Spostati nella cartella: "
#: src/ui-goodies.lisp:540
#: src/ui-goodies.lisp:539
msgid "No timeline specified."
msgstr "Nessuna timeline indicata."
#: src/ui-goodies.lisp:542
#: src/ui-goodies.lisp:541
msgid "This timeline is protected."
msgstr "Questa timeline è protetta."
#: src/ui-goodies.lisp:546
#: src/ui-goodies.lisp:545
msgid "Change timeline: "
msgstr "Spostati nella timeline: "
#: src/ui-goodies.lisp:562
#: src/ui-goodies.lisp:561
msgid "Downloading messages."
msgstr "Scarico i messaggi."
#: src/ui-goodies.lisp:566 src/ui-goodies.lisp:660
#: src/ui-goodies.lisp:565 src/ui-goodies.lisp:659
msgid "Messages downloaded."
msgstr "Messaggi scaricati"
#: src/ui-goodies.lisp:639
#: src/ui-goodies.lisp:638
msgid "Expanding thread"
msgstr "Espandi l'albero dei messaggi"
#: src/ui-goodies.lisp:659
#: src/ui-goodies.lisp:658
msgid "Downloading tags messages."
msgstr "Scarico i messaggi dell'etichetta."
#: src/ui-goodies.lisp:672
#: src/ui-goodies.lisp:671
msgid "Favorite this message?"
msgstr "Conservare tra i favoriti questo messaggio?"
#: src/ui-goodies.lisp:681
#: src/ui-goodies.lisp:680
msgid "Favouring message."
msgstr "Conservo il messaggio tra i favoriti."
#: src/ui-goodies.lisp:682
#: src/ui-goodies.lisp:681
msgid "Favoured message."
msgstr "Messaggio conservato tra i favoriti."
#: src/ui-goodies.lisp:687
#: src/ui-goodies.lisp:686
msgid "Remove this message from your favourites?"
msgstr "Rimuovere dai preferiti questo messaggio?"
#: src/ui-goodies.lisp:696
#: src/ui-goodies.lisp:695
msgid "Unfavouring message."
msgstr "Rimuovo messaggio dai favoriti."
#: src/ui-goodies.lisp:697
#: src/ui-goodies.lisp:696
msgid "Unfavoured message."
msgstr "Rimuosso messaggio dai favoriti."
#: src/ui-goodies.lisp:702
#: src/ui-goodies.lisp:701
msgid "Boost this message?"
msgstr "Rilancia questo messaggio?"
#: src/ui-goodies.lisp:711
#: src/ui-goodies.lisp:710
msgid "Boosting message."
msgstr "Rilancio il messaggio."
#: src/ui-goodies.lisp:712
#: src/ui-goodies.lisp:711
msgid "Boosted message."
msgstr "Messaggio rilanciato."
#: src/ui-goodies.lisp:717
#: src/ui-goodies.lisp:716
msgid "Unboost this message?"
msgstr "Ritira il rilancio del messaggio?"
#: src/ui-goodies.lisp:726
#: src/ui-goodies.lisp:725
msgid "Uboosting message."
msgstr "Ritiro il rilancio del messaggio."
#: src/ui-goodies.lisp:727
#: src/ui-goodies.lisp:726
msgid "Unboosted message."
msgstr "Ritirato il rilancio del messaggio."
#: src/ui-goodies.lisp:735
#: src/ui-goodies.lisp:734
#, lisp-format
msgid "Ignore ~s?"
msgstr "Ignorare ~s?"
#: src/ui-goodies.lisp:738
#: src/ui-goodies.lisp:737
#, lisp-format
msgid "Ignoring ~s"
msgstr "Ignoro ~s"
#: src/ui-goodies.lisp:739
#: src/ui-goodies.lisp:738
#, lisp-format
msgid "User ~s ignored"
msgstr "Utente ~s ignorato"
#: src/ui-goodies.lisp:749
#: src/ui-goodies.lisp:748
msgid "No username specified."
msgstr "Nessun nome utente indicato."
#: src/ui-goodies.lisp:751
#: src/ui-goodies.lisp:750
msgid "Unignore username: "
msgstr "Riprendere a leggere i messaggi di:"
#: src/ui-goodies.lisp:780
#: src/ui-goodies.lisp:779
#, lisp-format
msgid "File ~s does not exists."
msgstr "Il file ~s non esiste."
#: src/ui-goodies.lisp:782
#: src/ui-goodies.lisp:781
msgid "Message ready to be sent"
msgstr "Messaggio pronto per essere spedito"
#: src/ui-goodies.lisp:784
#: src/ui-goodies.lisp:783
msgid "Add attachment: "
msgstr "Aggiungi allegato: "
#: src/ui-goodies.lisp:794
#: src/ui-goodies.lisp:793
msgid "New subject: "
msgstr "Nuovo oggetto del messaggio: "
#: src/ui-goodies.lisp:803
#: src/ui-goodies.lisp:802
msgid "New visibility: "
msgstr "Nuovo livello di visibilità: "
#: src/ui-goodies.lisp:856
#: src/ui-goodies.lisp:855
#, lisp-format
msgid "Your message is ~a character too long."
msgid_plural "Your message is ~a characters too long."
msgstr[0] "Il tuo messaggio e più lungo del limite ammesso di ~a carattere."
msgstr[1] "Il tuo messaggio e più lungo del limite ammesso di ~a caratteri."
#: src/ui-goodies.lisp:880
#: src/ui-goodies.lisp:879
msgid "Add subject: "
msgstr "Oggetto del messaggio: "
#: src/ui-goodies.lisp:960
#: src/ui-goodies.lisp:959
#, lisp-format
msgid "The maximum allowed number of media is ~a."
msgstr "Il numero massimo di file da allegare è ~a."
#: src/ui-goodies.lisp:963
#: src/ui-goodies.lisp:962
msgid "Sending message"
msgstr "Spedisco il messaggio"
#: src/ui-goodies.lisp:1054
#: src/ui-goodies.lisp:1053
msgid "Follow: "
msgstr "Segui: "
#: src/ui-goodies.lisp:1057
#: src/ui-goodies.lisp:1056
#, lisp-format
msgid "Following ~a"
msgstr "Segui ~a"
#: src/ui-goodies.lisp:1058
#: src/ui-goodies.lisp:1057
#, lisp-format
msgid "Followed ~a"
msgstr "Adesso segui ~a "
#: src/ui-goodies.lisp:1062
#: src/ui-goodies.lisp:1061
msgid "Unfollow: "
msgstr "Abbandona: "
#: src/ui-goodies.lisp:1065
#: src/ui-goodies.lisp:1064
#, lisp-format
msgid "Unfollowing ~a"
msgstr "Abbandona ~a"
#: src/ui-goodies.lisp:1066
#: src/ui-goodies.lisp:1065
#, lisp-format
msgid "Unfollowed ~a"
msgstr "Hai abbandonato ~a"
#: src/ui-goodies.lisp:1095
#: src/ui-goodies.lisp:1094
msgid "Confirm operation?"
msgstr "Confermi l'operazione?"
#: src/ui-goodies.lisp:1133
#: src/ui-goodies.lisp:1132
msgid "Updating conversations."
msgstr "Aggiorno le conversazioni"
#: src/ui-goodies.lisp:1134
#: src/ui-goodies.lisp:1133
msgid "Conversations updated."
msgstr "Conversazioni aggiornate"
#: src/ui-goodies.lisp:1144
#: src/ui-goodies.lisp:1143
msgid "Open conversation: "
msgstr "Apri una conversazione: "
#: src/ui-goodies.lisp:1179
#: src/ui-goodies.lisp:1178
msgid "Old name: "
msgstr "Nome precedente: "
#: src/ui-goodies.lisp:1193
#: src/ui-goodies.lisp:1192
#, lisp-format
msgid "A conversation with name ~a already exists."
msgstr "Una conversazione con nome ~a esiste già."
#: src/ui-goodies.lisp:1199
#: src/ui-goodies.lisp:1198
msgid "New name: "
msgstr "Nuovo nome: "
#: src/ui-goodies.lisp:1215
#: src/ui-goodies.lisp:1214
#, lisp-format
msgid "Ignore conversation ~s? [y/N] "
msgstr "Ignorare la conversazione ~s? [s/N] "
#: src/ui-goodies.lisp:1231
#: src/ui-goodies.lisp:1230
#, lisp-format
msgid "Delete conversation ~s? [y/N] "
msgstr "Eliminare la conversazione ~s? [s/N] "
#: src/ui-goodies.lisp:1250
#: src/ui-goodies.lisp:1249
#, lisp-format
msgid "Comment too long by ~a character"
msgid_plural "Comment too long by ~a characters"
msgstr[0] "Il commento è troppo lungo di ~a caratteri"
msgstr[1] "Il commento è troppo lungo di ~a caratteri"
#: src/ui-goodies.lisp:1257
#: src/ui-goodies.lisp:1256
#, lisp-format
msgid "Reporting user: ~s"
msgstr "Segnalo l'utente ~s"
#: src/ui-goodies.lisp:1258
#: src/ui-goodies.lisp:1257
msgid "Report trasmitted."
msgstr "Segnalazione trasmessa."
#: src/ui-goodies.lisp:1261
#: src/ui-goodies.lisp:1260
msgid "Comment on reports: "
msgstr "Commento sulla segnalazione: "
#: src/ui-goodies.lisp:1277 src/ui-goodies.lisp:1310 src/ui-goodies.lisp:1328
#: src/ui-goodies.lisp:1276 src/ui-goodies.lisp:1309 src/ui-goodies.lisp:1327
#, lisp-format
msgid "User ~s does not exists in database"
msgstr "L'utente ~s non esiste nel database"
#: src/ui-goodies.lisp:1280 src/ui-goodies.lisp:1313 src/ui-goodies.lisp:1331
#: src/ui-goodies.lisp:1279 src/ui-goodies.lisp:1312 src/ui-goodies.lisp:1330
msgid "Username: "
msgstr "Nome utente: "
#: src/ui-goodies.lisp:1290
#: src/ui-goodies.lisp:1289
#, lisp-format
msgid "Added crypto key for user ~s"
msgstr "Aggiunta chiave crittografica per l'utente ~s"
#: src/ui-goodies.lisp:1293
#: src/ui-goodies.lisp:1292
msgid "Key: "
msgstr "Chiave: "
#: src/ui-goodies.lisp:1307
#: src/ui-goodies.lisp:1306
#, lisp-format
msgid "Generated key for user ~s"
msgstr "Generata chiave crittografica per l'utente ~s"
#: src/ui-goodies.lisp:1308
#: src/ui-goodies.lisp:1307
#, lisp-format
msgid "user ~s key ~s"
msgstr "utente ~s chiave ~s"
#: src/ui-goodies.lisp:1324
#: src/ui-goodies.lisp:1323
#, lisp-format
msgid "Added key for user ~s: ~a"
msgstr "Aggiunta chiave crittografica per l'utente ~s: ~a"
#: src/ui-goodies.lisp:1341
#: src/ui-goodies.lisp:1340
msgid "About this software"
msgstr "Sul programma"
#: src/ui-goodies.lisp:1353
#: src/ui-goodies.lisp:1352
msgid "Clearing pagination data"
msgstr "Elimina i dati della paginazione"
#: src/ui-goodies.lisp:1372
#: src/ui-goodies.lisp:1371
msgid "Invalid choices, usa a space separated list of positive integers."
msgstr ""
"Il formato ammesso è costituito da una lista di interi positivi separati da "
"spazi."
#: src/ui-goodies.lisp:1389
#: src/ui-goodies.lisp:1388
#, lisp-format
msgid "Invalid choices, index choice out of range (max ~a)."
msgstr "Intervallo dei valori delle scelte non valido (massimo ~a)."
#: src/ui-goodies.lisp:1391
#: src/ui-goodies.lisp:1390
msgid "Voting... "
msgstr "Votazione in corso..."
#: src/ui-goodies.lisp:1392
#: src/ui-goodies.lisp:1391
msgid "Choice sent."
msgstr "Voto inserito."
#: src/ui-goodies.lisp:1401
#: src/ui-goodies.lisp:1400
msgid "Type the index (or space separated indices) of selected choices: "
msgstr "Inserisci gli indici associati alle opzioni separati da spazi: "
#: src/ui-goodies.lisp:1402
#: src/ui-goodies.lisp:1401
msgid "This in not a poll"
msgstr "Questo messaggio non è un sondaggio."
#: src/ui-goodies.lisp:1451
#: src/ui-goodies.lisp:1452
msgid "This is not a valid gemini address"
msgstr "Questo non è un indirizzo gemini valido"
#: src/ui-goodies.lisp:1452
#: src/ui-goodies.lisp:1453
msgid "Open Gemini url: "
msgstr "Apri un indirizzo gemini: "

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tinmop 0.1.8\n"
"Report-Msgid-Bugs-To: https://notabug.org/cage/tinmop/\n"
"POT-Creation-Date: 2020-09-05 17:03+0200\n"
"POT-Creation-Date: 2020-09-06 12:27+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -76,7 +76,7 @@ msgstr ""
#: src/chats-list-window.lisp:64
#, lisp-format
msgid "~a ~a said:~%~a ~a~2%"
msgid "~a ~a wrote:~%~a ~a~2%"
msgstr ""
#: src/chats-list-window.lisp:102
@ -291,12 +291,12 @@ msgstr ""
msgid "Quick help"
msgstr ""
#: src/line-oriented-window.lisp:304 src/ui-goodies.lisp:77
#: src/line-oriented-window.lisp:305 src/ui-goodies.lisp:77
#: src/ui-goodies.lisp:94
msgid "Information"
msgstr ""
#: src/main.lisp:78
#: src/main.lisp:85
#, lisp-format
msgid "Folder ~s does not exists"
msgstr ""
@ -384,7 +384,7 @@ msgstr ""
msgid "The poll has expired"
msgstr ""
#: src/message-window.lisp:242
#: src/message-window.lisp:260
msgid "Messages"
msgstr ""
@ -617,331 +617,331 @@ msgstr ""
msgid "Focus passed on chats list window"
msgstr ""
#: src/ui-goodies.lisp:505
#: src/ui-goodies.lisp:504
#, lisp-format
msgid "Saving messages in ~s"
msgstr ""
#: src/ui-goodies.lisp:506
#: src/ui-goodies.lisp:505
#, lisp-format
msgid "Saved message in ~s"
msgstr ""
#: src/ui-goodies.lisp:509 src/ui-goodies.lisp:527
#: src/ui-goodies.lisp:508 src/ui-goodies.lisp:526
msgid "No folder specified."
msgstr ""
#: src/ui-goodies.lisp:511
#: src/ui-goodies.lisp:510
msgid "Move to folder: "
msgstr ""
#: src/ui-goodies.lisp:525
#: src/ui-goodies.lisp:524
#, lisp-format
msgid "Folder ~s does not exists."
msgstr ""
#: src/ui-goodies.lisp:529
#: src/ui-goodies.lisp:528
msgid "Change folder: "
msgstr ""
#: src/ui-goodies.lisp:540
#: src/ui-goodies.lisp:539
msgid "No timeline specified."
msgstr ""
#: src/ui-goodies.lisp:542
#: src/ui-goodies.lisp:541
msgid "This timeline is protected."
msgstr ""
#: src/ui-goodies.lisp:546
#: src/ui-goodies.lisp:545
msgid "Change timeline: "
msgstr ""
#: src/ui-goodies.lisp:562
#: src/ui-goodies.lisp:561
msgid "Downloading messages."
msgstr ""
#: src/ui-goodies.lisp:566 src/ui-goodies.lisp:660
#: src/ui-goodies.lisp:565 src/ui-goodies.lisp:659
msgid "Messages downloaded."
msgstr ""
#: src/ui-goodies.lisp:639
#: src/ui-goodies.lisp:638
msgid "Expanding thread"
msgstr ""
#: src/ui-goodies.lisp:659
#: src/ui-goodies.lisp:658
msgid "Downloading tags messages."
msgstr ""
#: src/ui-goodies.lisp:672
#: src/ui-goodies.lisp:671
msgid "Favorite this message?"
msgstr ""
#: src/ui-goodies.lisp:681
#: src/ui-goodies.lisp:680
msgid "Favouring message."
msgstr ""
#: src/ui-goodies.lisp:682
#: src/ui-goodies.lisp:681
msgid "Favoured message."
msgstr ""
#: src/ui-goodies.lisp:687
#: src/ui-goodies.lisp:686
msgid "Remove this message from your favourites?"
msgstr ""
#: src/ui-goodies.lisp:696
#: src/ui-goodies.lisp:695
msgid "Unfavouring message."
msgstr ""
#: src/ui-goodies.lisp:697
#: src/ui-goodies.lisp:696
msgid "Unfavoured message."
msgstr ""
#: src/ui-goodies.lisp:702
#: src/ui-goodies.lisp:701
msgid "Boost this message?"
msgstr ""
#: src/ui-goodies.lisp:711
#: src/ui-goodies.lisp:710
msgid "Boosting message."
msgstr ""
#: src/ui-goodies.lisp:712
#: src/ui-goodies.lisp:711
msgid "Boosted message."
msgstr ""
#: src/ui-goodies.lisp:717
#: src/ui-goodies.lisp:716
msgid "Unboost this message?"
msgstr ""
#: src/ui-goodies.lisp:726
#: src/ui-goodies.lisp:725
msgid "Uboosting message."
msgstr ""
#: src/ui-goodies.lisp:727
#: src/ui-goodies.lisp:726
msgid "Unboosted message."
msgstr ""
#: src/ui-goodies.lisp:735
#: src/ui-goodies.lisp:734
#, lisp-format
msgid "Ignore ~s?"
msgstr ""
#: src/ui-goodies.lisp:738
#: src/ui-goodies.lisp:737
#, lisp-format
msgid "Ignoring ~s"
msgstr ""
#: src/ui-goodies.lisp:739
#: src/ui-goodies.lisp:738
#, lisp-format
msgid "User ~s ignored"
msgstr ""
#: src/ui-goodies.lisp:749
#: src/ui-goodies.lisp:748
msgid "No username specified."
msgstr ""
#: src/ui-goodies.lisp:751
#: src/ui-goodies.lisp:750
msgid "Unignore username: "
msgstr ""
#: src/ui-goodies.lisp:780
#: src/ui-goodies.lisp:779
#, lisp-format
msgid "File ~s does not exists."
msgstr ""
#: src/ui-goodies.lisp:782
#: src/ui-goodies.lisp:781
msgid "Message ready to be sent"
msgstr ""
#: src/ui-goodies.lisp:784
#: src/ui-goodies.lisp:783
msgid "Add attachment: "
msgstr ""
#: src/ui-goodies.lisp:794
#: src/ui-goodies.lisp:793
msgid "New subject: "
msgstr ""
#: src/ui-goodies.lisp:803
#: src/ui-goodies.lisp:802
msgid "New visibility: "
msgstr ""
#: src/ui-goodies.lisp:856
#: src/ui-goodies.lisp:855
#, lisp-format
msgid "Your message is ~a character too long."
msgid_plural "Your message is ~a characters too long."
msgstr[0] ""
msgstr[1] ""
#: src/ui-goodies.lisp:880
#: src/ui-goodies.lisp:879
msgid "Add subject: "
msgstr ""
#: src/ui-goodies.lisp:960
#: src/ui-goodies.lisp:959
#, lisp-format
msgid "The maximum allowed number of media is ~a."
msgstr ""
#: src/ui-goodies.lisp:963
#: src/ui-goodies.lisp:962
msgid "Sending message"
msgstr ""
#: src/ui-goodies.lisp:1054
#: src/ui-goodies.lisp:1053
msgid "Follow: "
msgstr ""
#: src/ui-goodies.lisp:1057
#: src/ui-goodies.lisp:1056
#, lisp-format
msgid "Following ~a"
msgstr ""
#: src/ui-goodies.lisp:1058
#: src/ui-goodies.lisp:1057
#, lisp-format
msgid "Followed ~a"
msgstr ""
#: src/ui-goodies.lisp:1062
#: src/ui-goodies.lisp:1061
msgid "Unfollow: "
msgstr ""
#: src/ui-goodies.lisp:1065
#: src/ui-goodies.lisp:1064
#, lisp-format
msgid "Unfollowing ~a"
msgstr ""
#: src/ui-goodies.lisp:1066
#: src/ui-goodies.lisp:1065
#, lisp-format
msgid "Unfollowed ~a"
msgstr ""
#: src/ui-goodies.lisp:1095
#: src/ui-goodies.lisp:1094
msgid "Confirm operation?"
msgstr ""
#: src/ui-goodies.lisp:1133
#: src/ui-goodies.lisp:1132
msgid "Updating conversations."
msgstr ""
#: src/ui-goodies.lisp:1134
#: src/ui-goodies.lisp:1133
msgid "Conversations updated."
msgstr ""
#: src/ui-goodies.lisp:1144
#: src/ui-goodies.lisp:1143
msgid "Open conversation: "
msgstr ""
#: src/ui-goodies.lisp:1179
#: src/ui-goodies.lisp:1178
msgid "Old name: "
msgstr ""
#: src/ui-goodies.lisp:1193
#: src/ui-goodies.lisp:1192
#, lisp-format
msgid "A conversation with name ~a already exists."
msgstr ""
#: src/ui-goodies.lisp:1199
#: src/ui-goodies.lisp:1198
msgid "New name: "
msgstr ""
#: src/ui-goodies.lisp:1215
#: src/ui-goodies.lisp:1214
#, lisp-format
msgid "Ignore conversation ~s? [y/N] "
msgstr ""
#: src/ui-goodies.lisp:1231
#: src/ui-goodies.lisp:1230
#, lisp-format
msgid "Delete conversation ~s? [y/N] "
msgstr ""
#: src/ui-goodies.lisp:1250
#: src/ui-goodies.lisp:1249
#, lisp-format
msgid "Comment too long by ~a character"
msgid_plural "Comment too long by ~a characters"
msgstr[0] ""
msgstr[1] ""
#: src/ui-goodies.lisp:1257
#: src/ui-goodies.lisp:1256
#, lisp-format
msgid "Reporting user: ~s"
msgstr ""
#: src/ui-goodies.lisp:1258
#: src/ui-goodies.lisp:1257
msgid "Report trasmitted."
msgstr ""
#: src/ui-goodies.lisp:1261
#: src/ui-goodies.lisp:1260
msgid "Comment on reports: "
msgstr ""
#: src/ui-goodies.lisp:1277 src/ui-goodies.lisp:1310 src/ui-goodies.lisp:1328
#: src/ui-goodies.lisp:1276 src/ui-goodies.lisp:1309 src/ui-goodies.lisp:1327
#, lisp-format
msgid "User ~s does not exists in database"
msgstr ""
#: src/ui-goodies.lisp:1280 src/ui-goodies.lisp:1313 src/ui-goodies.lisp:1331
#: src/ui-goodies.lisp:1279 src/ui-goodies.lisp:1312 src/ui-goodies.lisp:1330
msgid "Username: "
msgstr ""
#: src/ui-goodies.lisp:1290
#: src/ui-goodies.lisp:1289
#, lisp-format
msgid "Added crypto key for user ~s"
msgstr ""
#: src/ui-goodies.lisp:1293
#: src/ui-goodies.lisp:1292
msgid "Key: "
msgstr ""
#: src/ui-goodies.lisp:1307
#: src/ui-goodies.lisp:1306
#, lisp-format
msgid "Generated key for user ~s"
msgstr ""
#: src/ui-goodies.lisp:1308
#: src/ui-goodies.lisp:1307
#, lisp-format
msgid "user ~s key ~s"
msgstr ""
#: src/ui-goodies.lisp:1324
#: src/ui-goodies.lisp:1323
#, lisp-format
msgid "Added key for user ~s: ~a"
msgstr ""
#: src/ui-goodies.lisp:1341
#: src/ui-goodies.lisp:1340
msgid "About this software"
msgstr ""
#: src/ui-goodies.lisp:1353
#: src/ui-goodies.lisp:1352
msgid "Clearing pagination data"
msgstr ""
#: src/ui-goodies.lisp:1372
#: src/ui-goodies.lisp:1371
msgid "Invalid choices, usa a space separated list of positive integers."
msgstr ""
#: src/ui-goodies.lisp:1389
#: src/ui-goodies.lisp:1388
#, lisp-format
msgid "Invalid choices, index choice out of range (max ~a)."
msgstr ""
#: src/ui-goodies.lisp:1391
#: src/ui-goodies.lisp:1390
msgid "Voting... "
msgstr ""
#: src/ui-goodies.lisp:1392
#: src/ui-goodies.lisp:1391
msgid "Choice sent."
msgstr ""
#: src/ui-goodies.lisp:1401
#: src/ui-goodies.lisp:1400
msgid "Type the index (or space separated indices) of selected choices: "
msgstr ""
#: src/ui-goodies.lisp:1402
#: src/ui-goodies.lisp:1401
msgid "This in not a poll"
msgstr ""
#: src/ui-goodies.lisp:1451
#: src/ui-goodies.lisp:1452
msgid "This is not a valid gemini address"
msgstr ""
#: src/ui-goodies.lisp:1452
#: src/ui-goodies.lisp:1453
msgid "Open Gemini url: "
msgstr ""

View File

@ -46,7 +46,10 @@
(defun post-chat-path (chat-id)
(format nil "/api/v1/pleroma/chats/~a/messages" chat-id))
(defmethod post-chat-message ((object tooter:client) (chat-id string) (content string) (media null))
(defmethod post-chat-message ((object tooter:client)
(chat-id string)
(content string)
(media null))
"Post a message to chat identified by `chat-id' with text `content` or
media `media'."
(decode-chat-message (tooter:submit object
@ -54,7 +57,10 @@ media `media'."
:content content
:media-id media)))
(defmethod post-chat-message ((object tooter:client) (chat-id string) (content null) (media string))
(defmethod post-chat-message ((object tooter:client)
(chat-id string)
(content null)
(media string))
"Post a message to chat identified by `chat-id' with text `content` or
media `media'. Returns a `chat-message' instance"
(let ((path-media (fs:namestring->pathname media)))
@ -90,3 +96,9 @@ media `media'. Returns a `chat-message' instance"
(defun-w-lock get-chats ()
api-client:*client-lock*
(get-all-chats api-client:*client*))
(defun-w-lock post-on-chat (chat-id message)
api-client:*client-lock*
(if (cl-ppcre:scan "^/" message)
(api-pleroma:post-chat-message api-client:*client* chat-id nil message)
(api-pleroma:post-chat-message api-client:*client* chat-id message nil)))

View File

@ -61,7 +61,7 @@
""))
(username (db:user-id->username (db:row-account-id message))))
(format stream
(_ "~a ~a said:~%~a ~a~2%")
(_ "~a ~a wrote:~%~a ~a~2%")
formatted-created-date
username
content

View File

@ -157,3 +157,7 @@ list af all possible candidtae for completion."
(when-let ((matched (remove-if-not (starts-with-clsr hint)
(funcall #'db:history-prompt->values prompt))))
(values matched (reduce-to-common-prefix matched)))))
(defun complete-chat-message (hint)
(append (username-complete hint)
(directory-complete hint)))

View File

@ -1289,12 +1289,12 @@ than (swconf:config-purge-history-days-offset) days in the past"
(order-by (:desc :updated-at)))))
(defun all-chat-messages (chat-id)
"Return all messages belonging to `chat-id' ordered by `message-id'
"Return all messages belonging to `chat-id' ordered by `id'
in ascending order"
(query (select :*
(from +table-chat-message+)
(where (:= :chat-id chat-id))
(order-by (:asc :message-id)))))
(order-by (:asc :id)))))
(defun last-chat-message-id (chat-id)
(second (fetch-single (select ((:as (fields (:max :id)) :max-id))

View File

@ -17,12 +17,17 @@
(in-package :main)
(defparameter *tick* 0.0)
(defparameter *time* 0.0)
(defparameter *ticks* 0)
(define-constant +dt+ (/ 1 +fps+) :test #'=)
(defun incf-dt ()
(incf *tick* +dt+))
(incf *time* +dt+))
(defun incf-ticks ()
(incf *ticks*))
(defun setup-bindings ()
"This is where an UI event is bound to a function the event nil is
@ -50,6 +55,8 @@ etc.) happened"
(lambda (w e)
(declare (ignore w e))
(incf-dt)
(incf-ticks)
;(scheduled-events:run-scheduled-events *ticks*)
(program-events:dispatch-program-events)
(windows:calculate-all +dt+)))))
@ -144,7 +151,6 @@ etc.) happened"
(unwind-protect
(progn
(hooks:run-hooks 'hooks:*before-main-loop*)
(ui:update-all-chats-data)
(run-event-loop croatoan-window))
(end-screen)))))

View File

@ -91,7 +91,7 @@
(let* ((height (1- (win-height-no-border window)))
(rows-count (- (length rows) height))
(fraction (/ row-selected-index
(max 1 (1- rows-count))))
(max 1 rows-count)))
(mark-y (1+ (truncate (* fraction height))))
(mark-x (1- (win-width window))))
(print-text window line-position-mark mark-x mark-y))))

View File

@ -1146,7 +1146,8 @@
:followed-user-complete
:tags-complete
:conversation-folder
:make-complete-gemini-uri-fn))
:make-complete-gemini-uri-fn
:complete-chat-message))
(defpackage :program-events
(:use
@ -1242,6 +1243,7 @@
:get-chats-event
:chat-show-event
:update-all-chat-messages-event
:chat-post-message-event
:function-event
:dispatch-program-events
:add-pagination-status-event
@ -1278,7 +1280,8 @@
:fetch-chat-messages
:delete-chat-message
:get-chat-messages
:get-chats))
:get-chats
:post-on-chat))
(defpackage :api-client
(:use
@ -2176,8 +2179,10 @@
:refresh-chat-messages
:close-chats-list-window
:update-all-chats-data
:update-all-chats-messages
:open-chats-list-window
:show-chat-to-screen
:chat-loop
:open-gemini-address
:gemini-history-back
:gemini-view-source
@ -2188,6 +2193,23 @@
:gemini-streams-window-close
:gemini-streams-window-open-stream))
(defpackage :scheduled-events
(:use
:cl
:alexandria
:cl-ppcre
:croatoan
:config
:constants
:misc-utils
:text-utils
:specials)
(:shadowing-import-from :misc :random-elt :shuffle)
(:export
:refresh-refresh-all-chats-data
:refresh-refresh-all-chats-messages
:run-scheduled-events))
(defpackage :modules
(:use
:cl

View File

@ -1034,6 +1034,21 @@
(chats-list-window:chat->text chat))
(windows:draw specials:*message-window*))))
(defclass chat-post-message-event (program-event)
((message
:initform nil
:initarg :message
:accessor message)
(chat-id
:initform nil
:initarg :chat-id
:accessor chat-id)))
(defmethod process-event ((object chat-post-message-event))
(with-accessors ((message message)
(chat-id chat-id)) object
(api-pleroma:post-on-chat chat-id message)))
;;;; general usage
(defclass function-event (program-event) ())

44
src/scheduled-events.lisp Normal file
View File

@ -0,0 +1,44 @@
;; tinmop: an humble gemini and pleroma client
;; Copyright (C) 2020 cage
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program.
;; If not, see [[http://www.gnu.org/licenses/][http://www.gnu.org/licenses/]].
(in-package :scheduled-events)
(define-constant +refresh-all-chats-data-frequency+ 10000 :test #'=)
(define-constant +refresh-all-chats-messages-frequency+ 1000 :test #'=)
(defun triggedp (ticks frequency)
(= (rem ticks frequency)
0))
(defmacro gen-scheduler-function ((name frequency) &body body-if-triggered)
`(defun ,(format-fn-symbol t "~a" name) (ticks)
(when (triggedp ticks ,frequency)
,@body-if-triggered)))
(gen-scheduler-function (refresh-refresh-all-chats-data
+refresh-all-chats-data-frequency+)
(ui:notify (_ "Updating all chats."))
(ui:update-all-chats-data))
(gen-scheduler-function (refresh-refresh-all-chats-messages
+refresh-all-chats-messages-frequency+)
(ui:update-all-chats-messages))
(defun run-scheduled-events (ticks)
(refresh-refresh-all-chats-messages ticks)
(refresh-refresh-all-chats-data ticks))

View File

@ -1425,9 +1425,12 @@ mot recent updated to least recent"
(defun close-chats-list-window ()
(close-window-and-return-to-threads specials:*chats-list-window*))
(defun update-all-chats-messages ()
(program-events:push-event (make-instance 'program-events:update-all-chat-messages-event)))
(defun update-all-chats-data ()
(refresh-chats)
(program-events:push-event (make-instance 'program-events:update-all-chat-messages-event)))
(update-all-chats-messages))
(defun show-chat-to-screen ()
(when-let* ((fields (line-oriented-window:selected-row-fields *chats-list-window*))
@ -1435,12 +1438,42 @@ mot recent updated to least recent"
(chat (db:find-chat chat-id))
(event (make-instance 'program-events:chat-show-event
:chat chat)))
(program-events:push-event event)))
(close-chats-list-window)
(program-events:push-event event)
(chat-loop chat)))
(defun chat-loop (chat)
(labels ((post-message (message)
(let ((event (make-instance 'program-events:chat-post-message-event
:priority +maximum-event-priority+
:message message
:chat-id (db:row-id chat))))
(push-event event)))
(%loop ()
(labels ((on-message-composed (message)
(when (string-not-empty-p message)
(post-message message)
(update-all-chats-messages)
(let ((show-event (make-instance 'program-events:chat-show-event
:priority +minimum-event-priority+
:chat chat)))
(push-event show-event)
(%loop))))
(ask-fn ()
(lambda ()
(ask-string-input #'on-message-composed
:priority +minimum-event-priority+
:prompt (_ "Add message (enter to quit): ")
:complete-fn #'complete:complete-chat-message))))
(push-event (make-instance 'function-event
:priority +minimum-event-priority+
:payload (ask-fn))))))
(%loop)))
;;;; gemini
(defun open-gemini-address ()
"Ask for a gemini addresss and try to load it"
"Ask for a gemini address and try to load it"
(flet ((on-input-complete (url)
(if (gemini-parser:gemini-uri-p url)
(let* ((event (make-instance 'gemini-request-event

View File

@ -117,6 +117,7 @@
(:file "gemini-viewer")
(:file "main-window")
(:file "ui-goodies")
(:file "scheduled-events")
(:file "modules")
(:file "main")
(:module tests