Categories in the settings dialog are now clickable
[quassel.git] / src / qtui / settingspages / notificationssettingspage.cpp
index 2c9585e..9a98d5e 100644 (file)
@@ -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  *
 #include "qtui.h"
 
 NotificationsSettingsPage::NotificationsSettingsPage(QWidget *parent)
-  : SettingsPage(tr("Behaviour"), tr("Notifications"), parent) {
+  : SettingsPage(tr("Appearance"), 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() {