From c321227fa743755f00522e9d7146e43efad1a60e Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Tue, 9 Aug 2016 11:13:36 +0200 Subject: [PATCH] Fix clipboard behavior in deck editor and game --- cockatrice/src/cardinfotext.cpp | 6 ++++++ cockatrice/src/shortcutssettings.cpp | 4 ++-- cockatrice/src/window_main.cpp | 10 +++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/cockatrice/src/cardinfotext.cpp b/cockatrice/src/cardinfotext.cpp index 2dccdd71..005fa320 100644 --- a/cockatrice/src/cardinfotext.cpp +++ b/cockatrice/src/cardinfotext.cpp @@ -13,19 +13,25 @@ CardInfoText::CardInfoText(QWidget *parent) nameLabel1 = new QLabel; nameLabel2 = new QLabel; nameLabel2->setWordWrap(true); + nameLabel2->setTextInteractionFlags(Qt::TextBrowserInteraction); manacostLabel1 = new QLabel; manacostLabel2 = new QLabel; manacostLabel2->setWordWrap(true); + manacostLabel2->setTextInteractionFlags(Qt::TextBrowserInteraction); colorLabel1 = new QLabel; colorLabel2 = new QLabel; colorLabel2->setWordWrap(true); + colorLabel2->setTextInteractionFlags(Qt::TextBrowserInteraction); cardtypeLabel1 = new QLabel; cardtypeLabel2 = new QLabel; cardtypeLabel2->setWordWrap(true); + cardtypeLabel2->setTextInteractionFlags(Qt::TextBrowserInteraction); powtoughLabel1 = new QLabel; powtoughLabel2 = new QLabel; + powtoughLabel2->setTextInteractionFlags(Qt::TextBrowserInteraction); loyaltyLabel1 = new QLabel; loyaltyLabel2 = new QLabel; + loyaltyLabel1->setTextInteractionFlags(Qt::TextBrowserInteraction); textLabel = new QTextEdit(); textLabel->setReadOnly(true); diff --git a/cockatrice/src/shortcutssettings.cpp b/cockatrice/src/shortcutssettings.cpp index 1fe57a4e..bf1bb440 100644 --- a/cockatrice/src/shortcutssettings.cpp +++ b/cockatrice/src/shortcutssettings.cpp @@ -159,7 +159,7 @@ void ShortcutsSettings::fillDefaultShorcuts() defaultShortCuts["TabDeckEditor/aEditTokens"] = parseSequenceString(""); defaultShortCuts["TabDeckEditor/aIncrement"] = parseSequenceString("+"); defaultShortCuts["TabDeckEditor/aLoadDeck"] = parseSequenceString("Ctrl+O"); - defaultShortCuts["TabDeckEditor/aLoadDeckFromClipboard"] = parseSequenceString("Ctrl+V"); + defaultShortCuts["TabDeckEditor/aLoadDeckFromClipboard"] = parseSequenceString("Ctrl+Shift+V"); defaultShortCuts["TabDeckEditor/aNewDeck"] = parseSequenceString("Ctrl+N"); defaultShortCuts["TabDeckEditor/aOpenCustomFolder"] = parseSequenceString(""); defaultShortCuts["TabDeckEditor/aPrintDeck"] = parseSequenceString("Ctrl+P"); @@ -167,7 +167,7 @@ void ShortcutsSettings::fillDefaultShorcuts() defaultShortCuts["TabDeckEditor/aResetLayout"] = parseSequenceString(""); defaultShortCuts["TabDeckEditor/aSaveDeck"] = parseSequenceString("Ctrl+S"); defaultShortCuts["TabDeckEditor/aSaveDeckAs"] = parseSequenceString(""); - defaultShortCuts["TabDeckEditor/aSaveDeckToClipboard"] = parseSequenceString("Ctrl+C"); + defaultShortCuts["TabDeckEditor/aSaveDeckToClipboard"] = parseSequenceString("Ctrl+Shift+C"); defaultShortCuts["DeckViewContainer/loadLocalButton"] = parseSequenceString("Ctrl+O"); defaultShortCuts["DeckViewContainer/loadRemoteButton"] = parseSequenceString("Ctrl+Alt+O"); diff --git a/cockatrice/src/window_main.cpp b/cockatrice/src/window_main.cpp index 5e8eb55f..8b49b1b7 100644 --- a/cockatrice/src/window_main.cpp +++ b/cockatrice/src/window_main.cpp @@ -280,7 +280,7 @@ void MainWindow::actExit() void MainWindow::actAbout() { - QMessageBox::about(this, tr("About Cockatrice"), QString( + QMessageBox mb(QMessageBox::NoIcon, tr("About Cockatrice"), QString( "Cockatrice
" + tr("Version %1").arg(VERSION_STRING) + "

" + tr("Cockatrice Webpage") + "
" @@ -295,8 +295,12 @@ void MainWindow::actAbout() + "" + tr("Support:") + "
" + "" + tr("Report an Issue") + "
" + "" + tr("Troubleshooting") + "
" - + "" + tr("F.A.Q.") + "
" - )); + + "" + tr("F.A.Q.") + "
"), + QMessageBox::Ok, this + ); + mb.setIconPixmap(QPixmap("theme:cockatrice").scaled(64, 64)); + mb.setTextInteractionFlags(Qt::TextBrowserInteraction); + mb.exec(); } void MainWindow::actUpdate()