X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fnotificationssettingspage.cpp;h=78e53348d2da712b76fe6be788ad83733dc9998a;hp=2c9585e46dfb0ba28244ec9c4868e41b42444500;hb=f824db0e31b54969e0b7fa0b5405b1e9173d482c;hpb=dd72455b0cdade40fe5ff0cef7d464d71cdca45f diff --git a/src/qtui/settingspages/notificationssettingspage.cpp b/src/qtui/settingspages/notificationssettingspage.cpp index 2c9585e4..78e53348 100644 --- a/src/qtui/settingspages/notificationssettingspage.cpp +++ b/src/qtui/settingspages/notificationssettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel IRC Team * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -25,22 +25,27 @@ #include "qtui.h" NotificationsSettingsPage::NotificationsSettingsPage(QWidget *parent) - : SettingsPage(tr("Behaviour"), tr("Notifications"), parent) { + : SettingsPage(tr("Behaviour"), tr("Notifications"), parent), + _hasDefaults(false) +{ QVBoxLayout *layout = new QVBoxLayout(this); foreach(AbstractNotificationBackend *backend, QtUi::notificationBackends()) { - SettingsPage *cw = backend->configWidget(); + SettingsPage *cw = backend->createConfigWidget(); if(cw) { + cw->setParent(this); _configWidgets.append(cw); layout->addWidget(cw); connect(cw, SIGNAL(changed(bool)), SLOT(widgetHasChanged())); + _hasDefaults |= cw->hasDefaults(); } } layout->addStretch(1); + load(); } bool NotificationsSettingsPage::hasDefaults() const { - return true; + return _hasDefaults; } void NotificationsSettingsPage::defaults() {