mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Add wrapper function to disable hotkeys for QFileDialog
Previously, if you have "Hotkeys Require Window Focus" disabled, you could repeatedly use the "Open" hotkey, for example, to stack File Open windows over top of each other over and over. This commit allows the hotkey manager to disable/enable on QFileDialog creation and destruction.
This commit is contained in:
parent
d90b30ca25
commit
839b04014e
16 changed files with 175 additions and 81 deletions
|
@ -26,6 +26,7 @@
|
|||
#include "Core/HW/SI/SI_Device.h"
|
||||
#include "Core/Movie.h"
|
||||
#include "Core/NetPlayProto.h"
|
||||
#include "DolphinQt/QtUtils/DolphinFileDialog.h"
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
#include "DolphinQt/Resources.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
@ -183,7 +184,7 @@ void GBAWidget::UnloadROM()
|
|||
|
||||
void GBAWidget::PromptForEReaderCards()
|
||||
{
|
||||
const QStringList card_paths = QFileDialog::getOpenFileNames(
|
||||
const QStringList card_paths = DolphinFileDialog::getOpenFileNames(
|
||||
this, tr("Select e-Reader Cards"), QString(), tr("e-Reader Cards (*.raw);;All Files (*)"),
|
||||
nullptr, QFileDialog::Options());
|
||||
|
||||
|
@ -205,9 +206,10 @@ void GBAWidget::DoState(bool export_state)
|
|||
return;
|
||||
|
||||
QString state_path = QDir::toNativeSeparators(
|
||||
(export_state ? QFileDialog::getSaveFileName : QFileDialog::getOpenFileName)(
|
||||
(export_state ? DolphinFileDialog::getSaveFileName : DolphinFileDialog::getOpenFileName)(
|
||||
this, tr("Select a File"), QString(),
|
||||
tr("mGBA Save States (*.ss0 *.ss1 *.ss2 *.ss3 *.ss4 *.ss5 *.ss6 *.ss7 *.ss8 *.ss9);;"
|
||||
tr("mGBA Save States (*.ss0 *.ss1 *.ss2 *.ss3 *.ss4 "
|
||||
"*.ss5 *.ss6 *.ss7 *.ss8 *.ss9);;"
|
||||
"All Files (*)"),
|
||||
nullptr, QFileDialog::Options()));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue