qtui: Don't show config for DockManager if not available
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 14 Jun 2018 19:13:41 +0000 (21:13 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 15 Jun 2018 23:30:32 +0000 (01:30 +0200)
Instead of just disabling the checkbox for DockManager notifications,
hide the config widget if the D-Bus service is not available.
Otherwise it's really confusing to see a disabled option for a
notification backend that was basically retired 6 years ago.

src/qtui/dockmanagernotificationbackend.cpp

index da7e5ef..786593d 100644 (file)
@@ -182,7 +182,7 @@ DockManagerNotificationBackend::ConfigWidget::ConfigWidget(bool enabled, QWidget
 {
     QHBoxLayout *layout = new QHBoxLayout(this);
     layout->addWidget(enabledBox = new QCheckBox(tr("Mark dockmanager entry"), this));
-    enabledBox->setEnabled(enabled);
+    enabledBox->setVisible(enabled);
 
     connect(enabledBox, SIGNAL(toggled(bool)), SLOT(widgetChanged()));
 }