Skip to content
Permalink
Browse files

MenuBar: Implement proper update-capabilities check

  • Loading branch information...
spycrab committed Feb 26, 2019
1 parent 25e9339 commit f0b749d8e28608ea7554a8d8a7440c16e411b830
Showing with 9 additions and 8 deletions.
  1. +9 −6 Source/Core/DolphinQt/MenuBar.cpp
  2. +0 −2 Source/Core/DolphinQt/MenuBar.h
@@ -52,6 +52,7 @@
#include "DolphinQt/Settings.h"
#include "DolphinQt/Updater.h"

#include "UICommon/AutoUpdate.h"
#include "UICommon/GameFile.h"

QPointer<MenuBar> MenuBar::s_menu_bar;
@@ -507,7 +508,6 @@ void MenuBar::AddOptionsMenu()
m_change_font = options_menu->addAction(tr("&Font..."), this, &MenuBar::ChangeDebugFont);
}

#ifdef _WIN32
void MenuBar::InstallUpdateManually()
{
auto& track = SConfig::GetInstance().m_auto_update_track;
@@ -526,7 +526,6 @@ void MenuBar::InstallUpdateManually()

track = previous_value;
}
#endif

void MenuBar::AddHelpMenu()
{
@@ -544,13 +543,17 @@ void MenuBar::AddHelpMenu()
QDesktopServices::openUrl(QUrl(QStringLiteral("https://github.com/dolphin-emu/dolphin")));
});

#ifdef _WIN32
help_menu->addSeparator();
if (AutoUpdateChecker::SystemSupportsAutoUpdates())
{
help_menu->addSeparator();

help_menu->addAction(tr("&Check for Updates..."), this, &MenuBar::InstallUpdateManually);
#endif
help_menu->addAction(tr("&Check for Updates..."), this, &MenuBar::InstallUpdateManually);
}

#ifndef __APPLE__
help_menu->addSeparator();
#endif

help_menu->addAction(tr("&About"), this, &MenuBar::ShowAboutDialog);
}

@@ -42,9 +42,7 @@ class MenuBar final : public QMenuBar

QMenu* GetListColumnsMenu() const { return m_cols_menu; }

#ifdef _WIN32
void InstallUpdateManually();
#endif

signals:
// File

0 comments on commit f0b749d

Please sign in to comment.
You can’t perform that action at this time.