forked from teamnwah/openmw-tes3coop
[Browser] Add compatibility compilation mode
This commit is contained in:
parent
5bb09d3bed
commit
6131ada0ba
4 changed files with 31 additions and 4 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
option(OPTION_TES3MP_PRE07 "Temporary. Pre 0.7.0 compatible mode." OFF)
|
||||||
|
|
||||||
set(BROWSER_UI
|
set(BROWSER_UI
|
||||||
${CMAKE_SOURCE_DIR}/files/tes3mp/ui/Main.ui
|
${CMAKE_SOURCE_DIR}/files/tes3mp/ui/Main.ui
|
||||||
${CMAKE_SOURCE_DIR}/files/tes3mp/ui/ServerInfo.ui
|
${CMAKE_SOURCE_DIR}/files/tes3mp/ui/ServerInfo.ui
|
||||||
|
@ -76,6 +78,11 @@ add_executable(tes3mp-browser
|
||||||
|
|
||||||
set_property(TARGET tes3mp-browser PROPERTY CXX_STANDARD 14)
|
set_property(TARGET tes3mp-browser PROPERTY CXX_STANDARD 14)
|
||||||
|
|
||||||
|
if (OPTION_TES3MP_PRE07)
|
||||||
|
target_compile_definitions(tes3mp-browser PRIVATE TES3MP_PRE07)
|
||||||
|
endif (OPTION_TES3MP_PRE07)
|
||||||
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
INSTALL(TARGETS tes3mp-browser RUNTIME DESTINATION ".")
|
INSTALL(TARGETS tes3mp-browser RUNTIME DESTINATION ".")
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
|
@ -65,6 +65,17 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
loadFavorites();
|
loadFavorites();
|
||||||
queryHelper->refresh();
|
queryHelper->refresh();
|
||||||
settingsMgr.loadBrowserSettings(*this);
|
settingsMgr.loadBrowserSettings(*this);
|
||||||
|
|
||||||
|
#ifdef TES3MP_PRE07
|
||||||
|
gbModules->setTitle(tr("Plugins Path"));
|
||||||
|
chbAutosort->setVisible(false);
|
||||||
|
listModules->setVisible(false);
|
||||||
|
leAddModule->setVisible(false);
|
||||||
|
pbAddModule->setVisible(false);
|
||||||
|
pbUpModule->setVisible(false);
|
||||||
|
pbDownModule->setVisible(false);
|
||||||
|
pbRemModule->setVisible(false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
|
|
@ -138,8 +138,12 @@ void SettingsMgr::loadServerSettings(Ui::MainWindow &mw)
|
||||||
mw.leServerMPort->setText(QString::fromStdString(serverMgr.getString("port", "MasterServer")));
|
mw.leServerMPort->setText(QString::fromStdString(serverMgr.getString("port", "MasterServer")));
|
||||||
mw.sbRate->setValue(serverMgr.getInt("rate", "MasterServer"));
|
mw.sbRate->setValue(serverMgr.getInt("rate", "MasterServer"));
|
||||||
|
|
||||||
|
#ifndef TES3MP_PRE07
|
||||||
mw.leModulePath->setText(QString::fromStdString(serverMgr.getString("home", "Modules")));
|
mw.leModulePath->setText(QString::fromStdString(serverMgr.getString("home", "Modules")));
|
||||||
mw.chbAutosort->setCheckState(serverMgr.getBool("autoSort", "Modules") ? Qt::Checked : Qt::Unchecked);
|
mw.chbAutosort->setCheckState(serverMgr.getBool("autoSort", "Modules") ? Qt::Checked : Qt::Unchecked);
|
||||||
|
#else
|
||||||
|
mw.leModulePath->setText(QString::fromStdString(serverMgr.getString("home", "Plugins")));
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,8 +161,13 @@ void SettingsMgr::saveServerSettings(Ui::MainWindow &mw)
|
||||||
serverMgr.setString("port", "MasterServer", mw.leServerMPort->text().toStdString());
|
serverMgr.setString("port", "MasterServer", mw.leServerMPort->text().toStdString());
|
||||||
serverMgr.setInt("rate", "MasterServer", mw.sbRate->value());
|
serverMgr.setInt("rate", "MasterServer", mw.sbRate->value());
|
||||||
|
|
||||||
|
#ifndef TES3MP_PRE07
|
||||||
serverMgr.setString("home", "Modules", mw.leModulePath->text().toStdString());
|
serverMgr.setString("home", "Modules", mw.leModulePath->text().toStdString());
|
||||||
serverMgr.setBool("autoSort", "Modules", mw.chbAutosort->checkState() == Qt::Checked);
|
serverMgr.setBool("autoSort", "Modules", mw.chbAutosort->checkState() == Qt::Checked);
|
||||||
|
#else
|
||||||
|
serverMgr.setString("home", "Plugins", mw.leModulePath->text().toStdString());
|
||||||
|
#endif
|
||||||
|
|
||||||
serverMgr.saveUser(serverCfg);
|
serverMgr.saveUser(serverCfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -564,7 +564,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" rowspan="2">
|
<item row="0" column="1" rowspan="2">
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="gbModules">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -589,7 +589,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="vertLayoutModulesList">
|
<layout class="QVBoxLayout" name="vertLayoutModulesList">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="listWidget"/>
|
<widget class="QListWidget" name="listModules"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_55">
|
<layout class="QHBoxLayout" name="horizontalLayout_55">
|
||||||
|
@ -608,14 +608,14 @@
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_56">
|
<layout class="QHBoxLayout" name="horizontalLayout_56">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton">
|
<widget class="QPushButton" name="pbUpModule">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Up</string>
|
<string>Up</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_2">
|
<widget class="QPushButton" name="pbDownModule">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Down</string>
|
<string>Down</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in a new issue