Skip to content

Commit

Permalink
Updater: Added "updateandnotify" and better name for the default down…
Browse files Browse the repository at this point in the history
…load folder

The "updaterandnotify" command will always show the GUI update notification dialog
even though the engine is up to date.
  • Loading branch information
skyjake committed Jun 9, 2012
1 parent 02cbe21 commit 452c570
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
9 changes: 9 additions & 0 deletions doomsday/engine/portable/src/dd_main.c
Expand Up @@ -132,6 +132,14 @@ D_CMD(CheckForUpdates)
return true;
}

D_CMD(CheckForUpdatesAndNotify)
{
/// @todo Combine into the same command with CheckForUpdates?
Con_Message("Checking for available updates...\n");
Updater_CheckNow(true);
return true;
}

D_CMD(ShowUpdateSettings)
{
Updater_ShowSettings();
Expand All @@ -144,6 +152,7 @@ D_CMD(ShowUpdateSettings)
void DD_Register(void)
{
C_CMD("update", "", CheckForUpdates);
C_CMD("updateandnotify", "", CheckForUpdatesAndNotify);
C_CMD("updatesettings", "", ShowUpdateSettings);

DD_RegisterLoop();
Expand Down
12 changes: 11 additions & 1 deletion doomsday/engine/portable/src/updater/updatersettingsdialog.cpp
Expand Up @@ -11,6 +11,16 @@
#include <de/Log>
#include <QDebug>

static QString defaultLocationName()
{
QString name = QDesktopServices::displayName(QDesktopServices::TempLocation);
if(name.isEmpty())
{
name = "Temporary Files";
}
return name;
}

struct UpdaterSettingsDialog::Instance
{
UpdaterSettingsDialog* self;
Expand Down Expand Up @@ -47,7 +57,7 @@ struct UpdaterSettingsDialog::Instance
form->addRow(tr("&Release type:"), channelList);

pathList = new QComboBox;
pathList->addItem(QDesktopServices::displayName(QDesktopServices::TempLocation),
pathList->addItem(defaultLocationName(),
UpdaterSettings::defaultDownloadPath());
pathList->addItem(tr("Select folder..."), "");
form->addRow(tr("&Download location:"), pathList);
Expand Down

0 comments on commit 452c570

Please sign in to comment.