Mark missing settingsKey name as non-translateable
[quassel.git] / src / qtui / settingspages / ignorelistsettingspage.cpp
index 61f0864..a832e5d 100644 (file)
@@ -31,7 +31,7 @@
 #include "iconloader.h"
 
 IgnoreListSettingsPage::IgnoreListSettingsPage(QWidget *parent)
-  : SettingsPage(tr("Misc"), tr("Ignorelist"), parent)
+  : SettingsPage(tr("Misc"), tr("Ignore List"), parent)
 {
   ui.setupUi(this);
   _delegate = new IgnoreListDelegate(ui.ignoreListView);
@@ -108,7 +108,11 @@ void IgnoreListSettingsPage::deleteSelectedIgnoreRule() {
 
 void IgnoreListSettingsPage::newIgnoreRule(QString rule) {
   IgnoreListManager::IgnoreListItem newItem = IgnoreListManager::IgnoreListItem();
+  newItem.strictness = IgnoreListManager::SoftStrictness;
+  newItem.scope = IgnoreListManager::GlobalScope;
+  newItem.isRegEx = false;
   newItem.isActive = true;
+
   bool enableOkButton = false;
   if(!rule.isEmpty()) {
     // we're called from contextmenu
@@ -118,7 +122,6 @@ void IgnoreListSettingsPage::newIgnoreRule(QString rule) {
 
   IgnoreListEditDlg *dlg = new IgnoreListEditDlg(newItem, this, enableOkButton);
   dlg->enableOkButton(enableOkButton);
-
   while(dlg->exec() == QDialog::Accepted) {
     if(!_ignoreListModel.newIgnoreRule(dlg->ignoreListItem())) {
       if(QMessageBox::warning(this,
@@ -204,6 +207,8 @@ IgnoreListEditDlg::IgnoreListEditDlg(const IgnoreListManager::IgnoreListItem &it
   ui.setupUi(this);
   setAttribute(Qt::WA_DeleteOnClose, false);
   setModal(true);
+  // FIXME patch out the bugger completely if it's good without it
+  ui.isActiveCheckBox->hide();
 
   // setup buttongroups
   // this could be moved to .ui file with qt4.5
@@ -260,6 +265,7 @@ IgnoreListEditDlg::IgnoreListEditDlg(const IgnoreListManager::IgnoreListItem &it
   connect(ui.isActiveCheckBox, SIGNAL(stateChanged(int)), this, SLOT(widgetHasChanged()));
 
   connect(ui.buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(aboutToAccept()));
+  widgetHasChanged();
 }
 
 void IgnoreListEditDlg::widgetHasChanged() {