From 4d9c1db885bd3ab230440b25e70dcd8049cf4650 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Wed, 11 Sep 2019 11:45:32 -0500 Subject: Add portable lock feature If the file "portable.txt" is present in the application directory, MO will force itself to be launched as a portable instance. The change game button and menu item are hidden to prevent the user from changing out of the portable instance. --- src/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 657c1a27..bd9f1486 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -727,6 +727,10 @@ void MainWindow::setupToolbar() } else { log::warn("no separator found on the toolbar, icons won't be right-aligned"); } + + if (!InstanceManager::instance().allowedToChangeInstance()) { + ui->actionChange_Game->setVisible(false); + } } void MainWindow::setupActionMenu(QAction* a) -- cgit v1.3.1