mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-20 15:40:23 +00:00
Qt: add option to reset time played
This commit is contained in:
parent
450ab7c289
commit
e133c8c2c3
@ -1302,6 +1302,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
||||
QAction* download_compat = menu.addAction(tr("&Download Compatibility Database"));
|
||||
menu.addSeparator();
|
||||
QAction* edit_notes = menu.addAction(tr("&Edit Tooltip Notes"));
|
||||
QAction* reset_time_played = menu.addAction(tr("&Reset Time Played"));
|
||||
|
||||
QMenu* icon_menu = menu.addMenu(tr("&Custom Images"));
|
||||
const std::array<QAction*, 3> custom_icon_actions =
|
||||
@ -1625,6 +1626,16 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
||||
Refresh();
|
||||
}
|
||||
});
|
||||
connect(reset_time_played, &QAction::triggered, this, [this, name, serial]
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Confirm Reset"), tr("Reset time played?\n\n%0 [%1]").arg(name).arg(serial)) == QMessageBox::Yes)
|
||||
{
|
||||
m_persistent_settings->SetPlaytime(serial, 0);
|
||||
m_persistent_settings->SetLastPlayed(serial, 0);
|
||||
m_persistent_settings->sync();
|
||||
Refresh();
|
||||
}
|
||||
});
|
||||
connect(copy_info, &QAction::triggered, this, [name, serial]
|
||||
{
|
||||
QApplication::clipboard()->setText(name % QStringLiteral(" [") % serial % QStringLiteral("]"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user