/***************************************************************************
- * 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 *
_config(0),
_sortOrder(Qt::AscendingOrder),
_userOfflineIcon(SmallIcon("user-offline")),
- _userAwayIcon(SmallIcon("user-away")),
+ _userAwayIcon(SmallIcon("user-away-extended")),
_userOnlineIcon(SmallIcon("user-online")),
_editMode(false),
_enableEditMode(tr("Edit Mode"), this)
if(!config) {
invalidate();
+ setObjectName("");
return;
}
disconnect(config(), SIGNAL(initDone()), this, SLOT(configInitialized()));
+ setObjectName(config()->bufferViewName());
+
invalidate();
emit configChanged();
}
if(config()->networkId().isValid() && config()->networkId() != source_bufferIndex.data(NetworkModel::NetworkIdRole).value<NetworkId>())
return false;
- if(!(config()->allowedBufferTypes() & (BufferInfo::Type)source_bufferIndex.data(NetworkModel::BufferTypeRole).toInt()))
+ int allowedBufferTypes = config()->allowedBufferTypes();
+ if(!config()->networkId().isValid())
+ allowedBufferTypes &= ~BufferInfo::StatusBuffer;
+ if(!(allowedBufferTypes & source_bufferIndex.data(NetworkModel::BufferTypeRole).toInt()))
return false;
// the following dynamic filters may not trigger if the buffer is currently selected.
emit _dataChanged(source_topLeft, source_bottomRight);
}
-// ******************************
-// Helper
-// ******************************
-bool bufferIdLessThan(const BufferId &left, const BufferId &right) {
+bool BufferViewFilter::bufferIdLessThan(const BufferId &left, const BufferId &right) {
Q_CHECK_PTR(Client::networkModel());
if(!Client::networkModel())
return true;