Centralize the name of the application being updated in AppInfo.h

Also add AppInfo.h missing from previous commit.
This commit is contained in:
Robert Knight 2011-08-26 18:22:25 +01:00
parent 7597dee64a
commit be2e0520ad
2 changed files with 22 additions and 1 deletions

21
src/AppInfo.h Normal file
View file

@ -0,0 +1,21 @@
#pragma once
#include <string>
class AppInfo
{
public:
static std::string name();
static std::string appName();
};
inline std::string AppInfo::name()
{
return "Mendeley Updater";
}
inline std::string AppInfo::appName()
{
return "Mendeley Desktop";
}

View file

@ -54,7 +54,7 @@ void UpdateDialogAscii::updateProgress(int percentage)
void UpdateDialogAscii::updateFinished()
{
m_mutex.lock();
m_output << "\nUpdate Finished. You can now restart Mendeley Desktop." << std::endl;
m_output << "\nUpdate Finished. You can now restart " << AppInfo::appName() << "." << std::endl;
m_mutex.unlock();
}