mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
prefs/needauth: added warning if user tries to disable authorization for needauth converters.
This commit is contained in:
parent
964fb09baf
commit
8a4fcd3d95
@ -1684,8 +1684,6 @@ PrefConverters::PrefConverters(GuiPreferences * form)
|
|||||||
this, SIGNAL(changed()));
|
this, SIGNAL(changed()));
|
||||||
connect(needauthForbiddenCB, SIGNAL(toggled(bool)),
|
connect(needauthForbiddenCB, SIGNAL(toggled(bool)),
|
||||||
this, SIGNAL(changed()));
|
this, SIGNAL(changed()));
|
||||||
connect(needauthCB, SIGNAL(toggled(bool)),
|
|
||||||
this, SIGNAL(changed()));
|
|
||||||
|
|
||||||
converterED->setValidator(new NoNewLineValidator(converterED));
|
converterED->setValidator(new NoNewLineValidator(converterED));
|
||||||
converterFlagED->setValidator(new NoNewLineValidator(converterFlagED));
|
converterFlagED->setValidator(new NoNewLineValidator(converterFlagED));
|
||||||
@ -1874,6 +1872,21 @@ void PrefConverters::on_needauthForbiddenCB_toggled(bool checked)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PrefConverters::on_needauthCB_toggled(bool checked)
|
||||||
|
{
|
||||||
|
if (checked)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int ret = frontend::Alert::prompt(
|
||||||
|
_("SECURITY WARNING!"), _("Unchecking this option has the effect that potentially harmful converters would be run without asking your permission first. This is UNSAFE and NOT recommended, unless you know what you are doing. Are you sure you would like to proceed ? The recommended and safe answer is NO!"),
|
||||||
|
0, 0, _("&No"), _("&Yes"));
|
||||||
|
if (ret == 1)
|
||||||
|
changed();
|
||||||
|
else
|
||||||
|
needauthCB->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// FormatValidator
|
// FormatValidator
|
||||||
|
@ -338,6 +338,7 @@ private Q_SLOTS:
|
|||||||
void changeConverter();
|
void changeConverter();
|
||||||
void on_cacheCB_stateChanged(int state);
|
void on_cacheCB_stateChanged(int state);
|
||||||
void on_needauthForbiddenCB_toggled(bool);
|
void on_needauthForbiddenCB_toggled(bool);
|
||||||
|
void on_needauthCB_toggled(bool);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateButtons();
|
void updateButtons();
|
||||||
|
Loading…
Reference in New Issue
Block a user