diff --git a/src/qtgui/guiutils.cpp b/src/qtgui/guiutils.cpp index 3f72b3fc..846a779f 100644 --- a/src/qtgui/guiutils.cpp +++ b/src/qtgui/guiutils.cpp @@ -119,11 +119,11 @@ void rwSettings(bool writing) SETTING_RW(prefs.showResultsAsTable, "/Recoll/prefs/showResultsAsTable", Bool, false); SETTING_RW(prefs.maxhltextmbs, "/Recoll/prefs/preview/maxhltextmbs", Int, 3); - // This used to be plainPre in the file, but there is no gui control for - // this and the initial default was wrong (true). So switched to plainPre1 - // so that we can start again. + + // The default is true because I find it more often useful to keep + // indentation than to fold lines. Mileage may vary. SETTING_RW(prefs.previewPlainPre, - "/Recoll/prefs/preview/plainPre1", Bool, false); + "/Recoll/prefs/preview/plainPre", Bool, true); SETTING_RW(prefs.qtermcolor, "/Recoll/prefs/qtermcolor", String, "blue"); if (!writing && prefs.qtermcolor == "") prefs.qtermcolor = "blue"; diff --git a/src/qtgui/uiprefs.ui b/src/qtgui/uiprefs.ui index 5633cd3e..d5463812 100644 --- a/src/qtgui/uiprefs.ui +++ b/src/qtgui/uiprefs.ui @@ -274,6 +274,19 @@ + + + + Use <PRE> tags instead of <BR>to display plain text as html. + + + Lines in PRE text are not folded. Using BR loses indentation. + + + false + + + diff --git a/src/qtgui/uiprefs_w.cpp b/src/qtgui/uiprefs_w.cpp index c736bed1..dc1df591 100644 --- a/src/qtgui/uiprefs_w.cpp +++ b/src/qtgui/uiprefs_w.cpp @@ -100,6 +100,7 @@ void UIPrefsDialog::setFromPrefs() keepSortCB->setChecked(prefs.keepSort); previewHtmlCB->setChecked(prefs.previewHtml); + previewPlainPreCB->setChecked(prefs.previewPlainPre); // Query terms color qtermColorLE->setText(prefs.qtermcolor); @@ -203,6 +204,7 @@ void UIPrefsDialog::accept() prefs.useDesktopOpen = useDesktopOpenCB->isChecked(); prefs.keepSort = keepSortCB->isChecked(); prefs.previewHtml = previewHtmlCB->isChecked(); + prefs.previewPlainPre = previewPlainPreCB->isChecked(); prefs.syntAbsLen = syntlenSB->value(); prefs.syntAbsCtx = syntctxSB->value();