X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatmonitorview.cpp;h=5501412e70eb0d639621fdcb0e7b29b7ffa20c9c;hp=6e0077820d739966cb109af60f8191726e753d1e;hb=1d9dfeff6b2531ff99e0d12669b3a1dae393e768;hpb=16e4a21c1292448c1a524010d70f6e59b84802f4 diff --git a/src/qtui/chatmonitorview.cpp b/src/qtui/chatmonitorview.cpp index 6e007782..5501412e 100644 --- a/src/qtui/chatmonitorview.cpp +++ b/src/qtui/chatmonitorview.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -29,16 +29,21 @@ #include "chatitem.h" #include "chatscene.h" #include "client.h" +#include "iconloader.h" #include "networkmodel.h" #include "buffermodel.h" #include "messagemodel.h" #include "qtuisettings.h" +#include "settingspagedlg.h" +#include "settingspages/chatmonitorsettingspage.h" +#include "clientignorelistmanager.h" ChatMonitorView::ChatMonitorView(ChatMonitorFilter *filter, QWidget *parent) : ChatView(filter, parent), _filter(filter) { scene()->setSenderCutoffMode(ChatScene::CutoffLeft); + connect(Client::instance(), SIGNAL(coreConnectionStateChanged(bool)), this, SLOT(coreConnectionStateChanged(bool))); } void ChatMonitorView::addActionsToMenu(QMenu *menu, const QPointF &pos) { @@ -61,6 +66,9 @@ void ChatMonitorView::addActionsToMenu(QMenu *menu, const QPointF &pos) { showBufferAction->setChecked(_filter->showFields() & ChatMonitorFilter::BufferField); showBufferAction->setData(ChatMonitorFilter::BufferField); } + + menu->addSeparator(); + menu->addAction(SmallIcon("configure"), tr("Configure..."), this, SLOT(showSettingsPage())); } void ChatMonitorView::mouseDoubleClickEvent(QMouseEvent *event) { @@ -93,3 +101,15 @@ void ChatMonitorView::showFieldsChanged(bool checked) { else _filter->removeShowField(showAction->data().toInt()); } + +void ChatMonitorView::showSettingsPage() { + SettingsPageDlg dlg(new ChatMonitorSettingsPage(), this); + dlg.exec(); +} + +// connect only after client is synced to core since ChatMonitorView is created before +// the ignoreListManager +void ChatMonitorView::coreConnectionStateChanged(bool connected) { + if(connected) + connect(Client::ignoreListManager(), SIGNAL(ignoreListChanged()), _filter, SLOT(invalidateFilter())); +}