Skip to content

Commit

Permalink
4.0.4.0-leisure
Browse files Browse the repository at this point in the history
Fixed:
 - Adds back the new user wizard inadvertently removed #1464 (@jamescowens).
 - Repair scraper team filtering #1466 (@jamescowens).
  • Loading branch information
denravonska committed May 16, 2019
2 parents 01c88b0 + 6a9c908 commit 4a64ab8
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [4.0.4.0] 2019-05-16, leisure
### Fixed
- Adds back the new user wizard inadvertently removed #1464 (@jamescowens).
- Repair scraper team filtering #1466 (@jamescowens).

## [4.0.3.0] 2019-05-10, leisure
### Added
- Replace NeuralNetwork with portable C++ scraper #1387 (@jamescowens,
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 4)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 3)
define(_CLIENT_VERSION_REVISION, 4)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2019)
Expand Down
53 changes: 42 additions & 11 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ void BitcoinGUI::createActions()
diagnosticsAction->setStatusTip(tr("Diagnostics"));
diagnosticsAction->setMenuRole(QAction::TextHeuristicRole);

newUserWizardAction = new QAction(tr("&New User Wizard"), this);
newUserWizardAction->setStatusTip(tr("New User Wizard"));
newUserWizardAction->setMenuRole(QAction::TextHeuristicRole);

optionsAction = new QAction(tr("&Options..."), this);
optionsAction->setToolTip(tr("Modify configuration options for Gridcoin"));
optionsAction->setMenuRole(QAction::PreferencesRole);
Expand Down Expand Up @@ -350,6 +354,7 @@ void BitcoinGUI::createActions()
connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab()));
connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab()));
connect(diagnosticsAction, SIGNAL(triggered()), this, SLOT(diagnosticsClicked()));
connect(newUserWizardAction, SIGNAL(triggered()), this, SLOT(newUserWizardClicked()));
}

void BitcoinGUI::setIcons()
Expand All @@ -372,6 +377,7 @@ void BitcoinGUI::setIcons()
boincAction->setIcon(QPixmap(":/images/boinc"));
quitAction->setIcon(QPixmap(":/icons/quit"));
aboutAction->setIcon(QPixmap(":/images/gridcoin"));
newUserWizardAction->setIcon(QPixmap(":/images/gridcoin"));
diagnosticsAction->setIcon(QPixmap(":/images/gridcoin"));
optionsAction->setIcon(QPixmap(":/icons/options"));
toggleHideAction->setIcon(QPixmap(":/images/gridcoin"));
Expand Down Expand Up @@ -409,6 +415,10 @@ void BitcoinGUI::createMenuBar()
settings->addAction(unlockWalletAction);
settings->addAction(lockWalletAction);
settings->addSeparator();
// This new wizard menu item is disabled until we make the wizard more advanced, because the existing one it makes no sense
// to run it after the conf file is created.
//settings->addAction(newUserWizardAction);
//settings->addSeparator();
settings->addAction(optionsAction);

QMenu *community = appMenuBar->addMenu(tr("&Community"));
Expand Down Expand Up @@ -853,6 +863,12 @@ bool CreateNewConfigFile(std::string boinc_email)
myConfig << row;
row = "addnode=seeds.gridcoin.ifoggz-network.xyz \r\n";
myConfig << row;
row = "addnode=ec2-3-81-39-58.compute-1.amazonaws.com \r\n";
myConfig << row;
row = "addnode=addnode-us-central.cycy.me \r\n";
myConfig << row;
row = "addnode=gridcoin.ddns.net \r\n";
myConfig << row;
myConfig.close();
return true;
}
Expand All @@ -872,7 +888,8 @@ bool ForceInAddNode(std::string sMyAddNode)

