Add an option to disable the menu icons
This commit is contained in:
parent
fe82859b6f
commit
2f181ed2e6
|
@ -84,7 +84,7 @@ bool bUndecorateSymbolNames = true;
|
|||
bool bEnableSourceDebugging = false;
|
||||
bool bSkipInt3Stepping = false;
|
||||
bool bIgnoreInconsistentBreakpoints = false;
|
||||
bool bNoForegroundWindow = false;
|
||||
bool bNoForegroundWindow = true;
|
||||
bool bVerboseExceptionLogging = true;
|
||||
bool bNoWow64SingleStepWorkaround = false;
|
||||
bool bTraceBrowserNeedsUpdate = false;
|
||||
|
|
|
@ -45,7 +45,7 @@ CPUMultiDump::CPUMultiDump(CPUDisassembly* disas, int nbCpuDumpTabs, QWidget* pa
|
|||
this->addTabEx(mLocalVars, DIcon("localvars"), tr("Locals"), "Locals");
|
||||
|
||||
mStructWidget = new StructWidget(this);
|
||||
this->addTabEx(mStructWidget, mStructWidget->windowIcon(), mStructWidget->windowTitle(), "Struct");
|
||||
this->addTabEx(mStructWidget, DIcon("struct"), mStructWidget->windowTitle(), "Struct");
|
||||
|
||||
connect(this, SIGNAL(currentChanged(int)), this, SLOT(updateCurrentTabSlot(int)));
|
||||
connect(tabBar(), SIGNAL(OnDoubleClickTabIndex(int)), this, SLOT(openChangeTabTitleDialogSlot(int)));
|
||||
|
|
|
@ -415,6 +415,28 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
QTimer::singleShot(0, this, SLOT(loadWindowSettings()));
|
||||
|
||||
updateDarkTitleBar(this);
|
||||
|
||||
// Hide the menu icons if the setting is enabled
|
||||
duint noIcons = 0;
|
||||
BridgeSettingGetUint("Gui", "NoIcons", &noIcons);
|
||||
if(noIcons)
|
||||
{
|
||||
QList<QList<QAction*>> stack;
|
||||
stack.push_back(ui->menuBar->actions());
|
||||
while(!stack.isEmpty())
|
||||
{
|
||||
auto actions = stack.back();
|
||||
stack.pop_back();
|
||||
for(auto action : actions)
|
||||
{
|
||||
action->setIconVisibleInMenu(false);
|
||||
if(action->menu())
|
||||
{
|
||||
stack.push_back(action->menu()->actions());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
|
|
@ -52,46 +52,7 @@ void SettingsDialog::LoadSettings()
|
|||
Config()->save();
|
||||
|
||||
//Defaults
|
||||
memset(&settings, 0, sizeof(SettingsStruct));
|
||||
settings.eventSystemBreakpoint = true;
|
||||
settings.eventTlsCallbacks = true;
|
||||
settings.eventEntryBreakpoint = true;
|
||||
settings.eventExitBreakpoint = false;
|
||||
settings.engineType = DebugEngineTitanEngine;
|
||||
settings.engineCalcType = calc_unsigned;
|
||||
settings.engineBreakpointType = break_int3short;
|
||||
settings.engineUndecorateSymbolNames = true;
|
||||
settings.engineEnableDebugPrivilege = true;
|
||||
settings.engineEnableSourceDebugging = false;
|
||||
settings.engineNoScriptTimeout = false;
|
||||
settings.engineIgnoreInconsistentBreakpoints = false;
|
||||
settings.engineNoWow64SingleStepWorkaround = false;
|
||||
settings.engineDisableAslr = false;
|
||||
settings.engineMaxTraceCount = 50000;
|
||||
settings.engineAnimateInterval = 50;
|
||||
settings.engineHardcoreThreadSwitchWarning = false;
|
||||
settings.engineVerboseExceptionLogging = true;
|
||||
settings.exceptionFilters = &realExceptionFilters;
|
||||
settings.disasmArgumentSpaces = false;
|
||||
settings.disasmHidePointerSizes = false;
|
||||
settings.disasmHideNormalSegments = false;
|
||||
settings.disasmMemorySpaces = false;
|
||||
settings.disasmUppercase = false;
|
||||
settings.disasmOnlyCipAutoComments = false;
|
||||
settings.disasmTabBetweenMnemonicAndArguments = false;
|
||||
settings.disasmNoCurrentModuleText = false;
|
||||
settings.disasm0xPrefixValues = false;
|
||||
settings.disasmNoBranchDisasmPreview = false;
|
||||
settings.disasmNoSourceLineAutoComments = false;
|
||||
settings.disasmAssembleOnDoubleClick = false;
|
||||
settings.disasmMaxModuleSize = -1;
|
||||
settings.guiNoForegroundWindow = true;
|
||||
settings.guiLoadSaveTabOrder = true;
|
||||
settings.guiDisableAutoComplete = false;
|
||||
settings.guiAutoFollowInStack = false;
|
||||
settings.guiHideSeasonalIcons = false;
|
||||
settings.guiEnableQtHighDpiScaling = true;
|
||||
settings.guiEnableWindowLongPath = false;
|
||||
|
||||
//Events tab
|
||||
GetSettingBool("Events", "SystemBreakpoint", &settings.eventSystemBreakpoint);
|
||||
|
@ -312,6 +273,7 @@ void SettingsDialog::LoadSettings()
|
|||
GetSettingBool("Gui", "NoSeasons", &settings.guiHideSeasonalIcons);
|
||||
GetSettingBool("Gui", "EnableQtHighDpiScaling", &settings.guiEnableQtHighDpiScaling);
|
||||
GetSettingBool("Gui", "WindowLongPath", &settings.guiEnableWindowLongPath);
|
||||
GetSettingBool("Gui", "NoIcons", &settings.guiNoIcons);
|
||||
ui->chkFpuRegistersLittleEndian->setChecked(settings.guiFpuRegistersLittleEndian);
|
||||
ui->chkSaveColumnOrder->setChecked(settings.guiSaveColumnOrder);
|
||||
ui->chkNoCloseDialog->setChecked(settings.guiNoCloseDialog);
|
||||
|
@ -328,6 +290,7 @@ void SettingsDialog::LoadSettings()
|
|||
ui->chkHideSeasonalIcons->setVisible(isSeasonal());
|
||||
ui->chkQtHighDpiScaling->setChecked(settings.guiEnableQtHighDpiScaling);
|
||||
ui->chkWindowLongPath->setChecked(settings.guiEnableWindowLongPath);
|
||||
ui->chkNoIcons->setChecked(settings.guiNoIcons);
|
||||
|
||||
//Misc tab
|
||||
if(DbgFunctions()->GetJit)
|
||||
|
@ -479,6 +442,7 @@ void SettingsDialog::SaveSettings()
|
|||
BridgeSettingSetUint("Gui", "NoSeasons", settings.guiHideSeasonalIcons);
|
||||
BridgeSettingSetUint("Gui", "EnableQtHighDpiScaling", settings.guiEnableQtHighDpiScaling);
|
||||
BridgeSettingSetUint("Gui", "WindowLongPath", settings.guiEnableWindowLongPath);
|
||||
BridgeSettingSetUint("Gui", "NoIcons", settings.guiNoIcons);
|
||||
|
||||
//Misc tab
|
||||
if(DbgFunctions()->GetJit)
|
||||
|
@ -1194,3 +1158,9 @@ void SettingsDialog::on_chkWindowLongPath_toggled(bool checked)
|
|||
{
|
||||
settings.guiEnableWindowLongPath = checked;
|
||||
}
|
||||
|
||||
void SettingsDialog::on_chkNoIcons_toggled(bool checked)
|
||||
{
|
||||
settings.guiNoIcons = checked;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,6 +107,9 @@ private slots:
|
|||
void on_chkDisableAutoComplete_toggled(bool checked);
|
||||
void on_chkAutoFollowInStack_toggled(bool checked);
|
||||
void on_chkHideSeasonalIcons_toggled(bool checked);
|
||||
void on_chkQtHighDpiScaling_toggled(bool checked);
|
||||
void on_chkWindowLongPath_toggled(bool checked);
|
||||
void on_chkNoIcons_toggled(bool checked);
|
||||
//Misc tab
|
||||
void on_chkSetJIT_stateChanged(int arg1);
|
||||
void on_editSymbolStore_textEdited(const QString & arg1);
|
||||
|
@ -119,9 +122,6 @@ private slots:
|
|||
void on_chkQueryWorkingSet_toggled(bool checked);
|
||||
void on_chkTransparentExceptionStepping_toggled(bool checked);
|
||||
|
||||
void on_chkQtHighDpiScaling_toggled(bool checked);
|
||||
void on_chkWindowLongPath_toggled(bool checked);
|
||||
|
||||
private:
|
||||
//enums
|
||||
enum CalcType
|
||||
|
@ -173,86 +173,90 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
// Unfortunately there are multiple sources of truth for the defaults.
|
||||
// Some are in Configuration::Configuration and some in _exports.cpp
|
||||
// case DBG_SETTINGS_UPDATED
|
||||
struct SettingsStruct
|
||||
{
|
||||
//Event Tab
|
||||
bool eventSystemBreakpoint;
|
||||
bool eventExitBreakpoint;
|
||||
bool eventTlsCallbacks;
|
||||
bool eventTlsCallbacksSystem;
|
||||
bool eventEntryBreakpoint;
|
||||
bool eventDllEntry;
|
||||
bool eventDllEntrySystem;
|
||||
bool eventThreadEntry;
|
||||
bool eventDllLoad;
|
||||
bool eventDllUnload;
|
||||
bool eventDllLoadSystem;
|
||||
bool eventDllUnloadSystem;
|
||||
bool eventThreadStart;
|
||||
bool eventThreadEnd;
|
||||
bool eventThreadNameSet;
|
||||
bool eventDebugStrings;
|
||||
bool eventSystemBreakpoint = true;
|
||||
bool eventExitBreakpoint = false;
|
||||
bool eventTlsCallbacks = true;
|
||||
bool eventTlsCallbacksSystem = true;
|
||||
bool eventEntryBreakpoint = true;
|
||||
bool eventDllEntry = false;
|
||||
bool eventDllEntrySystem = false;
|
||||
bool eventThreadEntry = false;
|
||||
bool eventDllLoad = false;
|
||||
bool eventDllUnload = false;
|
||||
bool eventDllLoadSystem = false;
|
||||
bool eventDllUnloadSystem = false;
|
||||
bool eventThreadStart = false;
|
||||
bool eventThreadEnd = false;
|
||||
bool eventThreadNameSet = false;
|
||||
bool eventDebugStrings = false;
|
||||
//Engine Tab
|
||||
CalcType engineCalcType;
|
||||
DEBUG_ENGINE engineType;
|
||||
BreakpointType engineBreakpointType;
|
||||
bool engineUndecorateSymbolNames;
|
||||
bool engineEnableDebugPrivilege;
|
||||
bool engineEnableSourceDebugging;
|
||||
bool engineSaveDatabaseInProgramDirectory;
|
||||
bool engineDisableDatabaseCompression;
|
||||
bool engineSkipInt3Stepping;
|
||||
bool engineNoScriptTimeout;
|
||||
bool engineIgnoreInconsistentBreakpoints;
|
||||
bool engineHardcoreThreadSwitchWarning;
|
||||
bool engineVerboseExceptionLogging;
|
||||
bool engineNoWow64SingleStepWorkaround;
|
||||
bool engineDisableAslr;
|
||||
int engineMaxTraceCount;
|
||||
int engineAnimateInterval;
|
||||
CalcType engineCalcType = calc_unsigned;
|
||||
DEBUG_ENGINE engineType = DebugEngineTitanEngine;
|
||||
BreakpointType engineBreakpointType = break_int3short;
|
||||
bool engineUndecorateSymbolNames = true;
|
||||
bool engineEnableDebugPrivilege = true;
|
||||
bool engineEnableSourceDebugging = false;
|
||||
bool engineSaveDatabaseInProgramDirectory = false;
|
||||
bool engineDisableDatabaseCompression = false;
|
||||
bool engineSkipInt3Stepping = false;
|
||||
bool engineNoScriptTimeout = false;
|
||||
bool engineIgnoreInconsistentBreakpoints = false;
|
||||
bool engineHardcoreThreadSwitchWarning = false;
|
||||
bool engineVerboseExceptionLogging = true;
|
||||
bool engineNoWow64SingleStepWorkaround = false;
|
||||
bool engineDisableAslr = false;
|
||||
int engineMaxTraceCount = 50000;
|
||||
int engineAnimateInterval = 50;
|
||||
//Exception Tab
|
||||
QList<ExceptionFilter>* exceptionFilters;
|
||||
QList<ExceptionFilter>* exceptionFilters = nullptr;
|
||||
//Disasm Tab
|
||||
bool disasmArgumentSpaces;
|
||||
bool disasmMemorySpaces;
|
||||
bool disasmHidePointerSizes;
|
||||
bool disasmHideNormalSegments;
|
||||
bool disasmUppercase;
|
||||
bool disasmOnlyCipAutoComments;
|
||||
bool disasmTabBetweenMnemonicAndArguments;
|
||||
bool disasmArgumentSpaces = false;
|
||||
bool disasmMemorySpaces = false;
|
||||
bool disasmHidePointerSizes = false;
|
||||
bool disasmHideNormalSegments = false;
|
||||
bool disasmUppercase = false;
|
||||
bool disasmOnlyCipAutoComments = false;
|
||||
bool disasmTabBetweenMnemonicAndArguments = false;
|
||||
bool disasmNoHighlightOperands;
|
||||
bool disasmNoCurrentModuleText;
|
||||
bool disasmNoCurrentModuleText = false;
|
||||
bool disasmPermanentHighlightingMode;
|
||||
bool disasm0xPrefixValues;
|
||||
bool disasmNoBranchDisasmPreview;
|
||||
bool disasmNoSourceLineAutoComments;
|
||||
bool disasmAssembleOnDoubleClick;
|
||||
int disasmMaxModuleSize;
|
||||
bool disasm0xPrefixValues = false;
|
||||
bool disasmNoBranchDisasmPreview = false;
|
||||
bool disasmNoSourceLineAutoComments = false;
|
||||
bool disasmAssembleOnDoubleClick = false;
|
||||
int disasmMaxModuleSize = -1;
|
||||
//Gui Tab
|
||||
bool guiFpuRegistersLittleEndian;
|
||||
bool guiSaveColumnOrder;
|
||||
bool guiNoCloseDialog;
|
||||
bool guiPidTidInHex;
|
||||
bool guiSidebarWatchLabels;
|
||||
bool guiNoForegroundWindow;
|
||||
bool guiLoadSaveTabOrder;
|
||||
bool guiShowGraphRva;
|
||||
bool guiGraphZoomMode;
|
||||
bool guiShowExitConfirmation;
|
||||
bool guiDisableAutoComplete;
|
||||
bool guiAutoFollowInStack;
|
||||
bool guiHideSeasonalIcons;
|
||||
bool guiEnableQtHighDpiScaling;
|
||||
bool guiEnableWindowLongPath;
|
||||
bool guiFpuRegistersLittleEndian = false;
|
||||
bool guiSaveColumnOrder = false;
|
||||
bool guiNoCloseDialog = false;
|
||||
bool guiPidTidInHex = false;
|
||||
bool guiSidebarWatchLabels = false;
|
||||
bool guiNoForegroundWindow = true;
|
||||
bool guiLoadSaveTabOrder = true;
|
||||
bool guiShowGraphRva = false;
|
||||
bool guiGraphZoomMode = true;
|
||||
bool guiShowExitConfirmation = true;
|
||||
bool guiDisableAutoComplete = false;
|
||||
bool guiAutoFollowInStack = false;
|
||||
bool guiHideSeasonalIcons = false;
|
||||
bool guiEnableQtHighDpiScaling = true;
|
||||
bool guiEnableWindowLongPath = false;
|
||||
bool guiNoIcons = false;
|
||||
//Misc Tab
|
||||
bool miscSetJIT;
|
||||
bool miscSymbolStore;
|
||||
bool miscSymbolCache;
|
||||
bool miscUtf16LogRedirect;
|
||||
bool miscUseLocalHelpFile;
|
||||
bool miscQueryProcessCookie;
|
||||
bool miscQueryWorkingSet;
|
||||
bool miscTransparentExceptionStepping;
|
||||
bool miscSetJIT = false;
|
||||
bool miscSymbolStore = false;
|
||||
bool miscSymbolCache = false;
|
||||
bool miscUtf16LogRedirect = false;
|
||||
bool miscUseLocalHelpFile = false;
|
||||
bool miscQueryProcessCookie = false;
|
||||
bool miscQueryWorkingSet = false;
|
||||
bool miscTransparentExceptionStepping = true;
|
||||
};
|
||||
|
||||
//variables
|
||||
|
|
|
@ -948,6 +948,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkNoIcons">
|
||||
<property name="text">
|
||||
<string>Disable icons*</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacerGUI">
|
||||
<property name="orientation">
|
||||
|
|
|
@ -16,10 +16,6 @@
|
|||
<property name="windowTitle">
|
||||
<string>Struct</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset theme="struct" resource="../../resource.qrc">
|
||||
<normaloff>:/Default/icons/struct.png</normaloff>:/Default/icons/struct.png</iconset>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
|
@ -77,8 +73,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../resource.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -296,6 +296,12 @@ bool ExportCSV(dsint rows, dsint columns, std::vector<QString> headers, std::fun
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool allowIcons()
|
||||
{
|
||||
duint setting = 0;
|
||||
return !BridgeSettingGetUint("Gui", "NoIcons", &setting) || !setting;
|
||||
}
|
||||
|
||||
static bool allowSeasons()
|
||||
{
|
||||
srand(GetTickCount());
|
||||
|
@ -337,6 +343,9 @@ QIcon DIconHelper(QString name)
|
|||
{
|
||||
if(name.endsWith(".png"))
|
||||
name = name.left(name.length() - 4);
|
||||
static bool icons = allowIcons();
|
||||
if(!icons)
|
||||
return QIcon();
|
||||
static bool seasons = allowSeasons();
|
||||
static bool christmas = isChristmas();
|
||||
static bool easter = isEaster();
|
||||
|
|
Loading…
Reference in New Issue