Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb789ef823 |
No files matched your search
@@ -10,10 +10,20 @@ Page {
|
||||
property string copia: ""
|
||||
property string oggetto: ""
|
||||
property string corpo: ""
|
||||
property string mittente: ""
|
||||
|
||||
property bool inviando: false
|
||||
property string errore: ""
|
||||
|
||||
// Il "Da" si vede e si può correggere qui: se il campo in Account non è
|
||||
// stato salvato, l'invio non resta bloccato senza spiegazione.
|
||||
Component.onCompleted: {
|
||||
if (account.mittente.length > 0)
|
||||
page.mittente = account.mittente;
|
||||
else if (account.persona.indexOf("@") > 0)
|
||||
page.mittente = account.persona;
|
||||
}
|
||||
|
||||
SilicaFlickable {
|
||||
anchors.fill: parent
|
||||
contentHeight: colonna.height + Theme.paddingLarge
|
||||
@@ -27,6 +37,19 @@ Page {
|
||||
width: parent.width
|
||||
spacing: Theme.paddingMedium
|
||||
|
||||
TextField {
|
||||
id: campoDa
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
label: qsTr("Da")
|
||||
placeholderText: qsTr("il tuo indirizzo")
|
||||
text: page.mittente
|
||||
inputMethodHints: Qt.ImhEmailCharactersOnly | Qt.ImhNoAutoUppercase
|
||||
EnterKey.enabled: true
|
||||
EnterKey.iconSource: "image://theme/icon-m-enter-next"
|
||||
EnterKey.onClicked: campoA.forceActiveFocus()
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: campoA
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
@@ -128,6 +151,7 @@ Page {
|
||||
function invia() {
|
||||
page.errore = "";
|
||||
const motivo = engine.sendMessage(campoA.text, campoCc.text, "",
|
||||
campoDa.text,
|
||||
campoOggetto.text, campoCorpo.text);
|
||||
if (motivo.length > 0) {
|
||||
page.errore = motivo;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Name: harbour-grumpydove
|
||||
Summary: Eudora-style mail interface, mobile prototype
|
||||
Version: 0.6.3
|
||||
Version: 0.6.4
|
||||
Release: 1
|
||||
Group: Qt/Qt
|
||||
# Codice EUPL-1.2; le icone vengono dagli sprite di Eudora, BSD 3-Clause
|
||||
@@ -27,6 +27,11 @@ Icons come from the original project's Eudora bitmaps (BSD 3-Clause,
|
||||
Computer History Museum).
|
||||
|
||||
%changelog
|
||||
* Wed Nov 11 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.6.4-1
|
||||
- Il mittente (From) e' un campo della pagina di composizione, precompilato da
|
||||
Account: il salvataggio del campo in Account non arrivava al file, e l'invio
|
||||
si bloccava senza che si vedesse dove metterci le mani. Scritto una volta,
|
||||
resta per le volte dopo
|
||||
* Wed Nov 11 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.6.3-1
|
||||
- Se l'invio si ferma per mittente o SMTP, sotto l'errore compare "Apri
|
||||
Account": il messaggio del motore ("The From line has no address") non dice
|
||||
|
||||
+17
-5
@@ -435,8 +435,8 @@ QString EngineBridge::cartelleViste()
|
||||
// con il flag di coda, claim estrae quelli da mandare, send_start parla con il
|
||||
// server SMTP e send_poll riporta un messaggio per volta.
|
||||
QString EngineBridge::sendMessage(const QString &to, const QString &cc,
|
||||
const QString &bcc, const QString &oggetto,
|
||||
const QString &corpo)
|
||||
const QString &bcc, const QString &da,
|
||||
const QString &oggetto, const QString &corpo)
|
||||
{
|
||||
if (!s_compose || !s_claim || !s_send_start || !s_send_poll)
|
||||
return tr("Il motore non è pronto");
|
||||
@@ -453,12 +453,24 @@ QString EngineBridge::sendMessage(const QString &to, const QString &cc,
|
||||
return tr("Manca il destinatario");
|
||||
|
||||
// Il From: senza, il messaggio parte senza mittente e il motore non
|
||||
// trova nemmeno la personalità a cui appartiene.
|
||||
QString from = m_settings ? m_settings->mittente().trimmed() : QString();
|
||||
// trova nemmeno la personalità a cui appartiene. Arriva dalla pagina di
|
||||
// composizione, che lo mostra: cosi' non dipende dal fatto che il campo
|
||||
// in Account sia stato salvato.
|
||||
QString from = da.trimmed();
|
||||
if (from.isEmpty() && m_settings)
|
||||
from = m_settings->mittente().trimmed();
|
||||
if (from.isEmpty() && m_settings && m_settings->persona().contains(QLatin1Char('@')))
|
||||
from = m_settings->persona().trimmed();
|
||||
if (from.isEmpty())
|
||||
return tr("Manca l'indirizzo del mittente: Impostazioni → Account");
|
||||
return tr("Manca l'indirizzo del mittente: scrivilo nel campo «Da»");
|
||||
if (from.indexOf(QLatin1Char('@')) < 1)
|
||||
return tr("«%1» non è un indirizzo: manca la parte dopo la @").arg(from);
|
||||
|
||||
// Se l'hai scritto qui, vale anche per le prossime volte.
|
||||
if (m_settings && m_settings->mittente().compare(from, Qt::CaseInsensitive) != 0) {
|
||||
m_settings->setMittente(from);
|
||||
m_settings->save();
|
||||
}
|
||||
|
||||
// Il foglio che il motore sa leggere: campi "Nome: valore", riga vuota,
|
||||
// poi il corpo (Mail_Compose.Parse).
|
||||
|
||||
+2
-2
@@ -69,8 +69,8 @@ public:
|
||||
Q_INVOKABLE int folderOut();
|
||||
// Manda un messaggio: stringa vuota se e' partito, altrimenti il motivo.
|
||||
Q_INVOKABLE QString sendMessage(const QString &to, const QString &cc,
|
||||
const QString &bcc, const QString &oggetto,
|
||||
const QString &corpo);
|
||||
const QString &bcc, const QString &da,
|
||||
const QString &oggetto, const QString &corpo);
|
||||
|
||||
signals:
|
||||
void ready();
|
||||
|
||||
+2
-2
@@ -24,9 +24,9 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
|
||||
app->setOrganizationName(QStringLiteral("harbour"));
|
||||
app->setApplicationName(QStringLiteral("grumpydove"));
|
||||
app->setApplicationVersion(QStringLiteral("0.6.3"));
|
||||
app->setApplicationVersion(QStringLiteral("0.6.4"));
|
||||
|
||||
qDebug() << "harbour-grumpydove v0.6.3 build" << __DATE__ << __TIME__;
|
||||
qDebug() << "harbour-grumpydove v0.6.4 build" << __DATE__ << __TIME__;
|
||||
|
||||
// La sandbox di Sailfish (SailJail) non lascia vedere ~/Mail, ma il motore
|
||||
// legge il percorso del Maildir da GRUMPYDOVE_MAIL: si punta alla cartella
|
||||
|
||||
Reference in new issue
Block a user