Add a setting to hide inactive networks in buffer views
[quassel.git] / src / common / bufferviewconfig.cpp
index c295b70..2b6f340 100644 (file)
@@ -29,6 +29,7 @@ BufferViewConfig::BufferViewConfig(int bufferViewId, QObject *parent)
     _addNewBuffersAutomatically(true),
     _sortAlphabetically(true),
     _hideInactiveBuffers(false),
+    _hideInactiveNetworks(false),
     _disableDecoration(false),
     _allowedBufferTypes(BufferInfo::StatusBuffer | BufferInfo::ChannelBuffer | BufferInfo::QueryBuffer | BufferInfo::GroupBuffer),
     _minimumActivity(0)
@@ -133,6 +134,16 @@ void BufferViewConfig::setHideInactiveBuffers(bool hideInactiveBuffers)
     emit configChanged();
 }
 
+void BufferViewConfig::setHideInactiveNetworks(bool hideInactiveNetworks)
+{
+    if (_hideInactiveNetworks == hideInactiveNetworks)
+        return;
+
+    _hideInactiveNetworks = hideInactiveNetworks;
+    SYNC(ARG(hideInactiveNetworks))
+    emit configChanged();
+}
+
 
 QVariantList BufferViewConfig::initBufferList() const
 {