+void DomainSettingsDialog::populateDomStorageLabel() const
+{
+ // Populate the label according to the currently selected index.
+ switch (domStorageComboBoxPointer->currentIndex())
+ {
+ case (DomainsDatabase::SYSTEM_DEFAULT):
+ {
+ // Set the text according to the system default.
+ if (Settings::domStorageEnabled())
+ domStorageLabelPointer->setText(i18nc("Domain settings DOM storage label.", "DOM storage enabled"));
+ else
+ domStorageLabelPointer->setText(i18nc("Domain settings DOM storage label.", "DOM storage disabled"));
+
+ // Reset the palette.
+ domStorageWidgetPointer->setPalette(defaultPalette);
+
+ break;
+ }
+
+ case (DomainsDatabase::DISABLED):
+ {
+ // Set the disabled text in bold.
+ domStorageLabelPointer->setText(i18nc("Domain settings DOM storage label. The <b> tags should be retained.", "<b>DOM storage disabled</b>"));
+
+ // Set the palette.
+ domStorageWidgetPointer->setPalette(highlightedPalette);
+
+ break;
+ }
+
+ case (DomainsDatabase::ENABLED):
+ {
+ // Set the enabled text in bold.
+ domStorageLabelPointer->setText(i18nc("Domain settings DOM storage label. The <b> tags should be retained.", "<b>DOM storage enabled</b>"));
+
+ // Set the palette.
+ domStorageWidgetPointer->setPalette(highlightedPalette);
+
+ break;
+ }
+ }
+}
+