GUI code: added some marker comment to ease semi-automate adding a pref variable
This commit is contained in:
parent
f201f5ee1b
commit
53b8b7e237
@ -289,6 +289,8 @@ void rwSettings(bool writing)
|
||||
SETTING_RW(prefs.showTrayIcon, "/Recoll/prefs/showTrayIcon", Bool, false);
|
||||
SETTING_RW(prefs.closeToTray, "/Recoll/prefs/closeToTray", Bool, false);
|
||||
SETTING_RW(prefs.trayMessages, "/Recoll/prefs/trayMessages", Bool, false);
|
||||
/*INSERTHERE*/
|
||||
|
||||
// See qxtconfirmationmessage. Needs to be -1 for the dialog to show.
|
||||
SETTING_RW(prefs.showTempFileWarning, "Recoll/prefs/showTempFileWarning", Int, -1);
|
||||
|
||||
|
||||
@ -161,6 +161,7 @@ public:
|
||||
bool showTrayIcon{false};
|
||||
bool closeToTray{false};
|
||||
bool trayMessages{false};
|
||||
/*INSERTHERE*/
|
||||
|
||||
// See widgets/qxtconfirmationmessage.
|
||||
// Values -1/positive. -1 will trigger the dialog.
|
||||
|
||||
@ -1572,33 +1572,29 @@ May be slow for big documents.</string>
|
||||
<attribute name="title">
|
||||
<string>Misc</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="anchorTamilHackCB">
|
||||
<property name="toolTip">
|
||||
<string>The bug causes a strange circle characters to be displayed inside highlighted Tamil words. The workaround inserts an additional space character which appears to fix the problem.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Work around Tamil QTBUG-78923 by inserting space before anchor text</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QCheckBox" name="anchorTamilHackCB">
|
||||
<property name="toolTip">
|
||||
<string>The bug causes a strange circle characters to be displayed inside highlighted Tamil words. The workaround inserts an additional space character which appears to fix the problem.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Work around Tamil QTBUG-78923 by inserting space before anchor text</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -1665,7 +1661,7 @@ May be slow for big documents.</string>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="buttonGroup"/>
|
||||
<buttongroup name="buttonGroup_2"/>
|
||||
<buttongroup name="buttonGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
||||
@ -163,6 +163,7 @@ void UIPrefsDialog::setFromPrefs()
|
||||
trayMessagesCB->setEnabled(showTrayIconCB->checkState());
|
||||
closeToTrayCB->setChecked(prefs.closeToTray);
|
||||
trayMessagesCB->setChecked(prefs.trayMessages);
|
||||
/*INSERTHERE_LOAD*/
|
||||
|
||||
// See qxtconfirmationmessage. Needs to be -1 for the dialog to show.
|
||||
showTempFileWarningCB->setChecked(prefs.showTempFileWarning == -1);
|
||||
@ -438,6 +439,8 @@ void UIPrefsDialog::accept()
|
||||
m_mainWindow->enableTrayIcon(prefs.showTrayIcon);
|
||||
prefs.closeToTray = closeToTrayCB->isChecked();
|
||||
prefs.trayMessages = trayMessagesCB->isChecked();
|
||||
/*INSERTHERE_ACCEPT*/
|
||||
|
||||
// -1 is the qxtconf... predefined value to show the dialog
|
||||
prefs.showTempFileWarning = showTempFileWarningCB->isChecked() ? -1 : 1;
|
||||
settings.setValue("anchorSpcHack", anchorTamilHackCB->isChecked());
|
||||
@ -743,7 +746,7 @@ void UIPrefsDialog::addExtraDbPB_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
LOGDEB("ExtraDbDial: got: [" << (dbdir) << "]\n" );
|
||||
LOGDEB("ExtraDbDial: got: [" << (dbdir) << "]\n");
|
||||
bool stripped;
|
||||
if (!Rcl::Db::testDbDir(dbdir, &stripped)) {
|
||||
QMessageBox::warning(0, "Recoll", tr("The selected directory does not "
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user