summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt2/MainWindow.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-06-14 11:58:11 +0200
committerLéo Lam <leo@innovatetechnologi.es>2017-06-28 11:23:08 +0200
commit1a6b5ca36addfa7b9392b261574e29b8f1fcc649 (patch)
tree985be596e1929ef1b094d1389e2723ffd2916c82 /Source/Core/DolphinQt2/MainWindow.cpp
parentf06367febcc6be391bf68b5db41ad4253f60689c (diff)
Qt: Add menu item to perform online update
Diffstat (limited to 'Source/Core/DolphinQt2/MainWindow.cpp')
-rw-r--r--Source/Core/DolphinQt2/MainWindow.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp
index b57ac4f134..de38910faa 100644
--- a/Source/Core/DolphinQt2/MainWindow.cpp
+++ b/Source/Core/DolphinQt2/MainWindow.cpp
@@ -30,7 +30,6 @@
#include "DolphinQt2/AboutDialog.h"
#include "DolphinQt2/Config/ControllersWindow.h"
-
#include "DolphinQt2/Config/Mapping/MappingWindow.h"
#include "DolphinQt2/Config/SettingsWindow.h"
#include "DolphinQt2/Host.h"
@@ -39,6 +38,7 @@
#include "DolphinQt2/QtUtils/WindowActivationEventFilter.h"
#include "DolphinQt2/Resources.h"
#include "DolphinQt2/Settings.h"
+#include "DolphinQt2/WiiUpdate.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
@@ -165,6 +165,9 @@ void MainWindow::ConnectMenuBar()
// Options
connect(m_menu_bar, &MenuBar::ConfigureHotkeys, this, &MainWindow::ShowHotkeyDialog);
+ // Tools
+ connect(m_menu_bar, &MenuBar::PerformOnlineUpdate, this, &MainWindow::PerformOnlineUpdate);
+
// View
connect(m_menu_bar, &MenuBar::ShowTable, m_game_list, &GameList::SetTableView);
connect(m_menu_bar, &MenuBar::ShowList, m_game_list, &GameList::SetListView);
@@ -530,6 +533,13 @@ void MainWindow::SetStateSlot(int slot)
m_state_slot = slot;
}
+void MainWindow::PerformOnlineUpdate(const std::string& region)
+{
+ WiiUpdate::PerformOnlineUpdate(region, this);
+ // Since the update may have installed a newer system menu, refresh the tools menu.
+ m_menu_bar->UpdateToolsMenu(false);
+}
+
bool MainWindow::eventFilter(QObject* object, QEvent* event)
{
if (event->type() == QEvent::Close && !Stop())