From c350ea8fbfb2d8baf5fb49812a04b7c0e13d1b81 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 14 Jun 2024 10:43:33 +0200 Subject: Minor cosmetic improvements --- src/gui.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui.cpp b/src/gui.cpp index ed0f54c..08b4475 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -25,6 +25,7 @@ static QString STATE_UPLOAD_DONE("UPLOAD_DONE"); // dnbd3-fuse signaled merge re static QString STATE_PROCESSING("PROCESSING"); // Hashing, renaming, creating DB entry static QString STATE_ERROR("ERROR"); static QString STATE_COMPLETELY_DONE("COMPLETELY_DONE"); +static QString STATE_CONN_ERROR("CONN_ERROR"); // Not a remote error, used when remote is unreachable Gui::Gui(const QString &urlbase, const QString &uuid, int dnbd3pid, const QString &statusFile, QWidget *parent) : QDialog(parent) @@ -71,6 +72,7 @@ void Gui::queryRemoteStatus() } else if (str.length() > 0 && str.length() < 160) { _status->setText(QLatin1String("Server: ") + str); } else { + _remoteState = STATE_CONN_ERROR; _status->setText(tr("Fehler beim Statusabruf")); } return; @@ -200,6 +202,9 @@ void Gui::updateButtons() _btnAbort->setEnabled(false); _btnOk->setEnabled(true); _btnOk->setText(tr("Schließen")); + QFont f(_btnOk->font()); + f.setBold(true); + _btnOk->setFont(f); } else if (_remoteState == STATE_UPLOAD_DONE) { setProgressState(tr("Änderungen hochladen"), 100, QString()); _btnAbort->setEnabled(true); @@ -209,6 +214,9 @@ void Gui::updateButtons() _btnOk->setEnabled(false); _tmrStatus->stop(); _btnAbort->setText(tr("Schließen")); + QFont f(_btnAbort->font()); + f.setBold(true); + _btnAbort->setFont(f); } else { _btnAbort->setEnabled(true); _btnOk->setEnabled(false); -- cgit v1.2.3-55-g7522