X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fignorelistsettingspage.cpp;h=a832e5d0adbb135613958d4636a1e1018fbe1f50;hp=61f0864565837d1c8d7b72b776c0deca510cd469;hb=66c5feaf7c9f480f06dfb45df2cf54e44c8b487b;hpb=f19fea582ace1d8f3dfe29c1096c48758079e56e diff --git a/src/qtui/settingspages/ignorelistsettingspage.cpp b/src/qtui/settingspages/ignorelistsettingspage.cpp index 61f08645..a832e5d0 100644 --- a/src/qtui/settingspages/ignorelistsettingspage.cpp +++ b/src/qtui/settingspages/ignorelistsettingspage.cpp @@ -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() {