Don't show start/stop button when feature disabled

This commit is contained in:
Martchus 2017-01-03 00:00:05 +01:00
parent 5a3083ebe3
commit edba991d89
2 changed files with 4 additions and 1 deletions

View File

@ -45,7 +45,7 @@ list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_DIRS})
# link also explicitely against the following Qt 5 modules
list(APPEND ADDITIONAL_QT_MODULES Network)
# configure support for D-Bus notifications
# configure support for controlling Syncthing via systemd service
option(SYSTEMD_SUPPORT "enables support for controlling Syncthing systemd service" ${UNIX})
if(DBUS_NOTIFICATIONS)
list(APPEND HEADER_FILES

View File

@ -120,6 +120,9 @@ TrayWidget::TrayWidget(TrayMenu *parent) :
// setup other widgets
m_ui->notificationsPushButton->setHidden(true);
m_ui->trafficIconLabel->setPixmap(QIcon::fromTheme(QStringLiteral("network-card"), QIcon(QStringLiteral(":/icons/hicolor/scalable/devices/network-card.svg"))).pixmap(32));
#ifndef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD
delete m_ui->startStopPushButton;
#endif
// connect signals and slots
connect(m_ui->statusPushButton, &QPushButton::clicked, this, &TrayWidget::changeStatus);