From 367df942c8a8b4ad351f60cac23e42a75118e2e1 Mon Sep 17 00:00:00 2001 From: Carlo Baratto Date: Fri, 20 Nov 2026 22:05:33 +0100 Subject: [PATCH] Comandi: esito leggibile e log del segno sottoscrizione (0.23.7) Dopo un comando al server il messaggio diceva 'Nessun messaggio nuovo', che faceva credere a un fallimento. Ora dice 'Fatto: SUBSCRIBE'. E il motore scrive nel log se il segno .grumpydove-unsubscribed e' stato tolto e dove. --- engine/patch_engine.py | 3 +++ rpm/harbour-grumpydove.spec | 2 +- src/enginebridge.cpp | 12 +++++++++++- src/enginebridge.h | 1 + src/main.cpp | 4 ++-- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/engine/patch_engine.py b/engine/patch_engine.py index ba6da37..3a532d0 100644 --- a/engine/patch_engine.py +++ b/engine/patch_engine.py @@ -277,6 +277,9 @@ with Mail_Log;''', if Op = "SUBSCRIBE" then if Ada.Directories.Exists (Mark) then GNAT.OS_Lib.Delete_File (Mark, Gone); + Mail_Log.Write ("subscribe: segno tolto in " & Dir); + else + Mail_Log.Write ("subscribe: nessun segno in " & Dir); end if; elsif not Ada.Directories.Exists (Mark) then Fd := GNAT.OS_Lib.Create_File (Mark, GNAT.OS_Lib.Binary); diff --git a/rpm/harbour-grumpydove.spec b/rpm/harbour-grumpydove.spec index 9787033..2254291 100644 --- a/rpm/harbour-grumpydove.spec +++ b/rpm/harbour-grumpydove.spec @@ -1,6 +1,6 @@ Name: harbour-grumpydove Summary: Eudora-style mail interface, mobile prototype -Version: 0.23.6 +Version: 0.23.7 Release: 1 Group: Qt/Qt # Codice EUPL-1.2; le icone vengono dagli sprite di Eudora, BSD 3-Clause diff --git a/src/enginebridge.cpp b/src/enginebridge.cpp index ec71899..1b61b21 100644 --- a/src/enginebridge.cpp +++ b/src/enginebridge.cpp @@ -219,7 +219,16 @@ void EngineBridge::pollMail() if (!running) { m_poll->stop(); m_checking = false; - if (m_lastResult.isEmpty()) m_lastResult = tr("Nessun messaggio nuovo"); + if (m_lastResult.isEmpty()) { + // Un comando (sottoscrivere, rinominare, creare) non porta + // messaggi: dire "Nessun messaggio nuovo" faceva credere che non + // fosse successo niente. + if (!m_comando.isEmpty()) + m_lastResult = tr("Fatto: %1").arg(m_comando); + else + m_lastResult = tr("Nessun messaggio nuovo"); + } + m_comando.clear(); if (s_rescan) s_rescan(); // le cartelle possono essere nuove dropAllRows(); // e i messaggi sono cambiati // I file appena copiati vanno presi nell'indice del motore: senza @@ -381,6 +390,7 @@ QString EngineBridge::comandoServer(const QString &op, int folder, emit checkingChanged(); m_lastResult.clear(); emit lastResultChanged(); + m_comando = op; s_imap_start(bytes.constData(), bytes.size()); m_poll->start(); logInvio(QString("comando server: %1 %2 (%3)").arg(op, place, argomento)); diff --git a/src/enginebridge.h b/src/enginebridge.h index c153e7f..c26b0bd 100644 --- a/src/enginebridge.h +++ b/src/enginebridge.h @@ -299,6 +299,7 @@ private: AccountSettings *m_settings; QTimer *m_poll; QString m_lastResult; + QString m_comando; // comando al server in corso, se c'e' bool m_checking; // Gli allegati dell'ultimo messaggio aperto: letti una volta sola, perché // il motore li ricostruisce da capo a ogni chiamata. diff --git a/src/main.cpp b/src/main.cpp index d951955..07df70e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,9 +32,9 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) app->setOrganizationName(QStringLiteral("harbour")); app->setApplicationName(QStringLiteral("grumpydove")); - app->setApplicationVersion(QStringLiteral("0.23.6")); + app->setApplicationVersion(QStringLiteral("0.23.7")); - qDebug() << "harbour-grumpydove v0.23.6 build" << __DATE__ << __TIME__; + qDebug() << "harbour-grumpydove v0.23.7 build" << __DATE__ << __TIME__; // Maildir, log, rubrica e liste dei filtri nella cartella dati dell'app: // la sandbox non lascia vedere ~/Mail né scrivere sotto HOME, e cambiare