Merge pull request #2631 from Yakov5776/development
Add an Option to hide seasonal icons
This commit is contained in:
commit
236dd4fa5a
|
@ -88,6 +88,7 @@ void SettingsDialog::LoadSettings()
|
|||
settings.guiLoadSaveTabOrder = true;
|
||||
settings.guiDisableAutoComplete = false;
|
||||
settings.guiAutoFollowInStack = false;
|
||||
settings.guiHideSeasonalIcons = false;
|
||||
|
||||
//Events tab
|
||||
GetSettingBool("Events", "SystemBreakpoint", &settings.eventSystemBreakpoint);
|
||||
|
@ -381,11 +382,14 @@ void SettingsDialog::LoadSettings()
|
|||
GetSettingBool("Misc", "QueryProcessCookie", &settings.miscQueryProcessCookie);
|
||||
GetSettingBool("Misc", "QueryWorkingSet", &settings.miscQueryWorkingSet);
|
||||
GetSettingBool("Misc", "TransparentExceptionStepping", &settings.miscTransparentExceptionStepping);
|
||||
GetSettingBool("Misc", "NoSeasons", &settings.guiHideSeasonalIcons);
|
||||
ui->chkUtf16LogRedirect->setChecked(settings.miscUtf16LogRedirect);
|
||||
ui->chkUseLocalHelpFile->setChecked(settings.miscUseLocalHelpFile);
|
||||
ui->chkQueryProcessCookie->setChecked(settings.miscQueryProcessCookie);
|
||||
ui->chkQueryWorkingSet->setChecked(settings.miscQueryWorkingSet);
|
||||
ui->chkTransparentExceptionStepping->setChecked(settings.miscTransparentExceptionStepping);
|
||||
ui->chkHideSeasonalIcons->setChecked(settings.guiHideSeasonalIcons);
|
||||
ui->chkHideSeasonalIcons->setVisible(isSeasonal());
|
||||
}
|
||||
|
||||
void SettingsDialog::SaveSettings()
|
||||
|
@ -503,6 +507,7 @@ void SettingsDialog::SaveSettings()
|
|||
BridgeSettingSetUint("Misc", "QueryProcessCookie", settings.miscQueryProcessCookie);
|
||||
BridgeSettingSetUint("Misc", "QueryWorkingSet", settings.miscQueryWorkingSet);
|
||||
BridgeSettingSetUint("Misc", "TransparentExceptionStepping", settings.miscTransparentExceptionStepping);
|
||||
BridgeSettingSetUint("Misc", "NoSeasons", settings.guiHideSeasonalIcons);
|
||||
|
||||
BridgeSettingFlush();
|
||||
Config()->load();
|
||||
|
@ -1142,6 +1147,11 @@ void SettingsDialog::on_chkDisableAutoComplete_toggled(bool checked)
|
|||
bDisableAutoCompleteUpdated = true;
|
||||
}
|
||||
|
||||
void SettingsDialog::on_chkHideSeasonalIcons_toggled(bool checked)
|
||||
{
|
||||
settings.guiHideSeasonalIcons = checked;
|
||||
}
|
||||
|
||||
void SettingsDialog::on_chkUseLocalHelpFile_toggled(bool checked)
|
||||
{
|
||||
settings.miscUseLocalHelpFile = checked;
|
||||
|
|
|
@ -105,6 +105,7 @@ private slots:
|
|||
void on_chkShowExitConfirmation_toggled(bool checked);
|
||||
void on_chkDisableAutoComplete_toggled(bool checked);
|
||||
void on_chkAutoFollowInStack_toggled(bool checked);
|
||||
void on_chkHideSeasonalIcons_toggled(bool checked);
|
||||
//Misc tab
|
||||
void on_chkSetJIT_stateChanged(int arg1);
|
||||
void on_chkConfirmBeforeAtt_stateChanged(int arg1);
|
||||
|
@ -236,6 +237,7 @@ private:
|
|||
bool guiShowExitConfirmation;
|
||||
bool guiDisableAutoComplete;
|
||||
bool guiAutoFollowInStack;
|
||||
bool guiHideSeasonalIcons;
|
||||
//Misc Tab
|
||||
bool miscSetJIT;
|
||||
bool miscSetJITAuto;
|
||||
|
|
|
@ -881,6 +881,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkHideSeasonalIcons">
|
||||
<property name="text">
|
||||
<string>Hide seasonal icons</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacerGUI">
|
||||
<property name="orientation">
|
||||
|
|
|
@ -321,6 +321,11 @@ bool isEaster()
|
|||
return date.month() == MM && date.day() >= DD - 2 && date.day() <= DD + 1;
|
||||
}
|
||||
|
||||
bool isSeasonal()
|
||||
{
|
||||
return (isChristmas() || isEaster());
|
||||
}
|
||||
|
||||
QString couldItBeSeasonal(QString icon)
|
||||
{
|
||||
static bool seasons = allowSeasons();
|
||||
|
|
|
@ -20,6 +20,7 @@ QString getSymbolicName(duint addr);
|
|||
QString getSymbolicNameStr(duint addr);
|
||||
bool ExportCSV(dsint rows, dsint columns, std::vector<QString> headers, std::function<QString(dsint, dsint)> getCellContent);
|
||||
bool isEaster();
|
||||
bool isSeasonal();
|
||||
QString couldItBeSeasonal(QString icon);
|
||||
QIcon getFileIcon(QString file);
|
||||
|
||||
|
|
Loading…
Reference in New Issue