+
+void ChatMonitorSettingsPage::setRequesterType(const QVariant& v)
+{
+ bool usingAsNeededRequester = (v.toInt() == BacklogRequester::AsNeeded);
+ ui.showBacklogUnavailableDetails->setVisible(usingAsNeededRequester);
+ if (usingAsNeededRequester) {
+ ui.showBacklog->setText(tr("Show messages from backlog (not available)"));
+ }
+ else {
+ ui.showBacklog->setText(tr("Show messages from backlog"));
+ }
+}
+
+void ChatMonitorSettingsPage::on_showBacklogUnavailableDetails_clicked()
+{
+ // Explain that backlog fetching is disabled, so backlog messages won't show up
+ //
+ // Technically, backlog messages *will* show up once fetched, e.g. after clicking on a buffer.
+ // This might be too trivial of a detail to warrant explaining, though.
+ QMessageBox::information(this,
+ tr("Messages from backlog are not fetched"),
+ QString("<p>%1</p><p>%2</p>")
+ .arg(tr("No initial backlog will be fetched when using the backlog request method of <i>%1</i>.")
+ .arg(tr("Only fetch when needed").replace(" ", " ")),
+ tr("Configure this in the <i>%1</i> settings page.")
+ .arg(tr("Backlog Fetching").replace(" ", " "))
+ )
+ );
+ // Re-use translations of "Only fetch when needed" and "Backlog Fetching" as this is a
+ // word-for-word reference, forcing all spaces to be non-breaking
+}