summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainwindow.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 1e988bf..a443476 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -76,6 +76,17 @@ MainWindow::MainWindow(Database& db)
const auto& html = viewer->getHtml();
client.writeData(title, html.toUtf8());
});
+ act->setEnabled(false);
+ QObject::connect(&client, &Client::isConnected,
+ [act]()
+ {
+ act->setEnabled(true);
+ });
+ QObject::connect(&client, &Client::isDisconnected,
+ [act]()
+ {
+ act->setEnabled(false);
+ });
}
addToolBar(Qt::TopToolBarArea, toolbar);