connect(ui.hideInactiveBuffers, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged()));
connect(ui.networkSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(widgetHasChanged()));
connect(ui.minimumActivitySelector, SIGNAL(currentIndexChanged(int)), this, SLOT(widgetHasChanged()));
+
+ connect(ui.networkSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(enableStatusBuffers(int)));
}
BufferViewSettingsPage::~BufferViewSettingsPage() {
loadConfig(config);
}
+void BufferViewSettingsPage::enableStatusBuffers(int networkIdx) {
+ // we don't show a status buffer if we show multiple networks as selecting
+ // the network is the same as selecting the status buffer.
+ ui.onlyStatusBuffers->setEnabled(networkIdx != 0);
+}
+
void BufferViewSettingsPage::on_addBufferView_clicked() {
if(!Client::bufferViewManager())
return;
void newBufferView(const QString &bufferViewName);
void updateBufferView();
+ void enableStatusBuffers(int networkIdx);
+
void on_addBufferView_clicked();
void on_renameBufferView_clicked();
void on_deleteBufferView_clicked();
<layout class="QVBoxLayout" >
<item>
<widget class="QCheckBox" name="onlyStatusBuffers" >
+ <property name="toolTip" >
+ <string>This option is not available when all Networks are visible.
+In this mode no separate status buffer is displayed.</string>
+ </property>
<property name="text" >
<string>Status Buffers</string>
</property>
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.