void BitcoinGUI::NewUserWizard()
{
if (!IsConfigFileEmpty()) return;
if (IsConfigFileEmpty())
{
QString boincemail = "";
//Typhoon- Check to see if boinc exists in default path - 11-19-2014

Expand All @@ -883,17 +900,18 @@ void BitcoinGUI::NewUserWizard()
std::string sBoincNarr = "";
if (sout == "-1")
{
LogPrintf("Boinc not installed in default location! ");
LogPrintf("BOINC not installed in default location! ");
//BoincInstalled=false;
std::string nicePath = GetBoincDataDir();
sBoincNarr = "Boinc is not installed in default location " + nicePath + "! Please set boincdatadir=c:\\programdata\\boinc\\ to the correct path where Boincs programdata directory resides.";
sBoincNarr = "BOINC is not installed in the default location " + nicePath + "! Please set boincdatadir in the gridcoinresearch.conf file to the correct path where the BOINC client_state.xml file resides.";
}

bool ok;
boincemail = QInputDialog::getText(this, tr("New User Wizard"),
tr("Please enter your boinc E-mail address, or click <Cancel> to skip for now:"),
QLineEdit::Normal,
"", &ok);

if (ok && !boincemail.isEmpty())
{
std::string new_email = tostdstring(boincemail);
Expand All @@ -910,26 +928,26 @@ void BitcoinGUI::NewUserWizard()
{
//Create Config File
CreateNewConfigFile("investor");
QString strMessage = tr("To get started with Boinc, run the boinc client, choose projects, then populate the gridcoinresearch.conf file in %appdata%\\GridcoinResearch with your boinc e-mail address. To run this wizard again, please delete the gridcoinresearch.conf file. ");
QString strMessage = tr("To get started with BOINC, run the BOINC client, choose projects, then populate the gridcoinresearch.conf file in %appdata%\\GridcoinResearch with your boinc e-mail address. To run this wizard again, please delete the gridcoinresearch.conf file. ");
QMessageBox::warning(this, tr("New User Wizard - Skipped"), strMessage);
}
// Read in the mapargs, and set the seed nodes 10-13-2015
ReadConfigFile(mapArgs, mapMultiArgs);

//Force some addnodes in to get user started
ForceInAddNode("node.gridcoin.us");
ForceInAddNode("london.grcnode.co.uk");
ForceInAddNode("gridcoin.crypto.fans");
ForceInAddNode("seeds.gridcoin.ifoggz-network.xyz");
ForceInAddNode("nuad.de");
ForceInAddNode("www.grcpool.com");
ForceInAddNode("seeds.gridcoin.ifoggz-network.xyz");
ForceInAddNode("ec2-3-81-39-58.compute-1.amazonaws.com");
ForceInAddNode("addnode-us-central.cycy.me");
ForceInAddNode("gridcoin.ddns.net");

if (sBoincNarr != "")
{
QString qsMessage = tr(sBoincNarr.c_str());
QMessageBox::warning(this, tr("Attention! - Boinc Path Error!"), qsMessage);
}


}
}


Expand Down Expand Up @@ -976,6 +994,12 @@ void BitcoinGUI::diagnosticsClicked()
diagnosticsDialog->activateWindow();
}

// Note this is for the menu item. The menu item is disabled until we implement a more advanced wizard.
void BitcoinGUI::newUserWizardClicked()
{
NewUserWizard();
}

// links to websites and services outside the gridcoin client
void BitcoinGUI::bxClicked()
{
Expand Down Expand Up @@ -1298,7 +1322,14 @@ void BitcoinGUI::timerfire()
{
try
{
// TODO: Check if these SetRPCResponse calls are really needed.
static bool bNewUserWizardNotified = false;
if (!bNewUserWizardNotified)
{
bNewUserWizardNotified=true;
NewUserWizard();
}

// TODO: Check if these SetRPCResponse calls are really needed.
/*if (bGlobalcomInitialized)
{
//R Halford - Allow .NET to talk to Core: 6-21-2015
Expand Down
3 changes: 3 additions & 0 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class BitcoinGUI : public QMainWindow
QAction *exchangeAction;
QAction *votingAction;
QAction *diagnosticsAction;
QAction *newUserWizardAction;
QAction *verifyMessageAction;
QAction *aboutAction;
QAction *receiveCoinsAction;
Expand Down Expand Up @@ -194,6 +195,8 @@ private slots:
void chatClicked();
void diagnosticsClicked();

void newUserWizardClicked();

#ifndef Q_OS_MAC
/** Handle tray icon clicked */
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
Expand Down
10 changes: 8 additions & 2 deletions src/scraper/scraper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1698,6 +1698,9 @@ bool ProcessProjectRacFileByCPID(const std::string& project, const fs::path& fil
// Only do this if team membership filtering is specified by network policy.
if (REQUIRE_TEAM_WHITELIST_MEMBERSHIP)
{
// Set initial flag for whether user is on team whitelist to false.
bool bOnTeamWhitelist = false;

const std::string& sTeamID = ExtractXML(data, "<teamid>", "</teamid>");
int64_t nTeamID = 0;

Expand All @@ -1711,12 +1714,15 @@ bool ProcessProjectRacFileByCPID(const std::string& project, const fs::path& fil
continue;
}

// Check to see if the user's team ID is in the whitelist team ID map for the project. If not continue.
// Check to see if the user's team ID is in the whitelist team ID map for the project.
for (auto const& iTeam : mTeamIDsForProject)
{
if (iTeam.second == nTeamID)
continue;
bOnTeamWhitelist = true;
}

//If not continue the while loop and do not put the users stats for that project in the outputstatistics file.
if (!bOnTeamWhitelist) continue;
}

// User beacon verified. Append its statistics to the CSV output.
Expand Down

0 comments on commit 4a64ab8

Please sign in to comment.