Skip to content

Commit

Permalink
re #10759 neaten up intro message and add both dois
Browse files Browse the repository at this point in the history
  • Loading branch information
NickDraper committed Dec 11, 2014
1 parent 5d37c05 commit 09b2b3c
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class MANTID_KERNEL_DLL MantidVersion
static const char* revisionFull(); ///< The full SHA-1 of the last commit
static const char* releaseDate(); ///< The date of the last commit
static std::string doi(); ///< The DOI for this release of Mantid.
static std::string paperCitation(); ///< The citation for the Mantid paper

private:
MantidVersion(); ///< Private, unimplemented constructor. Not a class that can be instantiated.
Expand Down
5 changes: 3 additions & 2 deletions Code/Mantid/Framework/Kernel/src/ConfigService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ namespace Mantid
*/
std::string welcomeMessage()
{
return "Welcome to Mantid version " + std::string(Mantid::Kernel::MantidVersion::version()) + " - Manipulation and Analysis Toolkit for Instrument Data\n" +
"Please cite Mantid in your publications using: " + Mantid::Kernel::MantidVersion::doi();
return "Welcome to Mantid " + std::string(Mantid::Kernel::MantidVersion::version()) +
"\nPlease cite: " + Mantid::Kernel::MantidVersion::paperCitation() +
" or this release: " + Mantid::Kernel::MantidVersion::doi();
}

namespace Kernel
Expand Down
7 changes: 6 additions & 1 deletion Code/Mantid/Framework/Kernel/src/MantidVersion.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const char* MantidVersion::releaseDate()

std::string MantidVersion::doi()
{
const std::string MAIN = "http://dx.doi.org/10.1016/j.nima.2014.07.029";
const std::string MAIN = "http://dx.doi.org/10.5286/Software/Mantid";
// Cast here in those cases where patch number is of the form 20131022.1356.
const unsigned int patchVersion = static_cast<unsigned int>(@VERSION_PATCH@);

Expand All @@ -75,5 +75,10 @@ std::string MantidVersion::doi()
return doi.str();
}

std::string MantidVersion::paperCitation()
{
return "http://dx.doi.org/10.1016/j.nima.2014.07.029";
}

} // namespace Kernel
} // namespace Mantid
6 changes: 6 additions & 0 deletions Code/Mantid/MantidPlot/src/Mantid/MantidAbout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,11 @@ MantidAbout::MantidAbout(QWidget *parent) : MantidQt::API::MantidDialog(parent)
Mantid::Kernel::MantidVersion::doi() + "</a></p>");
m_uiForm.mantiddoi->setText(mantidDOI);
m_uiForm.mantiddoi->setOpenExternalLinks(true);

QString mantidCitation = QString::fromStdString("<p><a href = " +\
Mantid::Kernel::MantidVersion::paperCitation() + ">" +\
Mantid::Kernel::MantidVersion::paperCitation() + "</a></p>");
m_uiForm.mantidcitation->setText(mantidCitation);
m_uiForm.mantidcitation->setOpenExternalLinks(true);
}

36 changes: 25 additions & 11 deletions Code/Mantid/MantidPlot/src/Mantid/MantidAbout.ui
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="revision_label">
<property name="text">
<string>Revision:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="revision_value">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mantidlabel">
<property name="text">
Expand All @@ -104,31 +118,31 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="revision_label">
<item row="5" column="0">
<widget class="QLabel" name="doi_label">
<property name="text">
<string>Revision:</string>
<string>Citation:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="revision_value">
<item row="5" column="1">
<widget class="QLabel" name="mantidcitation">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="mantiddoi">
<item row="6" column="0">
<widget class="QLabel" name="ReleaseDoi_label">
<property name="text">
<string>TextLabel</string>
<string>Release doi:</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="doi_label">
<item row="6" column="1">
<widget class="QLabel" name="mantiddoi">
<property name="text">
<string>Citation:</string>
<string>TextLabel</string>
</property>
</widget>
</item>
Expand Down

0 comments on commit 09b2b3c

Please sign in to comment.