From 9fd03870163345685f3d6dd4c850e9e8c5b6fcda Mon Sep 17 00:00:00 2001 From: C4ndyF1sh <128715345+C4ndyF1sh@users.noreply.github.com> Date: Sat, 1 Feb 2025 23:44:35 +0100 Subject: [PATCH] Update gui_context_menus.h --- src/qt_gui/gui_context_menus.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/qt_gui/gui_context_menus.h b/src/qt_gui/gui_context_menus.h index c01e32b83..75afb524b 100644 --- a/src/qt_gui/gui_context_menus.h +++ b/src/qt_gui/gui_context_menus.h @@ -77,12 +77,14 @@ public: QMenu* copyMenu = new QMenu(tr("Copy info..."), widget); QAction* copyName = new QAction(tr("Copy Name"), widget); QAction* copySerial = new QAction(tr("Copy Serial"), widget); - QMenu* copyMenu = new QMenu(tr("Copy Firmware Version..."), widget); + QMenu* copyFirmware = new QMenu(tr("Copy Firmware..."), widget); + QMenu* copySize = new QMenu(tr("Copy Size..."), widget); QAction* copyNameAll = new QAction(tr("Copy All"), widget); copyMenu->addAction(copyName); copyMenu->addAction(copySerial); - openFolderMenu->addAction(copyFirmwareVersion); + copyMenu->addAction(copyFirmware); + copyMenu->addAction(copySize); copyMenu->addAction(copyNameAll); menu.addMenu(copyMenu); @@ -348,9 +350,14 @@ public: clipboard->setText(QString::fromStdString(m_games[itemID].serial)); } - if (selected == copyFirmwareVersion) { + if (selected == copyFirmware) { QClipboard* clipboard = QGuiApplication::clipboard(); - clipboard->setText(QString::fromStdString(m_games[itemID].serial)); + clipboard->setText(QString::fromStdString(m_games[itemID].version)); + } + + if (selected == copySize) { + QClipboard* clipboard = QGuiApplication::clipboard(); + clipboard->setText(QString::fromStdString(m_games[itemID].size)); } if (selected == copyNameAll) { @@ -358,7 +365,7 @@ public: QString combinedText = QString("Name:%1 | Serial:%2 | Version:%3 | Size:%4") .arg(QString::fromStdString(m_games[itemID].name)) .arg(QString::fromStdString(m_games[itemID].serial)) - .arg(QString::fromStdString(m_games[itemID].version)) + .arg(QString::fromStdString(m_games[itemID].version)) .arg(QString::fromStdString(m_games[itemID].size)); clipboard->setText(combinedText); }