diff --git a/cockatrice/src/dlg_settings.cpp b/cockatrice/src/dlg_settings.cpp index 1807cb4c..9fd02e59 100644 --- a/cockatrice/src/dlg_settings.cpp +++ b/cockatrice/src/dlg_settings.cpp @@ -548,13 +548,15 @@ void UserInterfaceSettingsPage::soundPathButtonClicked() DeckEditorSettingsPage::DeckEditorSettingsPage() { - priceTagsCheckBox.setChecked(settingsCache->getPriceTagFeature()); - connect(&priceTagsCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setPriceTagFeature(int))); + //priceTagsCheckBox.setChecked(settingsCache->getPriceTagFeature()); + //connect(&priceTagsCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setPriceTagFeature(int))); connect(this, SIGNAL(priceTagSourceChanged(int)), settingsCache, SLOT(setPriceTagSource(int))); QGridLayout *generalGrid = new QGridLayout; - generalGrid->addWidget(&priceTagsCheckBox, 0, 0); + //generalGrid->addWidget(&priceTagsCheckBox, 0, 0); + + generalGrid->addWidget(new QLabel(tr("Nothing is here... yet")), 0, 0); generalGroupBox = new QGroupBox; generalGroupBox->setLayout(generalGrid); @@ -567,10 +569,11 @@ DeckEditorSettingsPage::DeckEditorSettingsPage() void DeckEditorSettingsPage::retranslateUi() { - priceTagsCheckBox.setText(tr("Enable &price tag feature from deckbrew.com")); + //priceTagsCheckBox.setText(tr("Enable &price tag feature from deckbrew.com")); generalGroupBox->setTitle(tr("General")); } +/* void DeckEditorSettingsPage::radioPriceTagSourceClicked(bool checked) { if(!checked) @@ -579,6 +582,7 @@ void DeckEditorSettingsPage::radioPriceTagSourceClicked(bool checked) int source=AbstractPriceUpdater::DBPriceSource; emit priceTagSourceChanged(source); } +*/ MessagesSettingsPage::MessagesSettingsPage() { @@ -838,7 +842,7 @@ void DlgSettings::closeEvent(QCloseEvent *event) case NotLoaded: loadErrorMessage = tr("Your card database did not finish loading\n\n" - "Please file a ticket at http://github.com/Daenyth/Cockatrice/issues with your cards.xml attached\n\n" + "Please file a ticket at http://github.com/Cockatrice/Cockatrice/issues with your cards.xml attached\n\n" "Would you like to change your database location setting?"); break; case FileError: @@ -854,7 +858,7 @@ void DlgSettings::closeEvent(QCloseEvent *event) default: loadErrorMessage = tr("Unknown card database load status\n\n" - "Please file a ticket at http://github.com/Daenyth/Cockatrice/issues\n\n" + "Please file a ticket at http://github.com/Cockatrice/Cockatrice/issues\n\n" "Would you like to change your database location setting?"); break; @@ -885,9 +889,9 @@ void DlgSettings::retranslateUi() generalButton->setText(tr("General")); appearanceButton->setText(tr("Appearance")); - userInterfaceButton->setText(tr("User interface")); - deckEditorButton->setText(tr("Deck editor")); - messagesButton->setText(tr("Chat Settings")); + userInterfaceButton->setText(tr("User Interface")); + deckEditorButton->setText(tr("Deck Editor")); + messagesButton->setText(tr("Chat")); for (int i = 0; i < pagesWidget->count(); i++) dynamic_cast(pagesWidget->widget(i))->retranslateUi(); diff --git a/cockatrice/src/dlg_settings.h b/cockatrice/src/dlg_settings.h index 64814e87..c83f2b6d 100644 --- a/cockatrice/src/dlg_settings.h +++ b/cockatrice/src/dlg_settings.h @@ -143,11 +143,11 @@ public: DeckEditorSettingsPage(); void retranslateUi(); private slots: - void radioPriceTagSourceClicked(bool checked); + //void radioPriceTagSourceClicked(bool checked); signals: - void priceTagSourceChanged(int _priceTagSource); + //void priceTagSourceChanged(int _priceTagSource); private: - QCheckBox priceTagsCheckBox; + //QCheckBox priceTagsCheckBox; QGroupBox *generalGroupBox; }; diff --git a/cockatrice/src/priceupdater.cpp b/cockatrice/src/priceupdater.cpp index 5029324e..e0a06b29 100644 --- a/cockatrice/src/priceupdater.cpp +++ b/cockatrice/src/priceupdater.cpp @@ -35,14 +35,19 @@ AbstractPriceUpdater::AbstractPriceUpdater(const DeckList *_deck) * * @param _deck deck. */ + +/* DBPriceUpdater::DBPriceUpdater(const DeckList *_deck) : AbstractPriceUpdater(_deck) { } +*/ /** * Update the prices of the cards in deckList. */ + +/* void DBPriceUpdater::updatePrices() { QString base = "https://api.deckbrew.com/mtg/cards", q = ""; @@ -88,7 +93,9 @@ void DBPriceUpdater::updatePrices() requestNext(); } +*/ +/* void DBPriceUpdater::requestNext() { if(urls.empty()) @@ -99,10 +106,12 @@ void DBPriceUpdater::requestNext() QNetworkReply *reply = nam->get(QNetworkRequest(url)); connect(reply, SIGNAL(finished()), this, SLOT(downloadFinished())); } +*/ /** * Called when the download of the json file with the prices is finished. */ +/* void DBPriceUpdater::downloadFinished() { QNetworkReply *reply = static_cast(sender()); @@ -180,11 +189,11 @@ void DBPriceUpdater::downloadFinished() float price = edition.value("price").toMap().value("median").toString().toFloat() / 100; //qDebug() << "card " << name << " set " << set << " price " << price << endl; - /** + * Make sure Masters Edition (MED) isn't the set, as it doesn't * physically exist. Also check the price to see that the cheapest set * ends up as the final price. - */ + if (set != "MED" && price > 0 && (!cardsPrice.contains(name) || cardsPrice.value(name) > price)) cardsPrice.insert(name, price); } @@ -212,3 +221,4 @@ void DBPriceUpdater::downloadFinished() requestNext(); } } +*/ diff --git a/cockatrice/src/priceupdater.h b/cockatrice/src/priceupdater.h index 5e67ac46..9acb1dc9 100644 --- a/cockatrice/src/priceupdater.h +++ b/cockatrice/src/priceupdater.h @@ -31,6 +31,7 @@ public: virtual void updatePrices() = 0; }; +/* class DBPriceUpdater : public AbstractPriceUpdater { Q_OBJECT @@ -44,4 +45,5 @@ public: DBPriceUpdater(const DeckList *deck); virtual void updatePrices(); }; +*/ #endif diff --git a/cockatrice/src/settingscache.h b/cockatrice/src/settingscache.h index 4bad12de..2bc59643 100644 --- a/cockatrice/src/settingscache.h +++ b/cockatrice/src/settingscache.h @@ -117,7 +117,7 @@ public: bool getZoneViewPileView() const { return zoneViewPileView; } bool getSoundEnabled() const { return soundEnabled; } QString getSoundPath() const { return soundPath; } - bool getPriceTagFeature() const { return priceTagFeature; } + bool getPriceTagFeature() const { return false; /* #859; priceTagFeature;*/ } int getPriceTagSource() const { return priceTagSource; } bool getIgnoreUnregisteredUsers() const { return ignoreUnregisteredUsers; } bool getIgnoreUnregisteredUserMessages() const { return ignoreUnregisteredUserMessages; } diff --git a/cockatrice/src/tab_deck_editor.cpp b/cockatrice/src/tab_deck_editor.cpp index 0b190afb..91aaf660 100644 --- a/cockatrice/src/tab_deck_editor.cpp +++ b/cockatrice/src/tab_deck_editor.cpp @@ -173,19 +173,20 @@ TabDeckEditor::TabDeckEditor(TabSupervisor *_tabSupervisor, QWidget *parent) grid->addWidget(hashLabel1, 2, 0); grid->addWidget(hashLabel, 2, 1); - // Update price + /* Update price aUpdatePrices = new QAction(QString(), this); aUpdatePrices->setIcon(QIcon(":/resources/icon_update.png")); connect(aUpdatePrices, SIGNAL(triggered()), this, SLOT(actUpdatePrices())); if (!settingsCache->getPriceTagFeature()) aUpdatePrices->setVisible(false); connect(settingsCache, SIGNAL(priceTagFeatureChanged(int)), this, SLOT(setPriceTagFeatureEnabled(int))); + */ QToolBar *deckToolBar = new QToolBar; deckToolBar->setOrientation(Qt::Vertical); deckToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); deckToolBar->setIconSize(QSize(24, 24)); - deckToolBar->addAction(aUpdatePrices); + //deckToolBar->addAction(aUpdatePrices); QHBoxLayout *deckToolbarLayout = new QHBoxLayout; deckToolbarLayout->addStretch(); deckToolbarLayout->addWidget(deckToolBar); @@ -299,8 +300,8 @@ void TabDeckEditor::retranslateUi() commentsLabel->setText(tr("&Comments:")); hashLabel1->setText(tr("Hash:")); - aUpdatePrices->setText(tr("&Update prices")); - aUpdatePrices->setShortcut(tr("Ctrl+U")); + //aUpdatePrices->setText(tr("&Update prices")); + //aUpdatePrices->setShortcut(tr("Ctrl+U")); aNewDeck->setText(tr("&New deck")); aLoadDeck->setText(tr("&Load deck...")); @@ -669,10 +670,12 @@ void TabDeckEditor::actDecrement() void TabDeckEditor::setPriceTagFeatureEnabled(int enabled) { - aUpdatePrices->setVisible(enabled); + //aUpdatePrices->setVisible(enabled); deckModel->pricesUpdated(); } + +/* void TabDeckEditor::actUpdatePrices() { aUpdatePrices->setDisabled(true); @@ -689,12 +692,14 @@ void TabDeckEditor::actUpdatePrices() connect(up, SIGNAL(finishedUpdate()), this, SLOT(finishedUpdatingPrices())); up->updatePrices(); } +*/ + void TabDeckEditor::finishedUpdatingPrices() { - deckModel->pricesUpdated(); - setModified(true); - aUpdatePrices->setDisabled(false); + //deckModel->pricesUpdated(); + //setModified(true); + //aUpdatePrices->setDisabled(false); } void TabDeckEditor::setDeck(DeckLoader *_deck) diff --git a/cockatrice/src/tab_deck_editor.h b/cockatrice/src/tab_deck_editor.h index 24497e80..e80b59cb 100644 --- a/cockatrice/src/tab_deck_editor.h +++ b/cockatrice/src/tab_deck_editor.h @@ -62,7 +62,7 @@ private slots: void actDecrementCard(); void actDecrementCardFromSideboard(); - void actUpdatePrices(); + //void actUpdatePrices(); void finishedUpdatingPrices(); void saveDeckRemoteFinished(const Response &r); @@ -99,7 +99,7 @@ private: QMenu *deckMenu, *dbMenu; QAction *aNewDeck, *aLoadDeck, *aSaveDeck, *aSaveDeckAs, *aLoadDeckFromClipboard, *aSaveDeckToClipboard, *aPrintDeck, *aAnalyzeDeck, *aClose; QAction *aEditSets, *aEditTokens, *aClearSearch, *aCardTextOnly; - QAction *aAddCard, *aAddCardToSideboard, *aRemoveCard, *aIncrement, *aDecrement, *aUpdatePrices; + QAction *aAddCard, *aAddCardToSideboard, *aRemoveCard, *aIncrement, *aDecrement;// *aUpdatePrices; bool modified; public: