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
|
||||
${CMAKE_SOURCE_DIR}/files/tes3mp/ui/Main.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)
|
||||
|
||||
if (OPTION_TES3MP_PRE07)
|
||||
target_compile_definitions(tes3mp-browser PRIVATE TES3MP_PRE07)
|
||||
endif (OPTION_TES3MP_PRE07)
|
||||
|
||||
|
||||
if (WIN32)
|
||||
INSTALL(TARGETS tes3mp-browser RUNTIME DESTINATION ".")
|
||||
endif (WIN32)
|
||||
|
|
|
@ -65,6 +65,17 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
loadFavorites();
|
||||
queryHelper->refresh();
|
||||
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()
|
||||
|
|
|
@ -138,8 +138,12 @@ void SettingsMgr::loadServerSettings(Ui::MainWindow &mw)
|
|||
mw.leServerMPort->setText(QString::fromStdString(serverMgr.getString("port", "MasterServer")));
|
||||
mw.sbRate->setValue(serverMgr.getInt("rate", "MasterServer"));
|
||||
|
||||
#ifndef TES3MP_PRE07
|
||||
mw.leModulePath->setText(QString::fromStdString(serverMgr.getString("home", "Modules")));
|
||||
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.setInt("rate", "MasterServer", mw.sbRate->value());
|
||||
|
||||
#ifndef TES3MP_PRE07
|
||||
serverMgr.setString("home", "Modules", mw.leModulePath->text().toStdString());
|
||||
serverMgr.setBool("autoSort", "Modules", mw.chbAutosort->checkState() == Qt::Checked);
|
||||
#else
|
||||
serverMgr.setString("home", "Plugins", mw.leModulePath->text().toStdString());
|
||||
#endif
|
||||
|
||||
serverMgr.saveUser(serverCfg);
|
||||
}
|
||||
|
||||
|
|
|
@ -564,7 +564,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<widget class="QGroupBox" name="gbModules">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -589,7 +589,7 @@
|
|||
</property>
|
||||
<layout class="QVBoxLayout" name="vertLayoutModulesList">
|
||||
<item>
|
||||
<widget class="QListWidget" name="listWidget"/>
|
||||
<widget class="QListWidget" name="listModules"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_55">
|
||||
|
@ -608,14 +608,14 @@
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_56">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<widget class="QPushButton" name="pbUpModule">
|
||||
<property name="text">
|
||||
<string>Up</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<widget class="QPushButton" name="pbDownModule">
|
||||
<property name="text">
|
||||
<string>Down</string>
|
||||
</property>
|
||||
|
|
Loading…
Reference in a new issue