X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsystraynotificationbackend.cpp;h=b6d1ff5f7811a55227aa191bccb463969f95a12b;hp=82d9f96d68c16c007232487fd812cf2511b8f614;hb=ffc0d75cea1690acb5428fb4f1ee0e82b5f4c9ef;hpb=a9cc264bc4ee3e51ede21b79276704d4043e3656 diff --git a/src/qtui/systraynotificationbackend.cpp b/src/qtui/systraynotificationbackend.cpp index 82d9f96d..b6d1ff5f 100644 --- a/src/qtui/systraynotificationbackend.cpp +++ b/src/qtui/systraynotificationbackend.cpp @@ -21,13 +21,14 @@ #include #include #include -#include +#include #include "systraynotificationbackend.h" #include "client.h" #include "clientsettings.h" #include "icon.h" +#include "iconloader.h" #include "mainwin.h" #include "networkmodel.h" #include "qtui.h" @@ -130,23 +131,17 @@ SettingsPage *SystrayNotificationBackend::createConfigWidget() const { /***************************************************************************/ SystrayNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent) : SettingsPage("Internal", "SystrayNotification", parent) { - QGroupBox *groupBox = new QGroupBox(tr("System Tray Icon"), this); - _animateBox = new QCheckBox(tr("Animate")); - connect(_animateBox, SIGNAL(toggled(bool)), this, SLOT(widgetChanged())); - _showBubbleBox = new QCheckBox(tr("Show bubble")); + _showBubbleBox = new QCheckBox(tr("Show a message in a popup")); + _showBubbleBox->setIcon(SmallIcon("dialog-information")); connect(_showBubbleBox, SIGNAL(toggled(bool)), this, SLOT(widgetChanged())); - QVBoxLayout *layout = new QVBoxLayout(groupBox); - layout->addWidget(_animateBox); + QHBoxLayout *layout = new QHBoxLayout(this); layout->addWidget(_showBubbleBox); - layout->addStretch(1); - QVBoxLayout *globalLayout = new QVBoxLayout(this); - globalLayout->addWidget(groupBox); - } void SystrayNotificationBackend::ConfigWidget::widgetChanged() { - bool changed = (_showBubble != _showBubbleBox->isChecked() || _animate != _animateBox->isChecked()); - if(changed != hasChanged()) setChangedState(changed); + bool changed = (_showBubble != _showBubbleBox->isChecked()); + if(changed != hasChanged()) + setChangedState(changed); } bool SystrayNotificationBackend::ConfigWidget::hasDefaults() const { @@ -154,23 +149,19 @@ bool SystrayNotificationBackend::ConfigWidget::hasDefaults() const { } void SystrayNotificationBackend::ConfigWidget::defaults() { - _animateBox->setChecked(true); _showBubbleBox->setChecked(false); widgetChanged(); } void SystrayNotificationBackend::ConfigWidget::load() { NotificationSettings s; - _animate = s.value("Systray/Animate", true).toBool(); _showBubble = s.value("Systray/ShowBubble", false).toBool(); - _animateBox->setChecked(_animate); _showBubbleBox->setChecked(_showBubble); setChangedState(false); } void SystrayNotificationBackend::ConfigWidget::save() { NotificationSettings s; - s.setValue("Systray/Animate", _animateBox->isChecked()); s.setValue("Systray/ShowBubble", _showBubbleBox->isChecked()); load(); }