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