Added a clear recent ROM list menu item to Qt GUI.
This commit is contained in:
parent
36614540fd
commit
0e4c122623
|
@ -2246,6 +2246,16 @@ void consoleWin_t::buildRecentRomMenu(void)
|
|||
g_config->setOption( buf, s);
|
||||
}
|
||||
}
|
||||
// Add a dummy disable QAction to create a larger dead space between the ROM list and the clear item.
|
||||
// Helps prevent accidental unintended clicking of the clear list item
|
||||
recentRomMenu->addSeparator();
|
||||
act = new QAction(recentRomMenu);
|
||||
act->setEnabled(false);
|
||||
recentRomMenu->addAction(act);
|
||||
|
||||
act = new QAction(tr("Clear Recent ROM List"), recentRomMenu);
|
||||
connect(act, SIGNAL(triggered()), this, SLOT(clearRecentRomMenu(void)) );
|
||||
recentRomMenu->addAction(act);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void consoleWin_t::saveRecentRomMenu(void)
|
||||
|
@ -2275,6 +2285,19 @@ void consoleWin_t::saveRecentRomMenu(void)
|
|||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void consoleWin_t::clearRecentRomMenu()
|
||||
{
|
||||
char buf[128];
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
sprintf(buf, "SDL.RecentRom%02i", i);
|
||||
g_config->setOption( buf, "");
|
||||
}
|
||||
clearRomList();
|
||||
|
||||
recentRomMenuReset = true;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void consoleWin_t::addRecentRom( const char *rom )
|
||||
{
|
||||
std::string *s;
|
||||
|
|
|
@ -389,6 +389,7 @@ class consoleWin_t : public QMainWindow
|
|||
void toggleGameGenie(bool checked);
|
||||
void loadGameGenieROM(void);
|
||||
void loadMostRecentROM(void);
|
||||
void clearRecentRomMenu(void);
|
||||
void setRegionNTSC(void);
|
||||
void setRegionPAL(void);
|
||||
void setRegionDendy(void);
|
||||
|
|
Loading…
Reference in New Issue