Skip to content

Commit e6a6321

Browse files
committed
Minor changes to auto updater
1 parent 79c9bcc commit e6a6321

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

Source/AutoUpdater.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void LatestVersionCheckerAndUpdater::checkForNewVersion (bool background, MainWi
5656
//==============================================================================
5757
void LatestVersionCheckerAndUpdater::run()
5858
{
59-
LOGC("Checking for a new version....");
59+
LOGC("Checking for a newer version of the GUI...");
6060
URL latestVersionURL ("https://api.github.com/repos/open-ephys/plugin-GUI/releases/latest");
6161

6262
std::unique_ptr<InputStream> inStream (latestVersionURL.createInputStream (URL::InputStreamOptions (URL::ParameterHandling::inAddress)
@@ -129,8 +129,8 @@ void LatestVersionCheckerAndUpdater::run()
129129
{
130130
if (! backgroundCheck)
131131
AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,
132-
"No New Version Available",
133-
"Your GUI version is up to date.");
132+
"No Newer Version Available",
133+
"You are running the latest available version of the Open Ephys GUI.");
134134
return;
135135
}
136136

@@ -202,7 +202,7 @@ class UpdateDialog : public Component
202202
titleLabel.setJustificationType (Justification::centred);
203203
addAndMakeVisible (titleLabel);
204204

205-
contentLabel.setText ("A new version of Open Ephys GUI is available - would you like to download it?", dontSendNotification);
205+
contentLabel.setText ("A newer version of Open Ephys GUI is available - would you like to download it?", dontSendNotification);
206206
contentLabel.setFont (Font("Fira Sans", "Regular", 16.0f));
207207
contentLabel.setJustificationType (Justification::topLeft);
208208
contentLabel.setMinimumHorizontalScale(1.0);

Source/AutoUpdater.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,38 @@
2929
class MainWindow;
3030
class DownloadThread;
3131

32+
/**
33+
Helper class to check for new versions of the application and download them.
34+
*/
3235
class LatestVersionCheckerAndUpdater : public DeletedAtShutdown,
3336
private Thread
3437
{
3538
public:
39+
40+
/** Constructor */
3641
LatestVersionCheckerAndUpdater();
42+
43+
/** Destructor */
3744
~LatestVersionCheckerAndUpdater() override;
3845

46+
/** Holds information about a file to download */
3947
struct Asset
4048
{
4149
const String name;
4250
const String url;
4351
const int size;
4452
};
4553

54+
/** Checks for a newer version of the GUI */
4655
void checkForNewVersion (bool isBackgroundCheck, MainWindow* mw);
4756

48-
//==============================================================================
4957
JUCE_DECLARE_SINGLETON_SINGLETHREADED_MINIMAL (LatestVersionCheckerAndUpdater)
5058

5159
private:
52-
//==============================================================================
60+
61+
/** Download new version in background thread */
5362
void run() override;
63+
5464
void askUserAboutNewVersion (const String&, const String&, const Asset& asset);
5565
void askUserForLocationToDownload (const Asset& asset);
5666
void downloadAndInstall (const Asset& asset, const File& targetFile);

Source/UI/UIComponent.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ PopupMenu UIComponent::getMenuForIndex(int menuIndex, const String& menuName)
477477
else if (menuIndex == 3)
478478
{
479479
menu.addCommandItem(commandManager, showHelp);
480+
menu.addSeparator();
480481
menu.addCommandItem(commandManager, checkForUpdates);
481482
}
482483

@@ -655,7 +656,7 @@ void UIComponent::getCommandInfo(CommandID commandID, ApplicationCommandInfo& re
655656
break;
656657

657658
case checkForUpdates:
658-
result.setInfo("Check for updates", "Checks if a newer version of the GUI is available", "General", 0);
659+
result.setInfo("Check for updates...", "Checks if a newer version of the GUI is available", "General", 0);
659660
result.setActive(true);
660661
break;
661662

0 commit comments

Comments
 (0)