diff options
author | Simon Rettberg | 2024-06-14 10:43:33 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-06-14 10:43:33 +0200 |
commit | c350ea8fbfb2d8baf5fb49812a04b7c0e13d1b81 (patch) | |
tree | 9e8a4f84740717ed399e285ee00e5a4836b76334 | |
parent | Lower polling interval from 2500 to 2000 ms (diff) | |
download | cowgui-master.tar.gz cowgui-master.tar.xz cowgui-master.zip |
-rw-r--r-- | src/gui.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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); |