GUI: warning when opening temp file: really remember the preference from the dialog
This commit is contained in:
parent
c11cac2868
commit
a90c4bf698
@ -306,6 +306,7 @@ void rwSettings(bool writing)
|
|||||||
SETTING_RW(prefs.showTrayIcon, "/Recoll/prefs/showTrayIcon", Bool, false);
|
SETTING_RW(prefs.showTrayIcon, "/Recoll/prefs/showTrayIcon", Bool, false);
|
||||||
SETTING_RW(prefs.closeToTray, "/Recoll/prefs/closeToTray", Bool, false);
|
SETTING_RW(prefs.closeToTray, "/Recoll/prefs/closeToTray", Bool, false);
|
||||||
SETTING_RW(prefs.trayMessages, "/Recoll/prefs/trayMessages", Bool, false);
|
SETTING_RW(prefs.trayMessages, "/Recoll/prefs/trayMessages", Bool, false);
|
||||||
|
// See qxtconfirmationmessage. Needs to be -1 for the dialog to show.
|
||||||
SETTING_RW(prefs.showTempFileWarning, "Recoll/prefs/showTempFileWarning",
|
SETTING_RW(prefs.showTempFileWarning, "Recoll/prefs/showTempFileWarning",
|
||||||
Int, -1);
|
Int, -1);
|
||||||
|
|
||||||
|
|||||||
@ -143,6 +143,7 @@ class PrefsPack {
|
|||||||
bool closeToTray{false};
|
bool closeToTray{false};
|
||||||
bool trayMessages{false};
|
bool trayMessages{false};
|
||||||
|
|
||||||
|
// See qxtconfirmationmessage. Needs to be -1 for the dialog to show
|
||||||
int showTempFileWarning;
|
int showTempFileWarning;
|
||||||
|
|
||||||
// Advanced search window clause list state
|
// Advanced search window clause list state
|
||||||
|
|||||||
@ -375,6 +375,11 @@ void RclMain::startNativeViewer(Rcl::Doc doc, int pagenum, QString term)
|
|||||||
confirm.setSettingsPath("Recoll/prefs");
|
confirm.setSettingsPath("Recoll/prefs");
|
||||||
confirm.setOverrideSettingsKey("showTempFileWarning");
|
confirm.setOverrideSettingsKey("showTempFileWarning");
|
||||||
confirm.exec();
|
confirm.exec();
|
||||||
|
// Pita: need to keep the prefs struct in sync, else the value
|
||||||
|
// will be clobbered on program exit.
|
||||||
|
QSettings settings("Recoll.org", "recoll");
|
||||||
|
prefs.showTempFileWarning =
|
||||||
|
settings.value("Recoll/prefs/showTempFileWarning").toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are not called with a page number (which would happen for a call
|
// If we are not called with a page number (which would happen for a call
|
||||||
|
|||||||
@ -253,6 +253,7 @@ void SSearch::onCompleterShown()
|
|||||||
// nothing was typed. So we disable the completion if a
|
// nothing was typed. So we disable the completion if a
|
||||||
bool SSearch::eventFilter(QObject *target, QEvent *event)
|
bool SSearch::eventFilter(QObject *target, QEvent *event)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(target);
|
||||||
LOGDEB1("SSearch::eventFilter: event\n");
|
LOGDEB1("SSearch::eventFilter: event\n");
|
||||||
if (event->type() != QEvent::KeyPress) {
|
if (event->type() != QEvent::KeyPress) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -154,6 +154,7 @@ void UIPrefsDialog::setFromPrefs()
|
|||||||
closeToTrayCB->setChecked(prefs.closeToTray);
|
closeToTrayCB->setChecked(prefs.closeToTray);
|
||||||
trayMessagesCB->setChecked(prefs.trayMessages);
|
trayMessagesCB->setChecked(prefs.trayMessages);
|
||||||
|
|
||||||
|
// See qxtconfirmationmessage. Needs to be -1 for the dialog to show.
|
||||||
showTempFileWarningCB->setChecked(prefs.showTempFileWarning == -1);
|
showTempFileWarningCB->setChecked(prefs.showTempFileWarning == -1);
|
||||||
anchorTamilHackCB->setChecked(settings.value("anchorSpcHack", 0).toBool());
|
anchorTamilHackCB->setChecked(settings.value("anchorSpcHack", 0).toBool());
|
||||||
previewHtmlCB->setChecked(prefs.previewHtml);
|
previewHtmlCB->setChecked(prefs.previewHtml);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user