From fefa08c5190a64a5048587dc5f3cf8582ac976dc Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Mon, 10 Jun 2019 22:47:58 -0400 Subject: [PATCH] minor tweaks to remove hooks --- GUI/mainwindow.cpp | 6 ++++-- text.cpp | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index 1011f25..5e124fe 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -40,6 +40,7 @@ extern const char* HOOK_SEARCH_FILTER; extern const char* START_HOOK_SEARCH; extern const char* SAVE_SEARCH_RESULTS; extern const char* TEXT_FILES; +extern const char* DOUBLE_CLICK_TO_REMOVE_HOOK; extern const char* SAVE_SETTINGS; extern const char* USE_JP_LOCALE; extern const char* FILTER_REPETITION; @@ -323,8 +324,9 @@ void MainWindow::RemoveHooks() if (tp.processId == GetSelectedProcessId()) hooks[tp.addr] = Host::GetHookParam(tp); } auto hookList = new QListWidget(this); - hookList->setWindowFlag(Qt::Window, true); - hookList->setWindowTitle(REMOVE_HOOKS); + hookList->setWindowFlags(Qt::Window | Qt::WindowCloseButtonHint); + hookList->setMinimumSize({ 300, 50 }); + hookList->setWindowTitle(DOUBLE_CLICK_TO_REMOVE_HOOK); for (auto[address, hp] : hooks) new QListWidgetItem(QString(hp.name) + "@" + QString::number(address, 16), hookList); connect(hookList, &QListWidget::itemDoubleClicked, [processId, hookList](QListWidgetItem* item) diff --git a/text.cpp b/text.cpp index 42e485a..122119b 100644 --- a/text.cpp +++ b/text.cpp @@ -61,6 +61,7 @@ const char* HOOK_SEARCH_FILTER = u8"Results must match this regex"; const char* START_HOOK_SEARCH = u8"Start hook search"; const char* SAVE_SEARCH_RESULTS = u8"Save search results"; const char* TEXT_FILES = u8"Text (*.txt)"; +const char* DOUBLE_CLICK_TO_REMOVE_HOOK = u8"Double click a hook to remove it"; const char* FILTER_REPETITION = u8"Repetition Filter"; const char* DEFAULT_CODEPAGE = u8"Default Codepage"; const char* FLUSH_DELAY = u8"Flush Delay";