X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fbufferviewconfig.cpp;h=935d175f8f51f310f1235a04c334d9acca43a26b;hp=27d329767c0da3238ba87480aa68f86474e5336b;hb=731ec69d4608ba95e3ae4f154b8ca1852e1db2e5;hpb=a54a7c410fa99f63fbb79d608cfe0c211cfee1df diff --git a/src/common/bufferviewconfig.cpp b/src/common/bufferviewconfig.cpp index 27d32976..935d175f 100644 --- a/src/common/bufferviewconfig.cpp +++ b/src/common/bufferviewconfig.cpp @@ -28,6 +28,7 @@ BufferViewConfig::BufferViewConfig(int bufferViewId, QObject *parent) _addNewBuffersAutomatically(true), _sortAlphabetically(true), _hideInactiveBuffers(false), + _disableDecoration(false), _allowedBufferTypes(BufferInfo::StatusBuffer | BufferInfo::ChannelBuffer | BufferInfo::QueryBuffer | BufferInfo::GroupBuffer), _minimumActivity(0) { @@ -36,7 +37,8 @@ BufferViewConfig::BufferViewConfig(int bufferViewId, QObject *parent) BufferViewConfig::BufferViewConfig(int bufferViewId, const QVariantMap &properties, QObject *parent) : SyncableObject(parent), - _bufferViewId(bufferViewId) + _bufferViewId(bufferViewId), + _disableDecoration(false) // FIXME remove as soon as we have bumped the protocol version to v8 { fromVariantMap(properties); setObjectName(QString::number(bufferViewId)); @@ -74,6 +76,14 @@ void BufferViewConfig::setSortAlphabetically(bool sortAlphabetically) { emit sortAlphabeticallySet(sortAlphabetically); } +void BufferViewConfig::setDisableDecoration(bool disableDecoration) { + if(_disableDecoration == disableDecoration) + return; + + _disableDecoration = disableDecoration; + emit disableDecorationSet(disableDecoration); +} + void BufferViewConfig::setAllowedBufferTypes(int bufferTypes) { if(_allowedBufferTypes == bufferTypes) return; @@ -177,10 +187,10 @@ void BufferViewConfig::addBuffer(const BufferId &bufferId, int pos) { if(_removedBuffers.contains(bufferId)) _removedBuffers.remove(bufferId); - + if(_temporarilyRemovedBuffers.contains(bufferId)) _temporarilyRemovedBuffers.remove(bufferId); - + _buffers.insert(pos, bufferId); emit bufferAdded(bufferId, pos); } @@ -201,7 +211,7 @@ void BufferViewConfig::moveBuffer(const BufferId &bufferId, int pos) { void BufferViewConfig::removeBuffer(const BufferId &bufferId) { if(_buffers.contains(bufferId)) _buffers.removeAt(_buffers.indexOf(bufferId)); - + if(_removedBuffers.contains(bufferId)) _removedBuffers.remove(bufferId); @@ -216,7 +226,7 @@ void BufferViewConfig::removeBufferPermanently(const BufferId &bufferId) { if(_temporarilyRemovedBuffers.contains(bufferId)) _temporarilyRemovedBuffers.remove(bufferId); - + _removedBuffers << bufferId; emit bufferPermanentlyRemoved(bufferId);